Skip to main content
Skip table of contents

Folders

Contents

List Folders

List all Folders.

Endpoint:

URL

/api/v2/folders/

Method

GET

Expected response code

200

Example:

BASH
curl -v \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/folders/

Example response:

Folder list JSON
JSON
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 2
    },
    "objects": [
        {
            "aspects": {},
            "created": "2023-10-30T19:12:41",
            "created_by": null,
            "description": "",
            "dynatype": {},
            "id": "4c77eed8-7758-11ee-834b-0f72da0a97fa",
            "modified": "2023-10-30T19:12:41",
            "modified_by": null,
            "parent": "4c5e75e8-7758-11ee-834b-c3440f49036f",
            "path": "/domain/trash",
            "project": {},
            "resource_uri": "/api/v2/folders/4c77eed8-7758-11ee-834b-0f72da0a97fa/",
            "snapshot_id": "4c784c2a-7758-11ee-834b-8f76edadadc4",
            "space": {},
            "tags": [],
            "template": null,
            "title": "trash",
            "type": "Folder",
            "version": null
        },
        {
            "aspects": {},
            "created": "2023-10-30T19:16:55",
            "created_by": "Administrator Administrator",
            "description": "",
            "dynatype": {},
            "id": "e38e61d0-7758-11ee-b1d1-27323e552e94",
            "modified": "2023-10-30T19:16:55",
            "modified_by": "Administrator Administrator",
            "parent": "e2b136ca-7758-11ee-834b-c7c63772a94c",
            "path": "/domain/spaces/Publishing Space/QualityFileSpace/{{title}}/qualityfiles-copy",
            "project": {},
            "resource_uri": "/api/v2/folders/e38e61d0-7758-11ee-b1d1-27323e552e94/",
            "snapshot_id": "e38e6f86-7758-11ee-b1d1-43ab6f7988fc",
            "space": {
                "id": "e29e3174-7758-11ee-a909-abf8cf246e22",
                "title": "QualityFileSpace"
            },
            "tags": [],
            "template": null,
            "title": "qualityfiles-copy",
            "type": "Folder",
            "version": "0.1"
        }
    ]
}

List Folders in a Project

List folders in an existing Project.

Endpoint:

URL

/api/v2/projects/$project_id/folders/

Method

GET

Expected response code

200

URL parameters:

  • project_id – is ID of a Project to list Folders for.

Example:

CODE
project_id=3122576a-71cf-11ee-848e-b7be3292bc02

curl -v \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    $COREDATA_BASE_URL/api/v2/projects/$project_id/folders/

Example response:

Project's Folder list JSON
JSON
{
    "meta": {
        "limit": 20,
        "next": null,
        "offset": 0,
        "previous": null,
        "total_count": 2
    },
    "objects": [
        {
            "aspects": {},
            "created": "2023-10-30T16:09:13",
            "created_by": "Administrator Administrator",
            "description": "",
            "dynatype": {},
            "id": "ab168a18-773e-11ee-a37c-636a456650fd",
            "modified": "2023-10-30T16:09:13",
            "modified_by": "Administrator Administrator",
            "parent": "313ae0be-71cf-11ee-b1e9-ebd554949e29",
            "path": "/domain/spaces/Spaces/Space/Projects/Project/2023-3/Folder 2",
            "project": {
                "id": "3122576a-71cf-11ee-848e-b7be3292bc02",
                "identifier": "2023-3",
                "title": "Project"
            },
            "resource_uri": "/api/v2/folders/ab168a18-773e-11ee-a37c-636a456650fd/",
            "snapshot_id": "ab1724c8-773e-11ee-a37c-830e9425335f",
            "space": {
                "id": "2a3b87be-71cf-11ee-a5ea-1b559886a85c",
                "title": "Spaces"
            },
            "tags": [],
            "template": null,
            "title": "Folder 2",
            "type": "Folder",
            "version": "0.1"
        },
        {
            "aspects": {},
            "created": "2023-10-30T16:09:12",
            "created_by": "Administrator Administrator",
            "description": "",
            "dynatype": {},
            "id": "aa5fa424-773e-11ee-8a73-c75c98d63131",
            "modified": "2023-10-30T16:09:12",
            "modified_by": "Administrator Administrator",
            "parent": "313ae0be-71cf-11ee-b1e9-ebd554949e29",
            "path": "/domain/spaces/Spaces/Space/Projects/Project/2023-3/Folder 1",
            "project": {
                "id": "3122576a-71cf-11ee-848e-b7be3292bc02",
                "identifier": "2023-3",
                "title": "Project"
            },
            "resource_uri": "/api/v2/folders/aa5fa424-773e-11ee-8a73-c75c98d63131/",
            "snapshot_id": "aa61bd72-773e-11ee-8a73-03677a7e7b9b",
            "space": {
                "id": "2a3b87be-71cf-11ee-a5ea-1b559886a85c",
                "title": "Spaces"
            },
            "tags": [],
            "template": null,
            "title": "Folder 1",
            "type": "Folder",
            "version": "0.1"
        }
    ]
}

Create a Folder in a Project

Create a Folder in an existing Project.

Endpoint:

URL

/api/v2/folders/

Method

POST

Content-Type

application/json

Expected response code

200

Parameters:

  • project or parent – ID of the project to create folder in;

  • title – the title of the new Folder.

Example:

BASH
project_id=d4d780ae-7758-11ee-9f6f-2b890065fae6
title="New folder"

curl -v \
    -X POST \
    -H "Authorization: apikey $API_USER:$API_KEY" \
    -H "Content-Type: application/json" \
    -d "{\"title\": \"$title\", \"project\": \"$project_id\"}" \
    $COREDATA_BASE_URL/api/v2/folders/

Where:

  • project_id – ID of the project to create new Folder in;

  • title – the new Folder title.

The successful response contains Location header containing link to the newly created Folder. The link contains ID of the Folder. Here is an example:

CODE
Location: /api/v2/folders/8c7844dc-77bd-11ee-9eb5-f7d17bec4477/

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.