Folders

Folders don't do anything yet, but will be used in the (near) future to be able to group files.

Endpoints
   GET /:project/folders
   GET /:project/folders/:id
  POST /:project/folders
 PATCH /:project/folders/:id
DELETE /:project/folders/:id

The Folder Object

Attributes

id integer

Unique identifier for the folder.

name string

Name of the folder.

parent_folder integer

Unique identifier of the parent folder. This allows for nested folders.

Folder Object
{
  "id": 1,
  "name": "New York",
  "parent_folder": null
}

List the Folders

List the folders.

Parameters

project required

The project you're targetting.

Query

fields optional

Control what fields are being returned in the object. Learn more

limit optional

A limit on the number of objects that are returned. Default is 200. Learn more

offset optional

How many items to skip when fetching data. Default is 0. Learn more

page optional

Cursor for use in pagination. Often used in combination with limit. Learn more

sort optional

How to sort the returned items. Learn more

single optional

Return the result as if it was a single item. Useful for selecting a single item based on filters and search queries. Will force limit to be 1. Learn more

filter optional

Select items in collection by given conditions. Learn more

q optional

Filter by items that contain the given search query in one of their fields. Learn more

meta optional

What metadata to return in the response. Learn more

Returns

Returns an array of folder objects.

Endpoint
   GET /:project/folders
Response
{
  "data": [
    {
      "id": 1,
      "name": "New York",
      "parent_folder": null
    },
    { ... },
    { ... }
  ]
}

Retrieve a Folder

Retrieve a single folder by unique identifier.

Parameters

project required

The project you're targetting.

id required

Unique identifier of the item.

Query

fields optional

Control what fields are being returned in the object. Learn more

meta optional

What metadata to return in the response. Learn more

Returns

Returns the folder object for the given unique identifier.

Endpoint
   GET /:project/folders/:id
Response
{
  "data": {
    "id": 1,
    "name": "New York",
    "parent_folder": null
  }
}

Create a Folder

Create a new folder.

Parameters

project required

The project you're targetting.

Attributes

name required

Name of the folder.

parent_folder optional

Unique identifier of the parent folder. This allows for nested folders.

Query

fields optional

Control what fields are being returned in the object. Learn more

meta optional

What metadata to return in the response. Learn more

Returns

Returns the folder object for the folder that was just created.

Endpoint
  POST /:project/folders
Request
{
  "name": "Amsterdam"
}
Response
{
  "data": {
    "id": 5,
    "name": "Amsterdam",
    "parent_folder": null
  }
}

Update a Folder

Update an existing folder

Parameters

project required

The project you're targetting.

id required

Unique identifier of the item.

Attributes

name optional

Name of the folder. Can't be null or empty.

parent_folder optional

Unique identifier of the parent folder. This allows for nested folders.

Query

fields optional

Control what fields are being returned in the object. Learn more

meta optional

What metadata to return in the response. Learn more

Returns

Returns the folder object for the folder that was just updated.

Endpoint
 PATCH /:project/folders/:id
Request
{
  "parent_folder": 3
}
Response
{
  "data": {
    "id": 5,
    "name": "Amsterdam",
    "parent_folder": 3
  }
}

Delete a Folder

Delete an existing folder

Parameters

project required

The project you're targetting.

id required

Unique identifier of the item.

Returns

Returns an empty body with HTTP status 204

Endpoint
DELETE /:project/folders/:id