API reference / Collections

Collections

Named groups for organising assets.

GET /api/v1/collections/

List collections.

Response

Response 200 (application/json)
{
  "collections": [
    {
      "id": "string",
      "name": "string",
      "assetIds": [
        "string"
      ],
      "createdAt": "string",
      "updatedAt": "string"
    }
  ]
}

POST /api/v1/collections/

Create a collection.

Request

Request body (application/json)
{
  "name": "string"
}

Response

Response 201 (application/json)
{
  "id": "string",
  "name": "string",
  "assetIds": [
    "string"
  ],
  "createdAt": "string",
  "updatedAt": "string"
}

GET /api/v1/collections/{id}

Get a collection.

Parameters

NameInTypeRequired
idpathstringrequired

Response

Response 200 (application/json)
{
  "id": "string",
  "name": "string",
  "assetIds": [
    "string"
  ],
  "createdAt": "string",
  "updatedAt": "string",
  "assets": [
    {}
  ]
}

DELETE /api/v1/collections/{id}

Delete a collection.

Parameters

NameInTypeRequired
idpathstringrequired

Response

Response 204 (application/json)
"null"

PUT /api/v1/collections/{id}/assets/{assetId}

Add an asset to a collection.

Parameters

NameInTypeRequired
idpathstringrequired
assetIdpathstringrequired

Response

Response 200 (application/json)
{
  "id": "string",
  "name": "string",
  "assetIds": [
    "string"
  ],
  "createdAt": "string",
  "updatedAt": "string"
}

DELETE /api/v1/collections/{id}/assets/{assetId}

Remove an asset from a collection.

Parameters

NameInTypeRequired
idpathstringrequired
assetIdpathstringrequired

Response

Response 200 (application/json)
{
  "id": "string",
  "name": "string",
  "assetIds": [
    "string"
  ],
  "createdAt": "string",
  "updatedAt": "string"
}