Re: Create Folder not working on REST API

mauriciogior1
Level 1

Create Folder not working on REST API

Hello, I'm trying to create a folder in a Program using the POST /rest/asset/v1/folders.json endpoint.
Here is the parameters I'm sending:

{
    name: "InEvent",
    description: "Test",
    parent: {
       id: 1008,
       type: "Program"
    }
}

 

Here is the response I'm getting:
{
    requestId: "10af3#1802411f082",
    success: false,
    warnings: [ ],
    errors: [{
       code: "611",
       message: "System error"
    }]
}

 

I'm also getting the exact same error when creating a Static List, here is the requestId: aba7#1802419a646

 

Any help please?

3 REPLIES 3
Darshil_Shah1
Level 10 - Community Advisor

Re: Create Folder not working on REST API

Are you passing the request payload in the application/x-www-form-urlencoded format in both the cases?

mauriciogior1
Level 1

Re: Create Folder not working on REST API

It should be application/json according to the documentation, that's what I'm passing.
I tried application/x-www-form-urlencoded and it didn't work too.

Darshil_Shah1
Level 10 - Community Advisor

Re: Create Folder not working on REST API

Nope, should be application/x-www-form-urlencoded,refer below snapshot from the documentation page.

 

Darshil_Shah1_0-1649878473625.png

 

If you're using postman, request body should be set something like below:

Darshil_Shah1_1-1649878645593.png