Get a list of devices for a given connection

🧪 BETA: Get a list of devices for a given connection

Securitybearer
Request
path Parameters
connectionId
required
number

The ID of the connection may be obtained in one of two ways:

  • Calling GET /connections and noting the id of the desired custom device connection in the response.
  • In the Drata App:
    • New Device Connection

      1. Navigate to Connections > MDM.
      2. Select the Available Connections tab.
      3. Chose Custom Device Connection.

      After successfully creating a device connection, the connection ID will be displayed under Account Information.

    • Existing Device Connection

      1. Navigate to Connections > MDM.
      2. Select the Active Connections tab.
      3. View a previously created custom device connection.

      The connection ID will be displayed under Account Information.

query Parameters
page
number >= 1
Default: 1

Which page of data are you requesting

limit
number [ 1 .. 50 ]
Default: 20

How many items are you requesting

externalId
string <= 191 characters

An externally sourced unique identifier for a device

expand[]
Array of strings

List of subcollections and sub-objects to expand

Items Enum: "ASSET" "COMPLIANCE_CHECKS" "DOCUMENTS" "IDENTIFIERS"
Example: expand[]=COMPLIANCE_CHECKS
macAddress
string

The device MAC address

Example: macAddress=65-F9-3D-85-7B-6B,99-A9-3E-14-7A-3E
serialNumber
string

The device serial number

Example: serialNumber=NKRTSPY456
personnelId
number

Personnel Id

Responses
200
401

Invalid Authorization

402

Response Code 402

You must pay to activate this feature

403

You are not allowed to perform this action

404

Record Not Found

412

Response Code: 412

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

500

Internal server error

get/custom-connections/{connectionId}/devices
Request samples
Response samples
application/json
{
  • "data": [
    • {
      • "externalId": "3000",
      • "personnelId": 206,
      • "userId": 207,
      • "id": 3,
      • "osVersion": "MacOS 11",
      • "serialNumber": "q77gfdp0xg03vcu6t1fi",
      • "model": "MacBook Pro 14-in(2021)",
      • "macAddress": "91:2b:4a:7a:51:73",
      • "encryptionEnabled": null,
      • "firewallEnabled": null,
      • "gateKeeperEnabled": null,
      • "lastCheckedAt": "2024-11-25T22:16:23.479Z",
      • "sourceType": "AGENT",
      • "createdAt": "2024-11-25T22:16:23.479Z",
      • "updatedAt": "2024-12-08T22:20:15.041Z",
      • "deletedAt": null,
      • "appsCount": null
      },
    • {
      • "externalId": "4000",
      • "personnelId": 305,
      • "userId": 306,
      • "id": 4,
      • "osVersion": "MacOS 12",
      • "serialNumber": "locldk8eyxn28eyb3ktj",
      • "model": "MacBook Pro 16-in(2021)",
      • "macAddress": "0f:8a:67:b2:90:ad",
      • "encryptionEnabled": null,
      • "firewallEnabled": null,
      • "gateKeeperEnabled": null,
      • "lastCheckedAt": "2024-11-25T22:16:23.705Z",
      • "sourceType": "AGENT",
      • "createdAt": "2024-11-25T22:16:23.705Z",
      • "updatedAt": "2024-12-08T22:20:15.041Z",
      • "deletedAt": null,
      • "appsCount": null
      }
    ],
  • "page": 1,
  • "limit": 10,
  • "total": 100
}