The /versions
endpoint of the Disguise Cloud Drive API returns information about the versions of a specific asset. Each version represents a different iteration of the asset.
Please note that only Pro and Studio users have access to create new versions of an asset. All assets will have at least one version, which is the original upload.
The responses from the /versions
endpoint include the following fields:
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the version. |
asset_id | string | The unique identifier of the asset associated with the version. |
label | string | The label of the version, if set. |
thumbnail | string | The URL of the thumbnail image of the version, if applicable. |
version_number | integer | The version number. This will increment with each new version. |
filesize_bytes | integer | The size of the version in bytes. |
type | string | The type of the version (e.g., file , image , scene , video , previz ). |
status | string | The status of the version (e.g., pending , ready ). Refers to if the content has been finished processing (such as video encoding). |
url | string | The URL of the version. |
is_active | boolean | Whether the version the content’s active version. The active version will be the one the the outer level’s properties will refer to. |
created_at | datetime | The date and time when the version was created. |
updated_at | datetime | The date and time when the version was last updated. |
uploaded_by_user | string | The unique identifier of the user who uploaded the version. |
uploaded_by_user_status | string | The status of the user who uploaded the version (e.g., active , deleted ). |
curl -X GET https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}}/versions \
-H "Authorization: Token YOUR_API_TOKEN"
A successful response will return a 200 OK
status code and the following JSON:
Please note this example excludes the pagination wrapper around the response. Please refer to the pagination documentation for more information.
[
{
"id": "e6989338-a01a-43fc-8b37-d7cb62974eaa",
"asset_id": "4179dc26-88cb-49ab-af97-5a4ddc2ac446",
"label": null,
"thumbnail": "{{thumbnail_url}}",
"version_number": 1,
"filesize_bytes": 4742353,
"type": "image",
"status": "ready",
"url": "{{file_url}}",
"is_active": true,
"created_at": "2024-12-03T21:02:09.000000Z",
"updated_at": "2024-12-03T21:02:16.000000Z",
"uploaded_by_user": "e4686083-413d-49df-ad02-0f000fbf7be1",
"uploaded_by_user_status": "active"
}
]
If the drive is not found, the API will return a 404 Not Found
status code and the following JSON:
{
"error": {
"message": "Drive not found",
"details": "Drive not found"
}
}
The following parameters can be used with the /versions
endpoint for PATCH requests:
Parameter | Type | Description |
---|---|---|
label | string | The label for the version. |
set_active | boolean | Set to true to make this version active. This will deactivate all other versions. Note that setting this to false will do nothing, you must set true on another asset version to change the active version. |
Below is an example of making a PATCH request to the /versions
endpoint to update the version’s label and
setting it as the active version.
curl -X PATCH https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}}/versions/{{version_id}} \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "Version 1",
"set_active": true
}'