- Generate an upload URL
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.
The context for the upload.
- https://your-serverhttps://your-server/api/v2.0/upload
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
- application/json-patch+json
- application/json
- text/json
- application/*+json
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": {}
}
}'The upload URl has been created successfully
The identifier for the upload session. This is used later to complete the upload process, after the file has been uploaded.
The identifier of the upload storage. This is used later to complete the upload process after the file has been uploaded.
{ "upload_identifier": "string", "storage_identifier": "string", "file_identifier": "string" }