Skip to content

Create assets and upload files

Request

Create one or more new Asset resources and prepare an AssetUpload for each file. Each item contains the filename and folder path, exact size in bytes, and a unique batchItemId. This endpoint accepts file metadata, not file contents or a source URL.

getAssetAndUploadBatchJob returns the job's status and eventual successes and failures, keyed by batchItemId. A completed job means assets and upload URLs have been prepared; it does not mean any file bytes have been uploaded.

Each successful item's uploadParts[].url accepts its original file bytes by HTTP PUT. Each part contains the inclusive byte 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 upload 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.

Each file can be uploaded in one or more parts. Files smaller than 5 MiB require a single part. Files larger than 5 GiB require multiple parts, each smaller than 5 GiB.

New assets remain STAGED after uploading. Publishing or submitting them for approval requires a separate postAssetLifecycleTransitionBatchJob after upload completion. The STAGED_TO_LIVE transition publishes assets and requires publishing permission; STAGED_TO_PENDING_APPROVAL submits them for approval. STAGED_TO_LIVE requires a BY_CRITERION selector; a selector combining asset IDs with LIFECYCLE_STATE = STAGED targets specific staged assets. getAssetLifecycleTransitionBatchJob reports the resulting lifecycle state. See Asset lifecycle transitions.

Security
bearerToken
Bodyapplication/jsonrequired
itemsArray of objectsrequired
curl -i -X POST \
  https://api-v2.dash.app/asset-and-upload-batch-jobs \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "items": [
      {
        "batchItemId": "my-item-1",
        "path": "/Folder A/Folder D/a_file.jpg",
        "size": 15318362,
        "partSize": 7000000,
        "partUrlsRequest": {
          "uploadId": "5a2481e0-819f-4b46-a7e6-143f943345f2",
          "urlRequests": [
            {
              "partNumber": 2,
              "contentMd5": "86fb269d190d2c85f6e0468ceca42a20"
            }
          ]
        }
      }
    ]
  }'

Responses

Success

Bodyapplication/json
idstringrequired

Unique identifier of the job that has been created

Example:"be161977-d44e-4888-af3c-66522e223963"
accountIdstringrequired

The ID of the account the job is happening in

Example:"cfb665ca-ce35-4418-b9d5-70ee815db4bd"
creatorIdstringrequired

The ID of the User who created the job

Example:"google-oauth2|110955770826801837334"
typestringrequired

The job type

Value:"IN_PROGRESS"
Discriminator
progressobjectrequired
statusstringrequired
Enum:"PENDING""STARTING""STARTED""STOPPING"
Response
{ "id": "be161977-d44e-4888-af3c-66522e223963", "accountId": "cfb665ca-ce35-4418-b9d5-70ee815db4bd", "creatorId": "google-oauth2|110955770826801837334", "type": "IN_PROGRESS", "progress": { "steps": [ … ] }, "status": "PENDING" }