Skip to content

Assets

The assets API provides functionality for uploading and removing assets (images and fonts) in your account.

Uploads an asset file. For images, only PNG and JPEG files are currently supported. For fonts, TTF and OTF are supported.

https://api.astradoc.io/assets/v1.0/create
POST
PropertyTypeRequiredDescription
nameStringYesThe name of the asset, usually the file name. Names longer than 64 characters will be truncated.
dataStringYesBase64 string containing the serialized file data.
projectIdGuidNoThe Id of project this asset should be assigned to. This is optional.
typeIntegerYesThe asset type the API can expect this file to be. See the table below for the valid asset type values.
ValueType
1PNG Image
2JPEG Image
3TTF Font
4OTF Font
PropertyTypeDescription
SuccessBoolA Boolean indicating whether or not the request was successful.
MessageStringA message containing error information if the request was unsuccessful.
DataGuidThe Id for the asset.

Removes an asset from your account.

https://api.astradoc.io/assets/v1.0/delete?assetId={id}
DELETE
PropertyTypeRequiredDescription
idGuidYesThe Id of the asset to delete. This Id would have been returned by the Create Asset API.
PropertyTypeDescription
SuccessBoolA Boolean indicating whether or not the request was successful.
MessageStringA message containing error information if the request was unsuccessful.
DataBoolA Boolean indicating whether or not the asset was deleted.