The Asset Data Type The Asset Data Type

The Asset Data Type

Adam Evans Adam Evans

Asset is a data type used to refer to a file asset. This file can be of any type like a text file, a zip file, or even an image. The Asset Data Type represents the file in your application. You can create Assets that are global to your application in Media Library. You can also create assets through Data Flows in Connection Builder.

 

The Asset Data Type has the following properties:

 

Id

This is the unique identifier of this asset. It is a UUID string.

 

AssetKey

Use the assetKey is used to distinguish which version of the asset you want to use. It is the branch id of where the asset is stored.

 

OrganizationId

Assets are scoped to organizations. This id represents the Organization Id for which the Asset belongs to.

 

DisplayName

This is the filename of the Asset like "textfile.txt" or "myimage.jpg".

 

Description

This is currently an unused property on asset.

 

Type

This refers the MIME type of the asset. It can be text, image, or any other valid type. Here is a table of supported data types.

Mime Type Type of Data
image/jpeg Jpeg Image
image/png PNG Image
application/pdf PDF
image/svg+xml An SVG XML file
image/gif GIF image
audio/mpeg MPEG Audio data
audio/mp3 An MP3 file
audio/wav WAV audio file
video/mp4

MP4 Video file

text/html

HTML file

application/zip

Compressed Zip file

application/pgp-encrypted

First part of PGP encrypted data, body

application/vnd.ms-excel

Microsoft Excel file

application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

Microsoft Excel (OpenXML)

font/otf

OpenType font

font/ttf

TrueType Font

font/woff

Web Open Font Format (WOFF)

font/woff2

Web Open Font Format (WOFF)

 

Size

This is the size of the asset in bytes. The maximum limit is 10 megabytes.

 

Version

When making updates to an Asset we will modify the version number. This indicates which version of the asset we are referring to.

 

Expiration

This property is only valid on Assets with a visibility of type Private. This number refers the to the number of milliseconds that the asset still has before expiration. This value is updated each time the download link is fetched.

 

Visibility

Can be either GLOBAL or PRIVATE. Global assets are available on the CDN with a static link. Private visibility requires a generated link.

 

State

Refers to the state of the Data. Available options are DRAFTPENDING, or ACTIVE.

DRAFT means the asset has been declared but hasn't been fully received yet.

PENDING is the state after the Asset has been fully received, but the server side processing is not yet finished.

ACTIVE is a fully queryable asset.

 

Scope

It can have a value of APP, in which case it is tied to the application and be accessed by any instance, or SESSION which means that asset is tied to the user session. In practice, the current implementation of the product has very little difference between these two values. Long term this may change. If an asset has personal info, it is probably best to ensure the scope is SESSION and if the asset should be accessible to anyone through the Media Library, it should be set to APP.

 

Region

This is only relevant to Public assets. This region specifies where the asset should be available for public CDNs.

 

CreatedTime

Timestamp indicating when the asset was created.

 

ModifiedTime

Timestamp of the last modification of the asset.

 

DeletedTime

If the Asset has been deleted, this is the is the timestamp of the deletion time.

 

ValidationErrors

This message is text generated by Airkit to display errors with creation of Assets, for various reasons like size issues, viruses, and invalid kinds.

 

ExtraInfo

This is an object of the Any Data Type. This is used by some integrations to store information about the creation of an Asset. You can write to it to store extra information on your Asset. 

 

DownloadUrl

A text value representing a URL for downloading this asset.

 

ThumbnailUrl

A text value representing the URL for an Asset's thumbnail if it has one.