PRODUCT
Follow

Overview

This entity represents the asset resource properties. This article includes the available methods for the asset resource.

There are three asset entity concepts in the creative API:

  • Asset: Complete asset representation, including media file and the wrapping-ingested metadata.
  • Asset file: Media file that is the core of the asset (for example, the actual image or video of the asset).
  • Asset folder: Logical container of the assets (for example, all assets related to a specific campaign) or a container of a workspace (asset type with a logic unit, like a JS file).

The API supports the following asset types:

  • Images: jpeg, gif, png
  • Videos: mp4, avi, wmv, mpeg, mp3, flv, f4v, swf, fla, xfl
  • Text: xml, pdf, txt
  • Flash: swf
  • HTML5 workspace zip files: Contains HTML5 workspace creative assets

    Note: The workspace must contain a main HTML file in the root folder.

  • Web resources: HTML, JavascriptCSS 

Asset Resource

Asset Body Representation example

{
        "type": "Asset",
        "id": "<Auto Generated ID>",
        "relationsBag": null,
        "uiPermissions": null,
        "version": "<Auto Generated ID>",
        "createdBy": "<Auto Generated ID>",
        "createdByName": "testUser",
        "createdByAccount": "<Auto Generated ID>",
        "createdByAccountName": "testAccount",
        "createdOn": "<Auto Generated ID>",
        "lastUpdatedBy": "<Auto Generated ID>",
        "lastUpdatedByName": "testUser",
        "lastUpdatedByAccount": "<Auto Generated ID>",
        "lastUpdatedByAccountName": "testAccount",
        "lastUpdateOn": "<Auto Generated ID>",
        "assetId": "<Auto Generated ID>",
        "parentAssetId": null,
        "parentSourceSystem": null,
        "assetType": "source",
        "mediaType": "IMAGE",
        "mimeType": "image/jpeg",
        "storagePath": null,
        "publishHostName": "http://resources-dev-sizmek.s3.amazonaws.com/",
        "publishPath": "PROD/asset/1073742043/IMAGE/20160320/example_18776651376623616.jpg",
        "fileName": "example_18776651376623616.jpg",
        "status": "Available",
        "mpsVariantId": null,
        "mpsJobId": null,
        "createUserId": null,
        "modifyUserId": null,
        "createDateTime": null,
        "modifyDateTime": null,
        "ingestDateTime": null,
        "assetData": null,
        "currentVersion": null,
        "versionNumber": 0,
        "previousVersionAssetID": null,
        "assetCode": "example.jpg",
        "codeType": null,
        "title": "example.jpg",
        "metaSchemaId": null,
        "sourceSystemAssetId": null,
        "sourceSystem": null,
        "businessMetadata": {
            "accountId": ""<Auto Generated ID>"",
            "displayName": "example.jpg",
            "userId": ""<Auto Generated ID>"",
            "folderId": ""<Auto Generated ID>""
        },
        "previousVersion": null,
        "formatContext": {
            "audioStreamCount": null,
            "bitRate": null,
            "decodingFailed": null,
            "duration": null,
            "fileSize": 6942,
            "format": "jpg",
            "streamCount": null,
            "videoStreamCount": null,
            "compressedFileSize": 6942
        },
        "audioStreamContext": null,
        "videoStreamContext": null,
        "swfContext": null,
        "htmlContext": null,
        "jsContext": null,
        "extendedAdProperties": null,
        "imageContext": {
            "width": 225,
            "height": 225,
            "dataPrecision": null,
            "compressionType": null,
            "extendedProperties": null
        },
        "thumbnails": [
            {
                "id": null,
                "width": null,
                "height": null,
                "master": null,
                "name": null,
                "imageFormat": null,
                "url": "http://resources-dev-sizmdx.s3.amazonaws.com/PROD/asset/1073742043/IMAGE/20160320/example_18776651376623616.jpg"
            }
        ],
        "relatedProxies": null,
        "width": 225,
        "height": 225,
        "archiveManifest": []
    }
}

Asset Properties 

Field

Data Type

Limitations

Description 

Included in Asset Type 

formatContext.audioStreamCount

Integer

Read-only

Number of audio streams in video.

Video

formatContext.bitRate

Integer

Read-only Video bitrate

Video

businessMetadata.accountId

businessMetadata.folderId

businessMetadata.userId

String

Read-only

Exposes business display metadata

 

formatContext.compresedFileSize

Integer

Read-only

Estimated file size after compression

Video, Image

createdBy

Long

Read-only

ID of the user that created the asset

 

createdByAccount

Long

Read-only

ID of the account that created the asset

 

createdByAccountName

String

Read-only

Name of the account that created the asset

 

createdByName

String

Read-only

Name of the user that created the asset

 

createdOn

Long

Read-only

Date of creation (Date epoch)

 

businessMetadata.displayName

String

 

Asset display name in the platform

All file types

formatContext.duration

Integer

Read-only

Video duration

Video

fileName

String

Read-only

Asset file name - Internal field

 

formatContext.fileSize

String

Read-only

Size of the asset file in bytes

Video, Image

formatContext.format

String

Read-only

File format - auto-detected

Video, Image

imageContext.height

Integer

Read-only

Height of asset

Image

id 

Long

Mandatory

ID of asset. Read-only parameter, auto-generated. 

 

thumbnails.imageFormat

String

Read-only

Image format of the thumbnail file

Video

lastUpdatedBy

Long

Read-only

ID of the user that was last to update the asset

 

lastUpdatedByAccount

Long

Read-only

ID of the account that was last to update the asset

 

lastUpdatedByAccountName

String

Read-only

Name of the account that last updated the asset

 

lastUpdatedByName

String

Read-only

Name of the user that last updated the asset

 

lastUpdateOn

Long

Read-only

Date of last update (Date epoch)

 

mediaType

String (MediaType Enum)

Read-only

Type of asset media (for example, IMAGE)

 

mimeType

String

Read-only

Media type MIME Type definition

 

thumbnails.name

String

Read-only

Name of the thumbnail file

 

publishHostName

String

Read-only

Asset media file location path

 

publishPath

String

Read-only

Specific location of file in storage 

 

status

String

Read-only

Indicates if media file is available

 

title

String

Read-only

File display name - Internal field

Video

type

String

Read-only

Type of asset entity. Options include:

  • Asset
  • Asset Folder

 

thumbnails.url

String

Read-only

URL for the asset

Video, Image

imageContext.width

Integer

Read-only

Width of asset

Image

 

Asset Folder Resource

Asset Folder Body Representation example

{
"type": "AssetFolder",
        "id": "<Auto Generated ID>",
        "clientRefId": null,
        "relationsBag": null,
        "uiPermissions": null,
        "version": "<Auto Generated ID>",
        "createdBy": "<Auto Generated ID>",
        "createdByName": "testUser",
        "createdByAccount": "<Auto Generated ID>",
        "createdByAccountName": "testAccount",
        "createdOn": "<Auto Generated ID>",
        "lastUpdatedBy": "<Auto Generated ID>",
        "lastUpdatedByName": "testUser",
        "lastUpdatedByAccount": "<Auto Generated ID>",
        "lastUpdatedByAccountName": "testAccount",
        "lastUpdateOn": "<Auto Generated ID>",
        "folderType": "DEFAULT",
        "name": "folderSample",
        "parentId": "<Auto Generated ID>",
        "rootParentId": null,
        "folders": 3,
        "files": 4,
        "sourceType": "DEFAULT",
        "publishHostName": null,
        "publishPath": null,
        "folderPath": null
    }

Asset Folder Properties 

Field Data Type Limitations Description 
type String Mandatory Type of asset entity
name String Mandatory Name of the asset
id  Long Mandatory ID of asset. read-only parameter, auto-generated. 
createdBy Long Read-only ID of the user that created the asset
createdByName String Read-only Name of the user that created the asset
createdByAccount Long Read-only ID of the account that created the asset
createdByAccountName String Read-only Name of the account that created the asset
createdOn Long Read-only Date of creation (Date epoch)
lastUpdatedBy Long Read-only ID of the user that was last to update the asset
lastUpdatedByName String Read-only Name of the user that was last to update the asset
lastUpdatedByAccount Long Read-only ID of the account that was last to update the asset
lastUpdatedByAccountName String Read-only Name of the account that last updated the folder
lastUpdateOn Long Read-only Date of last update (Date epoch)
publishHostName String Read-only Asset media file location path
publishPath String Read-only Specific location of file in storage 
folderPath String Read-only Specific location of folder  
sourceType String (enum) Read-only  
rootParentId Integer Mandatory Root folder id of the folder
parentId Integer Mandatory Parent folder id
folderType String (enum) Read-only  

Methods

Assets/Asset Files

Manage asset entities

Description

Retrieves a specific asset by ID.

Request Example
GET https://api.sizmek.com/rest/assets/123
Parameters
Name  Type  Parameter Type  Description 
ID Long  Path  ID of asset to fetch 
Response Example

If request is successful, response will be 200 OK and the requested asset resource in the response body.

Description

Retrieves a list of assets according to an assets filter. Can be filtered.

Request Example
GET https://api.sizmek.com/rest/assets?from=0&max=250

Important: Currently requested is limited at a max 250 items pagination limit.

Parameters
Name  Type  Parameter Type  Description 
mediaType Integer Query Type of assets media.
folderId Integer Query Specific folder id where asset is currently located.
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
sort String Query Sort by field name (For more information, click here.)
order String Query Sort order ASC or DESC, required if sort field name is specified (For more information, click here.)
name String Query Asset name
Response Example

If request is successful, response will be 200 OK with the response body:

 
{
"metadata":{
"total": 9878
},
"error": null,
"result":[
{"type": "Asset", "id": 2073742914, "clientRefId": null, "relationsBag": null,…},
{"type": "Asset", "id": 2073742913, "clientRefId": null, "relationsBag": null,…}, ] }
Description

Updates the name and parentId properties of the specified existing asset.

Enables only to rename an asset or move an asset to different folder. To update asset attributes, use businessMetadata.name and businessMetadata.folderid.

Note:You can't move an asset from a workspace.

{ 
"metadata": null, "debug": null, "error": null, "result": { "type": "Asset", "id": "<Auto Generated ID>", "clientRefId": null, "relationsBag": null, "uiPermissions": [ { "id": "<Auto Generated ID>", "name": "EditAccountBasic" }, { "id": "<Auto Generated ID>", "name": "DuplicateAd" }, { "id": "<Auto Generated ID>", "name": "UsersCreateEditBasic" }, { "id": "<Auto Generated ID>", "name": "SwitchAccount" }, { "id": "<Auto Generated ID>", "name": "ViewPlacementCost" }, { "id": "<Auto Generated ID>", "name": "DeleteAd" }, { "id": "<Auto Generated ID>", "name": "DeleteAsset" }, { "id": "<Auto Generated ID>", "name": "EditPublishedAd" }, { "id": "<Auto Generated ID>", "name": "CampaignsCreateEdit" }, { "id": "<Auto Generated ID>", "name": "CampaignsViewFull" }, { "id": "<Auto Generated ID>", "name": "AttachAdAndDGToPlacement" }, { "id": "<Auto Generated ID>", "name": "CreateAndEditAdvertiserAndBrand" }, { "id": "<Auto Generated ID>", "name": "ViewAccount" }, { "id": "<Auto Generated ID>", "name": "EditAccountAdvanced" }, { "id": "<Auto Generated ID>", "name": "CreateOrEditAd" }, { "id": "<Auto Generated ID>", "name": "EditSite" }, { "id": "<Auto Generated ID>", "name": "ViewUserPermissions" }, { "id": "<Auto Generated ID>", "name": "UpdateDeleteAdTemplate" }, { "id": "<Auto Generated ID>", "name": "ViewDeliveryGroup" }, { "id": "<Auto Generated ID>", "name": "UsersCreateEditAdvanced" }, { "id": "<Auto Generated ID>", "name": "CampaignsViewBasicCreative" }, { "id": "<Auto Generated ID>", "name": "EditDeliveryGroup" }, { "id": "<Auto Generated ID>", "name": "CampaignsViewBasicSite" }, { "id": "<Auto Generated ID>", "name": "EditUserPermissions" }, { "id": "<Auto Generated ID>", "name": "SubmitAdToQA" } ], "version": "<Auto Generated ID>", "createdBy": "<Auto Generated ID>", "createdByName": ""<Auto Generated ID>"", "createdByAccount": "<Auto Generated ID>", "createdByAccountName": ""<Auto Generated ID>"", "createdOn": "<Auto Generated ID>", "lastUpdatedBy": "<Auto Generated ID>", "lastUpdatedByName": ""<Auto Generated ID>"", "lastUpdatedByAccount": "<Auto Generated ID>", "lastUpdatedByAccountName": ""<Auto Generated ID>"", "lastUpdateOn": "<Auto Generated ID>", "assetId": "<Auto Generated ID>", "parentAssetId": null, "parentSourceSystem": null, "assetType": "source", "mediaType": "IMAGE", "mimeType": "image/png", "storagePath": null, "publishHostName": "http://resources-prod-sizmdx.s3.amazonaws.com/", "publishPath": "PROD/asset/30971/IMAGE/20160406/Pinguin_19169675521821299.png", "fileName": "Pinguin_19169675521821299.png", "status": "Available", "mpsVariantId": null, "mpsJobId": null, "createUserId": null, "modifyUserId": null, "createDateTime": null, "modifyDateTime": null, "ingestDateTime": null, "assetData": null, "currentVersion": null, "versionNumber": 0, "previousVersionAssetID": null, "assetCode": "Pinguin.png", "codeType": null, "title": "Pinguin.png", "metaSchemaId": null, "sourceSystemAssetId": null, "sourceSystem": null, "businessMetadata": { "accountId": "30971", "displayName": "Pinguin.png", "userId": ""<Auto Generated ID>"", "folderId": ""<Auto Generated ID>"" }, "previousVersion": null, "formatContext": { "audioStreamCount": null, "bitRate": null, "decodingFailed": null, "duration": null, "fileSize": 9844, "format": "png", "streamCount": null, "videoStreamCount": null, "compressedFileSize": 9844 }, "audioStreamContext": null, "videoStreamContext": null, "swfContext": null, "htmlContext": null, "jsContext": null, "extendedAdProperties": null, "imageContext": { "width": 200, "height": 200, "dataPrecision": null, "compressionType": null, "extendedProperties": null }, "thumbnails": [ { "id": null, "width": null, "height": null, "master": null, "name": null, "imageFormat": null, "url": "http://resources-prod-sizmdx.s3.amazonaws.com/PROD/asset/30971/IMAGE/20160406/Pinguin_19169675521821299.png" } ], "relatedProxies": null, "width": 200, "height": 200, "archiveManifest": [ ] } }
Request example
PUT https://api.sizmek.com/rest/assets/1234
Parameters
Name  Type  Parameter Type  Description 
id  Long  Path  ID of asset to update
Body    Body UI request containing asset to update
Response Example

If request is successful, response will be 200 OK with the updated asset resource in the response body.

Description

Updates an existing asset file.

Request example
PUT https://api.sizmek.com/rest/assets/files/1234
Parameters
Name  Type  Parameter Type  Description 
id  Long  Path  ID of asset to update
Body    Body UI request containing a file to update
Response Example

If request is successful, response will be 200 OK with the updated asset resource in the response body.

Description

Deletes an existing asset. You can't delete an asset assigned to an ad.

Request Example
DELETE https://api.sizmek.com/rest/assets/1234
Parameters
Name  Type  Parameter Type  Description 
ID  Long  Path  ID of asset to delete
Response Example

If request is successful, response will be 200 OK and the Asset ID that was deleted in the result.

Description

Uploads a file and creates a new asset.

Note: Acceptable files include image, HTML, video, JavaScript, audio, text, font and  workspace.

Request Example
POST https://api.sizmek.com/rest/assets/files/<folder_id>
Parameters
Name  Type  Parameter Type  Description 
File     An asset is created based on an uploaded file
Response Example

If request is successful, response will be 200 OK with the created asset resource in the response body.

Description

Searches for an asset.

Request Example

Note: Add from and max parameters to move through the result batches. A maximum of 250 records is permitted.

  • Search by name:
    GET https://api.sizmek.com/rest/assets?name=asset1&from=0&max=250
  • Search by parent folder:
    GET https://api.sizmek.com/rest/assets?folderID=folder1&from=0&max=250
  • Search by video media recursively under folder:
    GET https://api.sizmek.com/rest/assets?parentID=parentfolder1&mediaType=VIDEO&recursiveSearch=true&from=0&max=250
Parameters
Name  Type  Parameter Type  Description 
Name      
folderId      
mediaType      
recursiveSearch      
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK with the created asset resource in the response body.

Asset Folders

Manage asset folders

Description

Get asset folder by ID.

Request example
GET https://api.sizmek.com/rest/assets/folders/123 
Parameters 
Name  Type  Parameter Type  Description 
Id  Long  Path Id of asset folder to fetch
Response Example

If request is successful, response will be 200 OK with the created asset folder resource in the response body.

Description

Retrieves a list of asset folders according to an asset folder filter. Can be filtered.

Name  Type  Parameter Type  Description 
folderName String Query Folder name
parentId Integer Query Specific folder id where folder is currently located.
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
sort String Query Sort by field name (For more information, click here.)
order String Query Sort order ASC or DESC, required if sort field name is specified (For more information, click here.)
rootParentId Integer Query Root folder ID for folders which are part of a workspace
folderType Enum Query Type of folder to filter with: DEFAULT, HTML5, FTP_INGEST

Request example

GET https://api.sizmek.com/rest/assets/folders?parentId=123
Response Example

If request is successful, response will be 200 OK with a list of asset folder resources in the response body.

Description

Create a new asset folder.

Request example
POST https://api.sizmek.com/rest/assets/folders
Parameters
Name  Type  Parameter Type  Description 
Body    Body UI request containing the asset folder to create
Minimal body example: 

{
    "entities": [
        {
            "type": "AssetFolder",
            "name": "folder name",
            "folderType": "DEFAULT",
            "parentId": "<Auto Generated ID>",     //parent folder id
            "rootParentId": "<Auto Generated ID>"  //account root folder id
        }
    ]
}

Response Example

If request is successful, response will be 200 OK with the created folder representation.

Description

Update an existing assets folder. Includes Move ("parentId" parameter) and Rename ("name" parameter).

To update you'll need to wrap the body with the Entities wrapper, the body needs to include only the Mandatory parameters. 

Request example

PUT https://api.sizmek.com/rest/assets/folders/1
Body example:
{
    "entities": [{
        "type": "AssetFolder",
        "id": 12345678,
        "folderType": "DEFAULT",
        "name": "New Name",
        "parentId": "<Auto Generated ID>",
        "sourceType": "DEFAULT"
    }]
}
Parameters
Name  Type  Parameter Type  Description 
id  Long  Path  ID of asset folder to update
Body    Body UI request containing the asset folder to update
Response Example

If request is successful, response will be 200 OK with the updated asset folder resource in the response body.

Description

Searches for an asset folder.

Request Example

Note: Add from and max parameters to move through the result batches. A maximum of 250 records is permitted.

  • Search for a folder with a specific name:
    GET https://api.sizmek.com/rest/assets/folders?name=asset1&from=0&max=250
  • Search for folders under a parent folder:
    GET https://api.sizmek.com/rest/assets/folders?folderID=folder1&from=0&max=250
Parameters
Name  Type  Parameter Type  Description 
folderName      
parentId      
rootParentId      
folderType      
sourceType      
from Integer Query Starting index to fetch new accounts by for paging purpose
max Integer Query Maximum accounts to fetch each paging
Response Example

If request is successful, response will be 200 OK with the created asset resource in the response body.

Description

Delete an existing asset folder. You can't delete a folder containing assets assigned to an ad.

Request example
DELETE https://api.sizmek.com/rest/assets/folders/123
Response Example

If request is successful, response will be 200 OK. with the deleted folder id.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk