Skip to content

Create assets and upload files

Request

An AssetAndUploadBatchJob should be created when you want to create multiple Asset resources and also create an AssetUpload for each of them.

Each asset can be uploaded in a single part or in multiple parts. If the filesize is less than 5MiB then it must be uploaded in a single part. If the filesize is greater than 5GiB then it must be uploaded in multiple parts, each smaller than 5GiB.

The AssetUpload resources in the completed job should then be used to upload the files for each and asset and complete each upload.

After the Asset resources have been created and files uploaded to them they will still be in Asset.lifecycleStatus.state = 'STAGED'. To send them for approval or put them live see Asset Lifecycle.

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" }