Upload device compliance document by device id

Upload a new device document for a given device

    1. You cannot create net new device records via the Public API. You can only create devices
     in Drata via the Drata Agent or one of our native MDM integrations.
    2. You need to assess whether the device to which you want to map evidence already exists.
        a. If a device already exists in Drata, you can upload evidence to this device specifically
         using the device ID at this endpoint.
        b. If the device does not exist in Drata, you can only upload evidence to the personnel record.
         Use the same endpoint, but use the personnel ID as the device ID.
    3. If you are pursuing use case 2a, Drata will have already created the following mappings:
        a. Asset <--> user (as asset owner)
        b. Device <--> personnel (as device owner)
        c. Asset <--> device (i.e. all devices are assets, but not all assets are devices)
             i. You cannot create, modify, or delete these mappings via the API
    4. If you are pursuing use case 2b, the ability to create the same above mappings is reduced:
        a. Via the API, you can create the desired Asset <--> user (as asset owner) mapping
        b. Drata does not create, and you cannot create, the Device <--> personnel (as device owner) mapping
            i. Drata creates a default “null” device record, where the device ID here is the same as the
             personnel ID
            ii. This is why you use the personnel ID as the device ID when uploading device compliance evidence
             to the personnel record
        c. Drata does not create, and you cannot create, the Asset <--> device (i.e. all devices are assets, but
             not all assets are devices) mapping
            i. You cannot create, modify, or delete this mapping via the API
Securitybearer
Request
path Parameters
id
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
required
string <binary>

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

base64File
object

External evidence in Base64 format. Example: {"base64String":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEAYABg","filename":"excellent-filename"}

Responses
201
400

Malformed data and/or validation errors

401

Invalid Authorization

403

You are not allowed to perform this action

404

Record Not Found

413

The file was too large to upload

500

Internal server error

503

Third party system was unavailable

default

Response Code: 412

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

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