The /drives
endpoint of the Disguise Cloud API returns information about the drives associated with the authenticated user’s organisation.
The responses from all /drives
endpoints include the following fields:
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the drive. |
slug | string | The slug of the drive. |
org | string | The unique identifier of the organisation. |
title | string | The title of the drive. |
owner_id | string | The unique identifier of the owner. |
status | string | The status of the drive (either active or pending ). |
is_primary_drive | boolean | Whether the drive is the primary drive on the organisation. |
members_count | integer | The number of members on the drive. |
storage_drive_used_mb | integer | The amount of storage used in megabytes. |
storage_total_limit_gb | integer | The total storage limit in gigabytes. |
curl -X GET https://api.disguise.cloud/v1/drives \
-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": "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
}
]
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"]
}
}
}
The following parameters can be used with the /drives
endpoint for POST and PATCH requests:
Parameter | Type | Description |
---|---|---|
title | string | The title of the drive. |
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"
}'