# Assets ## Add **put** `/collections/{collectionId}/assets` Add assets to a specific collection ### Path Parameters - `collectionId: string` ### Body Parameters - `assetIds: array of string` The ids of the assets to add to the collection. (Max 49 at once) ### Returns - `collection: object { id, assetCount, createdAt, 6 more }` - `id: string` The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") - `assetCount: number` - `createdAt: string` The collection creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `itemCount: number` - `modelCount: number` - `name: string` The collection name - `ownerId: string` The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") - `updatedAt: string` The collection last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `thumbnail: optional object { assetId, url }` The thumbnail for the collection (if any) - `assetId: string` - `url: string` ### Example ```http curl https://api.cloud.scenario.com/v1/collections/$COLLECTION_ID/assets \ -X PUT \ -H 'Content-Type: application/json' \ -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \ -d '{ "assetIds": [ "string" ] }' ``` #### Response ```json { "collection": { "id": "id", "assetCount": 0, "createdAt": "createdAt", "itemCount": 0, "modelCount": 0, "name": "name", "ownerId": "ownerId", "updatedAt": "updatedAt", "thumbnail": { "assetId": "assetId", "url": "url" } } } ``` ## Remove **delete** `/collections/{collectionId}/assets` Remove assets from a specific collection ### Path Parameters - `collectionId: string` ### Body Parameters - `assetIds: array of string` The ids of the assets to remove from the collection. (Max 49 at once) ### Returns - `collection: object { id, assetCount, createdAt, 6 more }` - `id: string` The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") - `assetCount: number` - `createdAt: string` The collection creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `itemCount: number` - `modelCount: number` - `name: string` The collection name - `ownerId: string` The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") - `updatedAt: string` The collection last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `thumbnail: optional object { assetId, url }` The thumbnail for the collection (if any) - `assetId: string` - `url: string` ### Example ```http curl https://api.cloud.scenario.com/v1/collections/$COLLECTION_ID/assets \ -X DELETE \ -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" ``` #### Response ```json { "collection": { "id": "id", "assetCount": 0, "createdAt": "createdAt", "itemCount": 0, "modelCount": 0, "name": "name", "ownerId": "ownerId", "updatedAt": "updatedAt", "thumbnail": { "assetId": "assetId", "url": "url" } } } ``` ## Domain Types ### Asset Add Response - `AssetAddResponse object { collection }` - `collection: object { id, assetCount, createdAt, 6 more }` - `id: string` The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") - `assetCount: number` - `createdAt: string` The collection creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `itemCount: number` - `modelCount: number` - `name: string` The collection name - `ownerId: string` The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") - `updatedAt: string` The collection last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `thumbnail: optional object { assetId, url }` The thumbnail for the collection (if any) - `assetId: string` - `url: string` ### Asset Remove Response - `AssetRemoveResponse object { collection }` - `collection: object { id, assetCount, createdAt, 6 more }` - `id: string` The collection ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw") - `assetCount: number` - `createdAt: string` The collection creation date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `itemCount: number` - `modelCount: number` - `name: string` The collection name - `ownerId: string` The owner ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea") - `updatedAt: string` The collection last update date as an ISO string (example: "2023-02-03T11:19:41.579Z") - `thumbnail: optional object { assetId, url }` The thumbnail for the collection (if any) - `assetId: string` - `url: string`