Add
client.collections.models.add(stringcollectionID, ModelAddParams { modelIds } body, RequestOptionsoptions?): ModelAddResponse { collection }
PUT/collections/{collectionId}/models
Add
import Scenario from '@scenario-labs/sdk';
const client = new Scenario({
apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});
const response = await client.collections.models.add('collectionId', { modelIds: ['string'] });
console.log(response.collection);{
"collection": {
"id": "id",
"assetCount": 0,
"createdAt": "createdAt",
"itemCount": 0,
"modelCount": 0,
"name": "name",
"ownerId": "ownerId",
"updatedAt": "updatedAt",
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
}Returns Examples
{
"collection": {
"id": "id",
"assetCount": 0,
"createdAt": "createdAt",
"itemCount": 0,
"modelCount": 0,
"name": "name",
"ownerId": "ownerId",
"updatedAt": "updatedAt",
"thumbnail": {
"assetId": "assetId",
"url": "url"
}
}
}