Prepare an AssetUpload for an existing Asset, including requests for additional part URLs for a multipart upload. The request contains the asset ID, filename and folder path, and exact file size in bytes. This endpoint accepts file metadata, not file contents or a source URL, and can replace an existing asset file.
Each returned uploadParts[].url accepts the original bytes by HTTP PUT for the inclusive range startByte through endByte. The signed URL, including its query parameters, provides storage authorization independently of the Dash bearer token. Each successful PUT returns an ETag response header. postAssetUploadCompletion completes the asset's upload with the returned upload ID, asset ID, and every successful part number and ETag, after all required parts have uploaded. Upload URLs may use storage hosts separate from the Dash API and require direct client network access.
Preparing or completing an upload does not change an asset's lifecycle state. After upload completion, postAssetLifecycleTransitionBatchJob can publish staged assets with STAGED_TO_LIVE, subject to publishing permission, or submit them for approval with STAGED_TO_PENDING_APPROVAL. STAGED_TO_LIVE requires a BY_CRITERION selector; a selector combining asset IDs with LIFECYCLE_STATE = STAGED targets specific staged assets. postAssetAndUploadBatchJob creates new assets with their uploads.
The ID of the Asset to create an AssetUpload for
The path of the file including filename and any folders. This path will to set the value of the Asset Folder Field. Set to "/" to upload to the top-level in Dash.
Optionally specify the part size (in bytes) for multi-part uploading of the file. This must be less than 5368709120, and more than 5242880 unless it is the final part. If omitted or null a default part size will be used.
- Productionhttps://api-v2.dash.app/asset-uploads
curl -i -X POST \
https://api-v2.dash.app/asset-uploads \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"assetId": "7af90a8b-7ccd-430f-a85d-e8614015bc47",
"assetFileId": "7af90a8b-7ccd-430f-a85d-e8614015bc47",
"path": "/Folder A/Folder D/a_file.jpg",
"size": 15318362,
"partSize": 7000000,
"partUrlsRequest": {
"uploadId": "5a2481e0-819f-4b46-a7e6-143f943345f2",
"urlRequests": [
{
"partNumber": 2,
"contentMd5": "86fb269d190d2c85f6e0468ceca42a20"
}
]
}
}'{ "result": { "id": "5a2481e0-819f-4b46-a7e6-143f943345f2", "assetId": "7af90a8b-7ccd-430f-a85d-e8614015bc47", "assetFileId": "7af90a8b-7ccd-430f-a85d-e8614015bc47", "uploadParts": [ … ] }, "permittedActions": [ { … } ] }