Skip to content
Get started

Request

POST/assets/{assetId}/download

Request a link to download the given assetId in the given targetFormat

Path ParametersExpand Collapse
assetId: string
Query ParametersExpand Collapse
projectId: optional string

The projectId used for ownership resource management. Either to assert ownership or to set the owner of the resource(s)

Body ParametersJSONExpand Collapse
targetFormat: optional "gif" or "heif" or "jpeg" or 12 more

The format to download the asset in. If omitted, the original file is returned. Audio and video assets only accept their stored format.

One of the following:
"gif"
"heif"
"jpeg"
"jpg"
"png"
"svg"
"webp"
"avif"
"tif"
"tiff"
"glb"
"fbx"
"obj"
"mp3"
"mp4"
ReturnsExpand Collapse
url: string

The signed URL to download the asset in the requested format, or its original file when targetFormat is omitted

mimeType: optional string

Mime type of the file served at url

Request

curl https://api.cloud.scenario.com/v1/assets/$ASSET_ID/download \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{}'
{
  "url": "url",
  "mimeType": "mimeType"
}
Returns Examples
{
  "url": "url",
  "mimeType": "mimeType"
}