Assets

Asset types

  • texts

  • images

  • videos

  • files

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

uuid

Unique identifier for the asset

name

string

Asset name

content

string

Asset content (URL for images/videos/files, text content for text assets)

description

string

Asset description (for video assets only)

usage

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)

  • description

  • usage

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