Collections

List all collections in a specific drive

get

Get a listing of all the collections in the database

Query parameters
drive_idstring · uuidRequired

The id of the drive we want to get collections from

Responses
200

A list of all collections in the specified drive.

application/json
get
GET /collections?drive_id=123e4567-e89b-12d3-a456-426614174000 HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "invite_id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "description": "text",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "created_by": {
      "name": "text",
      "id": "123e4567-e89b-12d3-a456-426614174000"
    },
    "settings": {
      "card_size": 1,
      "thumbnail_view": "text",
      "view": "text",
      "metadata_attribute_ids": [
        "text"
      ]
    },
    "is_public_enabled": true,
    "allowed_actions": [
      "manage"
    ],
    "icon_type": "color",
    "icon": "text",
    "icon_attachment": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "drive_id": "123e4567-e89b-12d3-a456-426614174000",
      "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
      "uploaded": true,
      "name": "text",
      "mime_type": "text",
      "size": 1,
      "download_url": "text"
    },
    "background_image": "text",
    "background_image_attachment": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "drive_id": "123e4567-e89b-12d3-a456-426614174000",
      "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
      "uploaded": true,
      "name": "text",
      "mime_type": "text",
      "size": 1,
      "download_url": "text"
    },
    "preview_image": {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "frame": 1
    }
  }
]

Create a collection

post

Create a new user collection of assets

Body
namestringRequired

The name of the user collection to be created

descriptionstringOptional

The description of the user collection to be created

Default: ""
drive_idstring · uuidRequired

The id of the drive to create the collection in

Responses
200

The id of the created user collection

application/json
Responsestring · uuid
post
POST /collections HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 82

{
  "name": "text",
  "description": "",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000"
}
123e4567-e89b-12d3-a456-426614174000

Get a collection by its id

get

Get a collection by id

Path parameters
collection_idstring · uuidRequired
Responses
200

The collection

application/json
Responseany of
or
nullOptional
get
GET /collections/{collection_id} HTTP/1.1
Host: 
Accept: */*
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "invite_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": {
    "name": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "settings": {
    "card_size": 1,
    "thumbnail_view": "text",
    "view": "text",
    "metadata_attribute_ids": [
      "text"
    ]
  },
  "is_public_enabled": true,
  "allowed_actions": [
    "manage"
  ],
  "icon_type": "color",
  "icon": "text",
  "icon_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "background_image": "text",
  "background_image_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "preview_image": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "frame": 1
  },
  "num_assets": 1,
  "size": 1
}

Update a collection

put

Update a collection

Path parameters
collection_idstring · uuidRequired

The id of the collection to be updated

Body
nameany ofOptional

The new name for the collection

stringOptional
or
nullOptional
descriptionany ofOptional

The new description for the collection

stringOptional
or
nullOptional
is_public_enabledany ofOptional
booleanOptional
or
nullOptional
iconany ofOptional
stringOptional
or
nullOptional
icon_typeany ofOptional
string · enumOptionalPossible values:
or
nullOptional
allowed_actionsany ofOptional
or
nullOptional
background_imageany ofOptional
stringOptional
or
nullOptional
settingsany ofOptional
or
nullOptional
Responses
200

The updated collection

application/json
put
PUT /collections/{collection_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 249

{
  "name": "text",
  "description": "text",
  "is_public_enabled": true,
  "icon": "text",
  "icon_type": "color",
  "allowed_actions": [
    "manage"
  ],
  "background_image": "text",
  "settings": {
    "card_size": 1,
    "thumbnail_view": "text",
    "view": "text",
    "metadata_attribute_ids": [
      "text"
    ]
  }
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "invite_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": {
    "name": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "settings": {
    "card_size": 1,
    "thumbnail_view": "text",
    "view": "text",
    "metadata_attribute_ids": [
      "text"
    ]
  },
  "is_public_enabled": true,
  "allowed_actions": [
    "manage"
  ],
  "icon_type": "color",
  "icon": "text",
  "icon_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "background_image": "text",
  "background_image_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "preview_image": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "frame": 1
  }
}

Delete a collection

delete

Delete a collection

Path parameters
collection_idstring · uuidRequired

The id of the collection to be deleted

Responses
200

True if the collection was deleted, false if it was not found

application/json
Responseboolean
delete
DELETE /collections/{collection_id} HTTP/1.1
Host: 
Accept: */*
true

Add assets to a collection

post

Add assets to a collection, if they are in the same drive.

Path parameters
collection_idstring · uuidRequired

The id of the collection to add assets to

Body
asset_idsany ofOptional

The ids of the assets to add to the collection

Default: []
string · uuid[]Optional
or
nullOptional
directory_pathsany ofOptional

Add all assets under these paths to the collection

Default: []
string[]Optional
or
nullOptional
Responses
200

The updated collection

application/json
post
POST /collections/{collection_id}/assets HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 81

{
  "asset_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "directory_paths": [
    "text"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "invite_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": {
    "name": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "settings": {
    "card_size": 1,
    "thumbnail_view": "text",
    "view": "text",
    "metadata_attribute_ids": [
      "text"
    ]
  },
  "is_public_enabled": true,
  "allowed_actions": [
    "manage"
  ],
  "icon_type": "color",
  "icon": "text",
  "icon_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "background_image": "text",
  "background_image_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "preview_image": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "frame": 1
  }
}

Remove assets from a collection

delete

Remove assets from a collection

Path parameters
collection_idstring · uuidRequired

The id of the collection to remove a file from

Body
asset_idsstring · uuid[]Required

The ids of the assets to remove from the collection

Responses
200

Successful Response

application/json
delete
DELETE /collections/{collection_id}/assets HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 54

{
  "asset_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ]
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "invite_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "description": "text",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "created_by": {
    "name": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000"
  },
  "settings": {
    "card_size": 1,
    "thumbnail_view": "text",
    "view": "text",
    "metadata_attribute_ids": [
      "text"
    ]
  },
  "is_public_enabled": true,
  "allowed_actions": [
    "manage"
  ],
  "icon_type": "color",
  "icon": "text",
  "icon_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "background_image": "text",
  "background_image_attachment": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "drive_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
    "uploaded": true,
    "name": "text",
    "mime_type": "text",
    "size": 1,
    "download_url": "text"
  },
  "preview_image": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "frame": 1
  }
}

Start the upload process for a collection attachment

post

Start the upload process for a collection attachment

Path parameters
collection_idstring · uuidRequired

The id of the collection to create the attachment for

Body
drive_idstring · uuidRequired

The id of the drive to create the attachment for

namestringRequired

The name of the attachment to be created

mime_typestringRequired

The mime type of the attachment to be created

sizeintegerRequired

The size of the attachment to be created

upload_forstring · enumRequired

What the upload is for ('icon' or 'background')

Possible values:
Responses
200

The id of the created user collection

application/json
post
POST /collections/{collection_id}/attachments HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 113

{
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "text",
  "mime_type": "text",
  "size": 1,
  "upload_for": "icon"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploaded": true,
  "name": "text",
  "mime_type": "text",
  "size": 1,
  "upload_url": "text"
}

Mark the upload of a collection attachment as complete

post

Mark the upload of a collection attachment as complete

Path parameters
collection_idstring · uuidRequired

The id of the collection to mark the attachment uploaded for

attachment_idstring · uuidRequired

The id of the attachment to mark as uploaded

Body
drive_idstring · uuidRequired

The id of the drive to mark the attachment uploaded for

Responses
200

Successful Response

application/json
post
POST /collections/{collection_id}/attachments/{attachment_id} HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 51

{
  "drive_id": "123e4567-e89b-12d3-a456-426614174000"
}
{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "drive_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploader_id": "123e4567-e89b-12d3-a456-426614174000",
  "uploaded": true,
  "name": "text",
  "mime_type": "text",
  "size": 1,
  "download_url": "text"
}