Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/assets/create

Requires JWT.

Create a new folder asset.

You create a new child for an existing parent. You can fill the fields later with an update.

The parent must be a folder.

If you want to create a file asset, you'll need the upload endpoint.

Request

POST /api/p/<project gid>/assets/create
Authorization: Bearer <JWT>

{
    "parent": "<parent asset gid>",
    "name": "new folder"
}

parent is the parent for the new asset and must be a folder.

optional

name the name of the folder

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "parent": "<parent asset gid>",
        "asset": "656d4c14-3c96-41b9-b035-debf51511c45"
    },
    "data": {
        "assets": {
            "656d4c14-3c96-41b9-b035-debf51511c45": {
                "gid": "656d4c14-3c96-41b9-b035-debf51511c45",
                
            },
            "<parent asset gid>": {
                "gid": "<parent asset gid>",
                
            }
        }
    }
}

result

asset the newly created folder.
parent its parent with updated childcount.

data

assets Asset info with hierarchy, type, name. Unordered. Includes the parent asset with updated childcount and info.

Error responses

400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - parent asset doesn't exist or isn't a folder