Create Collection
POST/api/v1/assetcollection
Create
Create a new Asset Collection
Note: A collection can have a maximum of 300 assets.
REQUEST PARAMETERS
| Parameter | Type | Description |
|---|---|---|
name | string | Collection name. Defaults Collection {timestamp} |
assets | JSON | List of asset ids. Defaults to empty list |
description | string | (optional) Collection description. Defaults to empty string |
group_access | boolean | (optional) true or false. Defaults to false |
REQUEST JSON
{ "name": "Test Collection",
"assets": ["b3ad7854e1ad4ce8a8c83272447f980b","caf2b5f2e80a40729e32489ee65ef0d8"]
}
HTTP RESPONSE
Collection in Asset Collection JSON format
Duplicate
Duplicate an Asset Collection
Include Source Collection id source_id to duplicate
REQUEST PARAMETERS
| Parameter | Type | Description |
|---|---|---|
source_id | number | Source Collection id to duplicate |
name | string | (optional) Collection name. Defaults to Source Collection Name formatted as Copy of {Source Collection Name} @ {timestamp} |
description | string | (optional) Collection description. Defaults to source collection description |
group_access | boolean | (optional) true or false. Defaults to false |
REQUEST JSON
{
"source_id": 1,
"name": "My Collection",
"description": "a description",
"group_access": false
}
HTTP RESPONSE
Collection in Asset Collection JSON format.
Retrying safely
Send an Idempotency-Key header so that retrying after a lost response returns the first collection instead of creating a second one. Without the header the request behaves as before. See Retries and conflicts.
Request
Responses
- 200
- 400
- 401
- 403
- 409
- 422
- 500
Successful operation
Response Headers
true when this response is the stored result of an earlier request with the same Idempotency-Key; the request did not run again. Absent otherwise.
Bad request - Invalid inputs, or a malformed Idempotency-Key (invalid_idempotency_key) or Idempotency-Window (invalid_idempotency_window, not a whole number of seconds)
Unauthorized - Invalid or missing authentication
Forbidden - Insufficient permissions
A request with this Idempotency-Key is still running. Nothing was done; retry with the same key shortly to get its result.
This Idempotency-Key was already used with a different request body. Nothing was done; use a new key for a new request.
Internal server error