Device Documents

Device Documents allow you to provide manual evidence of Devices compliance. Using the Drata Agent or an MDM connection automatically provides this information.

Upload Device Document

Upload a new Device compliance Document for a given Device.

🔒 Requires Devices: Manage Device Documents permission.

Securitybearer
Request
path Parameters
deviceId
required
number
Request Body schema:
required
type
required
string

The device document type

Enum: "PASSWORD_MANAGER_EVIDENCE" "AUTO_UPDATES_EVIDENCE" "HARD_DRIVE_ENCRYPTION_EVIDENCE" "ANTIVIRUS_EVIDENCE" "LOCK_SCREEN_EVIDENCE"
file
string <binary>

Accepted file extensions: .pdf, .docx, .odt, .xlsx, .ods, .pptx, .odp, .gif, .jpeg, .jpg, .png

base64File
string

JSON string with external evidence in Base64 format.

Responses
201

Created

400

Malformed data and/or validation errors

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

404

Not Found

412

You must accept the Drata terms and conditions to use the API

413

The file was too large to upload

500

Internal server error

503

Third party system was unavailable

post/devices/{deviceId}/documents
Request samples
No sample
Response samples
application/json
{}

List Device Documents

Get a list of Documents for a given Device and Document type.

🔒 Requires Devices: Manage Device Documents permission.

Securitybearer
Request
path Parameters
deviceId
required
number
query Parameters
type
string (DeviceDocumentTypeEnum)

Filter documents by their type

Enum: "PASSWORD_MANAGER_EVIDENCE" "AUTO_UPDATES_EVIDENCE" "HARD_DRIVE_ENCRYPTION_EVIDENCE" "ANTIVIRUS_EVIDENCE" "LOCK_SCREEN_EVIDENCE"
expand[]
Array of strings (DeviceDocumentExpandEnum)

List of subcollections and sub-objects to expand

Items Value: "downloadUrl"
Responses
200

Successful

400

Malformed data and/or validation errors

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

404

Not Found

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

get/devices/{deviceId}/documents
Request samples
Response samples
application/json
{}

Delete Device Document

Removes a specific Device Document using the provided Document ID

🔒 Requires Devices: Manage Device Documents permission.

Securitybearer
Request
path Parameters
deviceId
required
number
documentId
required
number
Responses
200

Successful

400

Malformed data and/or validation errors

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

404

Not Found

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

delete/devices/{deviceId}/documents/{documentId}
Request samples
Response samples
application/json
{
  • "name": "string",
  • "statusCode": 0,
  • "message": "string",
  • "code": 0,
  • "debugInfo": {
    • "name": "string",
    • "message": "string",
    • "stack": "string"
    }
}

Get Device Document

🔒 Requires Devices: Manage Device Documents permission.

Securitybearer
Request
path Parameters
deviceId
required
number
documentId
required
number
query Parameters
expand[]
Array of strings (DeviceDocumentExpandEnum)

List of subcollections and sub-objects to expand

Items Value: "downloadUrl"
Responses
200
400

Malformed data and/or validation errors

401

Invalid Authorization

402

You must upgrade your plan to use this feature

403

You are not allowed to perform this action

404

Not Found

412

You must accept the Drata terms and conditions to use the API

500

Internal server error

get/devices/{deviceId}/documents/{documentId}
Request samples
Response samples
application/json
{}