Skip to main content
Drives

Clear a Drive

Clear the Drive for a specified Identity.

Drive is currently in Beta. API definitions, response structures, and behavior may change. Follow documentation updates and verify compatibility before production use.
DELETE /api/v1/forward/drives

Request Headers

HeaderRequiredDescription
AuthorizationYesBearer <PAT or SAT>

Query Parameters

ParameterTypeRequiredDescription
identity_idstringYesIdentity ID within the current authentication scope; supply exactly once. An Identity-level SAT can select only its bound Identity.

Example Request

curl --silent --show-error --fail-with-body -X DELETE \
  "https://api.qoder.com/api/v1/forward/drives?identity_id=idn_xxx" \
  -H "Authorization: Bearer $QODER_ACCESS_TOKEN"

Example Response

HTTP 200 OK
{
  "deleted_count": 12
}

Response Fields

FieldTypeDescription
deleted_countintegerNumber of storage objects confirmed deleted in this request; 0 if Drive was already empty.

Errors

HTTPCodeCondition
400—The request body contains unsupported fields or is malformed.
400invalid_drive_pathThe Identity identifier format is invalid.
400invalid_identity_ididentity_id is missing, empty, or supplied more than once.
401—Credentials are missing or invalid. Exchange a Service Account Key for a SAT first.
403identity_mismatchAn Identity-level SAT selected another Identity.
404identity_not_foundThe Identity was not found within the current authentication scope.
413—The request body exceeds the service limit.
500—Internal server error.
503drive_delete_partialClearing is incomplete. error.deleted_count gives the number confirmed deleted in this request. Retry the original request.
503drive_unavailableDrive storage, signing, or a dependency is temporarily unavailable.

HTTP Error Response

{
  "type": "error",
  "request_id": "req_xxx",
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_identity_id",
    "message": "identity_id is required exactly once"
  }
}

Response Fields

FieldTypeDescription
typestringAlways error.
request_idstringRequest trace ID, returned when available.
error.typestringError category, such as invalid_request_error, authentication_error, permission_error, not_found_error, conflict_error, or api_error.
error.codestringBusiness error code; omitted for some common errors.
error.messagestringError description.
error.deleted_countintegerReturned only for drive_delete_partial: the number of objects confirmed deleted in this request, which may be 0.
drive_delete_partial means deletion is incomplete. Deleted files are not restored; retries process only the remaining files. Gateway authentication errors may use a different response structure.