Public API v2 → Create Catalog Folder Endpoint

About the /catalog/folder endpoint

The /catalog/folder endpoint creates a new folder after providing the folder name and optionally the ID of the parent folder. This endpoint is available starting 2024.1.5.

For information about how to get started with Public API v2, refer to References → Public API v2.

Note

Use the HTTPS or HTTP scheme according to your installation. You must use the HTTPS scheme to successfully run the API endpoints on Cloud installations.

Request URL

https://<cluster_URL>/incorta/api/v2/{tenantName}/catalog/folder

Examples:

  • https://mycluster.incorta.com/incorta/api/v2/default/catalog/folder
  • https://10.1.2.3:8080/incorta/api/v2/default/catalog/folder

Request URL Parameters

ParameterTypeDescriptionRequired
tenantNameStringThe tenant name (case-sensitive)Required

HTTP method

POST

Request headers

{
"Content-Type": "application/json",
"Accept": "application/json",
"Authorization": "Bearer {access_token}"
}

You must use a valid access token of a tenant user who has access to the parent folder. For information about how to create an access token, refer to Public API v2 → Create an API access token.

Request body

{
"name": "string",
"parentId": number
}

Request body parameters

ParameterTypeDescriptionRequired
nameStringThe name of the new folder you want to create (case-sensitive). It must be unique per tenant.Required
parentIdIntegerThe ID of the parent folder to create the new folder in. You must have Edit access to the parent folder to create a new folder within it.
If you do not provide a valid parent ID, the new folder will be created in the Catalog root directory.
Optional

Example:

{
"name": "NewFolder",
"parentId": 3005
}

Endpoint response

The following table shows the HTTP response status codes for this endpoint.

CodeDescriptionPayload Response
201Created
The endpoint successfully ran and created the new folder.
{"name": "string","id": number}
For more details, see Response parameters.
400Bad Request
You provided invalid values.
{"message": "string"}
Example:
{Unexpected character ('x' (code 120)) in numeric value: expected digit (0-9) to follow minus sign, for valid numeric value}
401Unauthorized
The endpoint couldn’t create the new folder due to authentication errors, such as an invalid or expired access token.
{"message": "string"}
Example:
{"message": "INC_09030108: Invalid authentication header. Invalid Token [abcd1234]"
403Forbidden
You do not have sufficient access rights to create the new folder. For example, you don’t have access to the parent folder.
{"message": "string"}
Example:
"message": "INC_02010000: You are not authorized to EDIT the ParentFolder FOLDER of ID [3005]"
404Not Found
The tenant doesn't exist or is disabled.
{"message": "string"}
Example:
{"message": "Invalid [DEFAULT] tenant in resource path"}
409Conflict
A folder with the same name already exists in the parent folder.
{"message": "string"}
Example:
{"message": "INC_05133202: Another FOLDER with the same name [NewFolder] already exists."}
422Unprocessable Entity{"errorMessages": [...]}
Example:
{"errorMessages": [{"message": "INC_01210000: name may not be empty"}]}
500Internal Server Error
The endpoint couldn’t return the result list due to a server error.
{"message": "string"}

Response parameters

The following are the parameters in the /catalog/folder endpoint's response when the endpoint creates the folder successfully (code 201).

{
"name": "string",
"id": number
}

The following table describes these response parameters.

ParameterTypeDescription
nameStringThe new folder’s name
idIntegerThe ID of the new folder

Response example

{
"name": "NewFolder",
"id": 3010
}