Status: Open
Status: Answered
Status: Closed
Status: Duplicate

OT Media Management API | Create a folder

0
Posted Oct 02 by Dmitry Varakin.

Hello All!

I try to create a folder in OTMM using API method POST /{version: v(4)}/folders/{id}. But I can't figure out how to get the ID and where to specify the id of the parent folder.

When I try insert another ID I get a error:
"http_response_code": 404,
"message": "No folder with the specified id was found.",
"debug_message": "Folder not found with the id 21bcf283a130b5ff509ef443b61e7f3527e2dc7d",
"error_code": 1000

Maybe several requests are required?
Please help me build the correct request to create a folder.

Thanks!

2 Answers

1
BEST ANSWER: As chosen by the author.

You can use the following in an authenticated session and replace the PARENT_FOLDER_ID with your id
POST /otmmapi/v5/folders/<PARENT_FOLDER_ID>

and the payload for the POST request is

{
&quot;folder_resource&quot;: {
    &quot;folder&quot;: {
        &quot;name&quot;: &quot;Test folder&quot;,
        &quot;container_type_id&quot;: &quot;ARTESIA.BASIC.FOLDER&quot;,
        &quot;security_policy_list&quot;: [{
            &quot;id&quot;: 1
        }],
        &quot;metadata&quot;: {
            &quot;metadata_element_list&quot;: [{
                &quot;id&quot;: &quot;ARTESIA.FIELD.ASSET DESCRIPTION&quot;,
                &quot;type&quot;: &quot;com.artesia.metadata.MetadataField&quot;,
                &quot;value&quot;: {
                    &quot;value&quot;: {
                        &quot;type&quot;: &quot;string&quot;,
                        &quot;value&quot;: &quot;Test description&quot;
                    }
                }
            }]
        },
        &quot;metadata_model_id&quot;: &quot;ARTESIA.MODEL.BASIC FOLDER&quot;
    }
}

}


0
BEST ANSWER: As chosen by the author.

Hello Sateesh!

Thank you so much!
Your answer very helpful. Everything works great!

Regards,
Dmitry


 You have subscribed and will receive email notifications of updates to this topic. To unsubscribe, uncheck the checkbox.

Statistics

Related categories

Related tags

Your answer

To leave an answer, please sign in.