Assets
Asset types
textsimagesvideosfiles
asset_list
Retrieves a list of all available Assets.
Endpoint
GET /api/v1.5/assets/<asset_type>/
Response
{
"count": 15,
"next": null,
"previous": null,
"results": [
{
"uuid": "<uuid>",
"name": "Asset 1",
"content": "",
"description": "<for video assets only>",
"usage":"<for text assets only>",
},
{
"uuid": "<uuid>",
"name": "Asset 1",
"content": "",
"description": "<for video assets only>",
"usage":"<for text assets only>",
},
]
}
Response Fields
Field |
Type |
Description |
|---|---|---|
|
uuid |
Unique identifier for the asset |
|
string |
Asset name |
|
string |
Asset content (URL for images/videos/files, text content for text assets) |
|
string |
Asset description (for video assets only) |
|
string |
Usage context (for text assets only) |
asset_get
Retrieves the details of an Asset.
Endpoint
GET /api/v1.5/assets/<asset_type>/<asset_uuid>/
Response
{
"uuid": "<uuid>",
"name": "Asset 1",
"content": "",
"description": "<for video assets only>",
"usage":"<for text assets only>"
}
asset_create
Creates a new Asset.
Fields
name(required)content(required)descriptionusage
Endpoint
POST /api/v1.5/assets/<asset_type>/create/
Example Payload
{
"name": "Asset Name",
"content": "<base64 repr of the file or contents of the text asset>",
"description": "<for video assets only>",
"usage":"<for text assets only>"
}
Response
{
"uuid": "<uuid>",
"name": "Asset Name",
"content": "<base64 repr of the file or contents of the text asset>",
"description": "<for video assets only>",
"usage":"<for text assets only>"
}
Request Body’s values restrictions
Image asset usage’s value should be one of the following, otherwise it will return a 400 error
description
usage_recommendation
testing_methodology
about_ingredients
asset_delete
Delete an Asset.
Endpoint
DELETE /api/v1.5/assets/text/<asset_uuid>/delete/
Response
204