The /content
endpoint of the Disguise Cloud Drive API returns information about the requested drive’s content. A piece of content represents any file or folder within a drive. The term assets are used to represent files, while folders are simply referred to as folders.
The endpoint structure is the same for both files and folders, please refer to the type
field in the response to determine the type of content:
Type | Description |
---|---|
folder | Represents a folder in the system, and will contain an array of children representing the contents of the folder. |
image | Represents image files. Examples include .jpg, .png, etc. |
video | Represents video files. Examples includes .mp4, .mov, etc. |
scene | Represents 3D model files. Examples include .obj, .fbx, etc. |
previz | Represents Previz files. Examples include the main file created by the Previz application or Previz files created by the Disguise Designer and uploaded to the cloud. |
file | Represents all other file types that cannot be processed or previewed in the web interface. Examples include .zip, .txt, etc. |
While all fields are included in the response, some fields may be empty depending on the type of content.
The responses from all /content
endpoints include the following fields:
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the content. |
drive_id | string | The unique identifier of the drive. |
parent_id | string | The unique identifier of the parent content, if applicable. Root folders will be the only piece of content that is missing this field. |
name | string | The name of the content. |
versions | array | A list of versions of the content. See the Versions table for more information. |
is_locked | boolean | Whether the content is locked. When locked, the content can not be updated or deleted. |
locked_by_id | string | The unique identifier of the user who locked the content, if applicable. |
uploaded_by_id | string | The unique identifier of the user who uploaded the content, if applicable. |
url | string | The URL of the content, if applicable. |
format | string | The format of the content, if applicable. |
thumbnail | string | The URL of the thumbnail image of the content, if applicable. |
thumbnail_tiny | string | The URL of the tiny thumbnail image of the content, if applicable. |
type | string | The type of the content (e.g., folder , file , image , scene , video , previz ). |
length | integer | The length of the content, if applicable. |
width | integer | The width of the content, if applicable. |
height | integer | The height of the content, if applicable. |
dimensions | string | The dimensions of the content, if applicable. |
size_bytes | integer | The size of the content in bytes. For folders, this will be the total size of all content in the folder. |
status | string | The status of the content (e.g., pending , ready ). Refers to if the content has been finished processing (such as video encoding). |
meta | object | Additional metadata about the content, if applicable. Data structure is not guaranteed. |
file_extension | string | The file extension of the content, if applicable. |
is_shared | boolean | Whether the content is shared. |
share_slug | string | The share slug of the content, if applicable. Only applies if the content was shared previously. |
share_url | string | The share URL of the content, if applicable. Only applies if the content was shared previously. |
description | string | The description of the content, if applicable. |
created_at | datetime | The date and time when the content was created. |
updated_at | datetime | The date and time when the content was last updated. |
children | array | A list of child content items see the Children table for more information. |
Versions represent different iterations of the content, applicable only to file based content.
Each version will have its own unique identifier and metadata. Please note that while all file based content have versions, the ability to add additional versions is only available for Pro and Studio accounts.
To further interact with versions, please refer to the Versions endpoint.
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 ). |
The children
field is an array of child content items, applicable only to folders.
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the child content. Can be used to further query the child content to get more details. |
name | string | The name of the child content. |
type | string | The type of the child content (e.g., folder , file , image , scene , video , previz ). |
size_bytes | integer | The size of the child content in bytes. |
curl -X GET https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}} \
-H "Authorization: Token YOUR_API_TOKEN"
A successful response will return a 200 OK
status code and the following JSON:
{
"id": "1cb5e233-908b-4799-80d7-943b86d3916c",
"drive_id": "3b5b9cab-073d-416a-bcf1-f2b3154fb0ee",
"parent_id": null,
"name": "My Folder",
"versions": [],
"is_locked": false,
"locked_by_id": null,
"uploaded_by_id": null,
"url": null,
"format": null,
"thumbnail": null,
"thumbnail_tiny": null,
"type": "folder",
"length": null,
"width": null,
"height": null,
"dimensions": null,
"size_bytes": 23925053,
"status": "pending",
"meta": null,
"file_extension": null,
"is_shared": false,
"share_slug": null,
"share_url": null,
"description": null,
"created_at": "2024-11-27T21:05:01.000000Z",
"updated_at": "2024-12-03T21:03:03.000000Z",
"children": [
{
"id": "4179dc26-88cb-49ab-af97-5a4ddc2ac446",
"name": "light-streaks-01.jpg",
"type": "image",
"size_bytes": 4742353
},
{
"id": "4b4ff0e4-8252-491b-ba7b-a41e572cedcf",
"name": "notes.txt",
"type": "file",
"size_bytes": 11
},
{
"id": "b34a1137-64af-4dea-89b9-521bc78b46d7",
"name": "model.usdz",
"type": "scene",
"size_bytes": 3842733
},
{
"id": "5636a1e6-e436-4722-b6c2-eea7727c9387",
"name": "project_backup.zip",
"type": "file",
"size_bytes": 15339956
}
]
}
curl -X GET https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}} \
-H "Authorization: Token YOUR_API_TOKEN"
A successful response will return a 200 OK
status code and the following JSON:
{
"id": "4179dc26-88cb-49ab-af97-5a4ddc2ac446",
"drive_id": "3b5b9cab-073d-416a-bcf1-f2b3154fb0ee",
"parent_id": "1cb5e233-908b-4799-80d7-943b86d3916c",
"name": "light-streaks-01.jpg",
"versions": [
{
"id": "26898d90-769f-4909-b1bd-d4b29cad7134",
"asset_id": "4179dc26-88cb-49ab-af97-5a4ddc2ac446",
"label": null,
"thumbnail": "{{thumbnail_url}}",
"version_number": 3,
"filesize_bytes": 4742353,
"type": "image",
"status": "ready",
"url": "{{file_url}}",
"is_active": true,
"created_at": "2024-12-03T21:02:24.000000Z",
"updated_at": "2024-12-03T21:02:48.000000Z",
"uploaded_by_user": "e4686083-413d-49df-ad02-0f000fbf7be1",
"uploaded_by_user_status": "active"
},
{
"id": "6d0ac632-1a3a-4968-9007-f3439af4e44b",
"asset_id": "4179dc26-88cb-49ab-af97-5a4ddc2ac446",
"label": null,
"thumbnail": "{{thumbnail_url}}",
"version_number": 2,
"filesize_bytes": 4742353,
"type": "image",
"status": "ready",
"url": "{{file_url}}",
"is_active": false,
"created_at": "2024-12-03T21:02:18.000000Z",
"updated_at": "2024-12-03T21:02:31.000000Z",
"uploaded_by_user": "e4686083-413d-49df-ad02-0f000fbf7be1",
"uploaded_by_user_status": "active"
},
{
"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": false,
"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"
}
],
"is_locked": false,
"locked_by_id": null,
"uploaded_by_id": "e4686083-413d-49df-ad02-0f000fbf7be1",
"url": "{{file_url}}",
"format": "image/jpeg",
"thumbnail": "{{thumbnail_url}}",
"thumbnail_tiny": "{{thumbnail_tiny_url}}",
"type": "image",
"length": null,
"width": null,
"height": null,
"dimensions": "7680 x 4320",
"size_bytes": 4742353,
"status": "ready",
"meta": {
"width": 7680,
"format": "image/jpeg",
"height": 4320,
"dimensions": "7680 x 4320"
},
"file_extension": "jpg",
"is_shared": false,
"share_slug": null,
"share_url": null,
"description": null,
"created_at": "2024-12-03T21:02:09.000000Z",
"updated_at": "2024-12-03T21:03:13.000000Z",
"children": null
}
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"
}
}
If the content is not found, the API will return a 404 Not Found
status code and the following JSON:
{
"error": {
"message": "Content not found",
"details": "Content not found"
}
}
The following parameters can be used with the /content
endpoint for PATCH requests:
Parameter | Type | Description |
---|---|---|
parent_id | string | The unique identifier of the parent content. Can be used to move the content to a new folder. |
name | string | The name of the content. |
is_locked | boolean | Whether the content is locked. Changing this to true will prevent further updates or deletions until it is unlocked. |
description | string | The description of the content. |
Below is an example of making a PATCH request to the /content
endpoint to update the content’s title.
curl -X PATCH https://drive-api.disguise.cloud/v1/drives/{{drive_id}}/content/{{content_id}} \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "My New Folder Name",
"description": "This is a new description for the folder."
}'