disguise developers

Drives

The /drives endpoint of the Disguise Cloud API returns information about the drives associated with the authenticated user’s organisation.

Endpoints

GET
api.disguise.cloud
/v1/drives
Get a list of drives associated with the authenticated token's organisation.
POST
api.disguise.cloud
/v1/drives
Create a new drive in the authenticated token's organisation.
GET
api.disguise.cloud
/v1/drives/{{uuid}}
Get details of a specific drive by its unique identifier.
PATCH
api.disguise.cloud
/v1/drives/{{uuid}}
Update the details of a specific drive by its unique identifier.

Response Structure

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

FieldTypeDescription
idstringThe unique identifier of the drive.
slugstringThe slug of the drive.
orgstringThe unique identifier of the organisation.
titlestringThe title of the drive.
owner_idstringThe unique identifier of the owner.
statusstringThe status of the drive (either active or pending).
is_primary_drivebooleanWhether the drive is the primary drive on the organisation.
members_countintegerThe number of members on the drive.
storage_drive_used_mbintegerThe amount of storage used in megabytes.
storage_total_limit_gbintegerThe total storage limit in gigabytes.

Response Example

curl -X GET https://api.disguise.cloud/v1/drives \
-H "Authorization: Token YOUR_API_TOKEN"

Success

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": "d3fd142f-5245-474e-bc75-5cdd7b71125a",
    "slug": "o1pzlwedmx-r2wy67nxlr",
    "org": "9c047825-df2e-4f78-9f41-575fcd2456b2",
    "title": "My Drive",
    "owner_id": "1dfe383c-1e85-4af4-8a41-1f23365cf2b3",
    "status": "active",
    "is_primary_drive": true,
    "members_count": 2,
    "storage_drive_used_mb": 54,
    "storage_total_limit_gb": 1000
  }
]

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 you exceed the maximum drive limit, you will receive a 422 Unprocessable Entity status code with the following JSON response:

{
  "error": {
    "message": "Validation error",
    "details": {
      "drive_limit": ["Max drive limit reached"]
    }
  }
}

Request Parameters

The following parameters can be used with the /drives endpoint for POST and PATCH requests:

ParameterTypeDescription
titlestringThe title of the drive.

Request Example

Below is an example of making a POST request to the /drives endpoint to update the drive’s title.

curl -X POST https://api.disguise.cloud/v1/drive/ \
-H "Authorization: Token YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
  "title": "My Drive"
}'