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 Workspace 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.

Parameters
filesMetadata
array of objects required
Object array in JSON string
filesMetadata object properties
attachedFileName
string
Name of asset
originalFileName
string
Name of uploaded multipart file
files
multipart/formdata file required
Array of multipart file objects
Formdata Sample
------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="files"; filename="example.jpg"
Content-Type: image/jpeg

------WebKitFormBoundaryAofpaWXja6BTaYQ9
Content-Disposition: form-data; name="filesMetadata"

[{"attachedFileName":"example.jpg","originalFileName":"example.jpg"}]
------WebKitFormBoundaryAofpaWXja6BTaYQ9--
Response 200
{
"success": true,
"data": {
"example.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."
}