disguise developers

Content

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:

TypeDescription
folderRepresents a folder in the system, and will contain an array of children representing the contents of the folder.
imageRepresents image files. Examples include .jpg, .png, etc.
videoRepresents video files. Examples includes .mp4, .mov, etc.
sceneRepresents 3D model files. Examples include .obj, .fbx, etc.
previzRepresents 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.
fileRepresents 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.

Endpoints

GET
drive-api.disguise.cloud
/v1/drives/{{drive_id}}/content
Retrieve a list of content for the specified drive.
GET
drive-api.disguise.cloud
/v1/drives/{{drive_id}}/content/{{content_id}}
Retrieve details of specific piece of content by its unique identifier.
PATCH
drive-api.disguise.cloud
/v1/drives/{{drive_id}}/content/{{content_id}}
Update the details of specific piece of content by its unique identifier.
DELETE
drive-api.disguise.cloud
/v1/drives/{{drive_id}}/content/{{content_id}}
Delete a specific piece of content by its unique identifier. If deleting a folder, all child content will also be deleted.

Response Structure

The responses from all /content endpoints include the following fields:

FieldTypeDescription
idstringThe unique identifier of the content.
drive_idstringThe unique identifier of the drive.
parent_idstringThe unique identifier of the parent content, if applicable. Root folders will be the only piece of content that is missing this field.
namestringThe name of the content.
versionsarrayA list of versions of the content. See the Versions table for more information.
is_lockedbooleanWhether the content is locked. When locked, the content can not be updated or deleted.
locked_by_idstringThe unique identifier of the user who locked the content, if applicable.
uploaded_by_idstringThe unique identifier of the user who uploaded the content, if applicable.
urlstringThe URL of the content, if applicable.
formatstringThe format of the content, if applicable.
thumbnailstringThe URL of the thumbnail image of the content, if applicable.
thumbnail_tinystringThe URL of the tiny thumbnail image of the content, if applicable.
typestringThe type of the content (e.g., folder, file, image, scene, video, previz).
lengthintegerThe length of the content, if applicable.
widthintegerThe width of the content, if applicable.
heightintegerThe height of the content, if applicable.
dimensionsstringThe dimensions of the content, if applicable.
size_bytesintegerThe size of the content in bytes. For folders, this will be the total size of all content in the folder.
statusstringThe status of the content (e.g., pending, ready). Refers to if the content has been finished processing (such as video encoding).
metaobjectAdditional metadata about the content, if applicable. Data structure is not guaranteed.
file_extensionstringThe file extension of the content, if applicable.
is_sharedbooleanWhether the content is shared.
share_slugstringThe share slug of the content, if applicable. Only applies if the content was shared previously.
share_urlstringThe share URL of the content, if applicable. Only applies if the content was shared previously.
descriptionstringThe description of the content, if applicable.
created_atdatetimeThe date and time when the content was created.
updated_atdatetimeThe date and time when the content was last updated.
childrenarrayA list of child content items see the Children table for more information.

Versions

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.

FieldTypeDescription
idstringThe unique identifier of the version.
asset_idstringThe unique identifier of the asset associated with the version.
labelstringThe label of the version, if set.
thumbnailstringThe URL of the thumbnail image of the version, if applicable.
version_numberintegerThe version number. This will increment with each new version.
filesize_bytesintegerThe size of the version in bytes.
typestringThe type of the version (e.g., file, image, scene, video, previz).
statusstringThe status of the version (e.g., pending, ready). Refers to if the content has been finished processing (such as video encoding).
urlstringThe URL of the version.
is_activebooleanWhether the version the content’s active version. The active version will be the one the the outer level’s properties will refer to.
created_atdatetimeThe date and time when the version was created.
updated_atdatetimeThe date and time when the version was last updated.
uploaded_by_userstringThe unique identifier of the user who uploaded the version.
uploaded_by_user_statusstringThe status of the user who uploaded the version (e.g., active, deleted).

Children

The children field is an array of child content items, applicable only to folders.

FieldTypeDescription
idstringThe unique identifier of the child content. Can be used to further query the child content to get more details.
namestringThe name of the child content.
typestringThe type of the child content (e.g., folder, file, image, scene, video, previz).
size_bytesintegerThe size of the child content in bytes.

Response Example

Folder

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

File

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
}

Errors

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

Request Parameters

The following parameters can be used with the /content endpoint for PATCH requests:

ParameterTypeDescription
parent_idstringThe unique identifier of the parent content. Can be used to move the content to a new folder.
namestringThe name of the content.
is_lockedbooleanWhether the content is locked. Changing this to true will prevent further updates or deletions until it is unlocked.
descriptionstringThe description of the content.

Request Example

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