Skip to main content

Assets API

Overview

The Assets API allows you to add assets to the system such as images and PDF files. This page covers the common endpoints and methods associated with the Assets API.

Authentication

Use the following header parameters for all requests:

Headers
Authentication
string required
Authentication bearer token
See Authentication Guide
X-IAA-OW-ID
integer required
Organization Worskpace ID Header

Assets Details

Get a List of All Assets

GET /api/v3/asset/list
Properties
id
integer
Asset ID
storagePath
string
File path of asset
cdnUrl
string
URL of asset
created
integer
Unix epoch timestamp of asset creation, in milliseconds
modifiedDate
string
Date asset modified
disposable
boolean
Indicates whether asset is temporary and can be purged (true), default: true
Response 200
{
"success": true,
"data": [
{
"id": 1,
"storagePath": "assets/201427/tfteBYO_1704204958735.jpg",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/tfteBYO_1704204958735.jpg",
"created": 1704204961147,
"modifiedDate": "2024-01-02T14:16:08.726+0000",
"disposable": false
},
{
"id": 2,
"storagePath": "assets/201427/b7c0tTw_1704204968864.jpg",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/b7c0tTw_1704204968864.jpg",
"created": 1704204971010,
"modifiedDate": "2024-01-02T14:16:11.375+0000",
"disposable": false
},
{
"id": 3,
"storagePath": "assets/201427/2mBGamD_1704205759807.jpg",
"cdnUrl": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/2mBGamD_1704205759807.jpg",
"created": 1704205761106,
"modifiedDate": "2024-01-02T08:59:21.508+0000",
"disposable": false
}
]
}

Get Asset Details

GET /api/v3/asset/{assetId}

Get properties of a single asset by ID

Path Parameters
assetId
integer
Asset ID
Response 200
{
"success": true,
"data": {
"id": 1,
"storagePath": "new/path/to/asset.jpg",
"cdnUrl": "https://cdn.example.com/new_asset.jpg",
"created": 1704204961147,
"modifiedDate": "2024-01-18T06:03:23.823+0000",
"disposable": true
}
}

Assets Management

Add Multiple Assets

POST /api/v3/asset

Add multiple assets to the system. Request accepts an array of multipart file objects and their corresponding metadata.

Request Schema
filesMetaData
integer
JSON string representing the metadata associated with the files
files
string
Files to add
Response 200
{
"success": true,
"data": {
"9d41a99a-9761-44cf-a3db-307a57b65795.jpg": {
"assetID": 697,
"assetCDNURL": "https://d3jme5si7t6llb.cloudfront.net/assets/201427/IHp2jMI_1704987233847.jpg"
}
}
}

Update Asset Details

PATCH /api/v3/asset/{assetId}

Update the details of an existing asset by ID

Path Parameters
assetId
integer
Asset ID
Request Schema
storagePath
string
File path of asset
cdnUrl
string
Asset CDN URL
disposable
boolean
Indicates whether asset is temporary and can be purged (true), default: true
Request Sample
{
"storagePath": "string",
"cdnUrl": "string",
"disposable": true
}
Response 200
{
"success": true,
"data": {
"statusCode": 200,
"responseObject": {
"message": "Asset updated successfully"
}
}
}

Delete Asset

DELETE /api/v3/asset/{assetId}

Delete single asset by ID

Path Parameters
assetId
integer
Asset ID
Response 200
{
"success": true,
"data": "Asset deleted successfully."
}