Upload

The Upload endpoint is used to manage file uploads.

Generate an upload URL

Request

Generates a URL that can be used to upload a file based on the upload configuration provided. For security reasons, the URL is only valid for a limited time. When uploading a file, you must provide the configuration and action to be performed with the upload.

When you upload a file, it can:
- Create a new asset.
- Create a new version of an existing asset.
- Be an alternate file for an existing asset.

Uploads require an upload configuration that defines supported file extensions, the content repository to which the file is to be uploaded, and so on. Security checks validate that the user has permission to perform uploads. The upload URL is returned in the response location header.

Security
OAuth2
Body

The context for the upload.

file_namestring or null

The name of the file to be uploaded.

file_sizeinteger, (int64)

The size of the file to be uploaded.

upload_configurationobject(UploadConfigurationInfo)

Information about the upload configuration.

actionobject(UploadActionInfo)
curl -i -X POST \
  https://your-server/api/v2.0/upload \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json-patch+json' \
  -d '{
    "file_name": "string",
    "file_size": 0,
    "upload_configuration": {
      "name": "string",
      "parameters": {}
    },
    "action": {
      "name": "string",
      "parameters": {}
    }
  }'

Responses

The upload URl has been created successfully

Bodyapplication/json
upload_identifierstring or null

The identifier for the upload session. This is used later to complete the upload process, after the file has been uploaded.

storage_identifierstring or null

The identifier of the upload storage. This is used later to complete the upload process after the file has been uploaded.

file_identifierstring or null

This is used later to complete the upload process after the file has been uploaded.

Response
{ "upload_identifier": "string", "storage_identifier": "string", "file_identifier": "string" }