OT Media Management API | Create a folder

Options

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!

Comments

  • Sateesh Karanam
    Options

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

    and the payload for the POST request is

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

    }

  • Hello Sateesh!

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

    Regards,
    Dmitry