---
title: Get a device
description: Get a device endpoint in the Datadog API.
breadcrumbs: Docs > API > Get a device
---

> For the complete documentation index, see [llms.txt](https://docs.datadoghq.com/llms.txt).

# Get a device

## v2 (latest)

{% alert level="warning" %}
**Note**: This endpoint is in preview and is subject to change.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help.md).
{% /alert %}

| Datadog site      | API endpoint                                                      |
| ----------------- | ----------------------------------------------------------------- |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/eudm/devices/{device_id}     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/eudm/devices/{device_id} |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/eudm/devices/{device_id} |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/eudm/devices/{device_id}      |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/eudm/devices/{device_id} |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/eudm/devices/{device_id} |
| uk1.datadoghq.com | GET https://api.uk1.datadoghq.com/api/v2/eudm/devices/{device_id} |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/eudm/devices/{device_id}      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/eudm/devices/{device_id}  |

### Overview

This endpoint requires the `end_user_devices_read` permission.

### Arguments

#### Path Parameters

| Field                  | Type   | Description                                                                    |
| ---------------------- | ------ | ------------------------------------------------------------------------------ |
| device_id [*required*] | string | Unique identifier of the device to fetch. Matches the Datadog host identifier. |

### Response

{% tabs %}
{% tab label="200" %}
OK

{% tabs %}
{% tab label="Model" %}
Response body for the get device endpoint, returning a single device with full attribute detail.

| Parent field | Field                         | Type     | Description                                                                                                                                                                                                                                              |
| ------------ | ----------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|              | data                          | object   | A single device entry with full attribute detail.                                                                                                                                                                                                        |
| data         | attributes                    | object   | Extended set of attributes for a single End User Device Monitoring device, including Cloud Network Monitoring and battery metrics.                                                                                                                       |
| attributes   | agent_key                     | string   | Public key of the Datadog Agent installed on the device.                                                                                                                                                                                                 |
| attributes   | agent_version                 | string   | Version of the Datadog Agent installed on the device.                                                                                                                                                                                                    |
| attributes   | battery_charge_pct            | int64    | Current battery charge level as a percentage between 0 and 100.                                                                                                                                                                                          |
| attributes   | battery_charge_rate           | int64    | Rate at which the battery is charging or discharging, in milliamperes. Negative values indicate discharge.                                                                                                                                               |
| attributes   | battery_critical              | boolean  | Whether the device's battery health has degraded to a critical level.                                                                                                                                                                                    |
| attributes   | battery_cycle_count           | int64    | Number of full charge cycles the battery has gone through.                                                                                                                                                                                               |
| attributes   | battery_max_capacity_pct      | int64    | Maximum battery capacity expressed as a percentage of the device's design capacity.                                                                                                                                                                      |
| attributes   | cnm_enabled                   | boolean  | Whether Cloud Network Monitoring is enabled on the device.                                                                                                                                                                                               |
| attributes   | cpu_cores                     | int64    | Number of physical CPU cores on the device.                                                                                                                                                                                                              |
| attributes   | cpu_logical_processors        | int64    | Number of logical CPU processors (hardware threads) on the device.                                                                                                                                                                                       |
| attributes   | cpu_model                     | string   | Human-readable name of the device's CPU model.                                                                                                                                                                                                           |
| attributes   | cpu_usage                     | double   | Average CPU usage on the device, as a percentage between 0 and 100.                                                                                                                                                                                      |
| attributes   | disk_usage                    | double   | Average disk usage on the device, as a percentage between 0 and 100.                                                                                                                                                                                     |
| attributes   | employee                      | object   | Directory information about the employee associated with the device, sourced from a customer reference table. Absent when no reference table is configured or the device has no match.                                                                   |
| employee     | city                          | string   | City where the employee is based.                                                                                                                                                                                                                        |
| employee     | country                       | string   | Country where the employee is based.                                                                                                                                                                                                                     |
| employee     | department                    | string   | Department the employee belongs to.                                                                                                                                                                                                                      |
| employee     | email                         | string   | Email address of the employee.                                                                                                                                                                                                                           |
| employee     | name                          | string   | Full name of the employee.                                                                                                                                                                                                                               |
| employee     | office                        | string   | Office the employee is assigned to.                                                                                                                                                                                                                      |
| employee     | team                          | string   | Team the employee belongs to.                                                                                                                                                                                                                            |
| attributes   | geo_ip                        | object   | Location derived from the device's public IP address. Absent when no location data is available.                                                                                                                                                         |
| geo_ip       | geo_city                      | string   | City resolved from the device's public IP address.                                                                                                                                                                                                       |
| geo_ip       | geo_country_iso_code          | string   | ISO 3166-1 alpha-2 country code resolved from the device's public IP address.                                                                                                                                                                            |
| geo_ip       | geo_latitude                  | double   | Latitude resolved from the device's public IP address.                                                                                                                                                                                                   |
| geo_ip       | geo_longitude                 | double   | Longitude resolved from the device's public IP address.                                                                                                                                                                                                  |
| geo_ip       | geo_subdivision_iso_code      | string   | ISO 3166-2 subdivision code (for example, a state or province) resolved from the device's public IP address.                                                                                                                                             |
| geo_ip       | public_ip_address             | string   | Public IPv4 or IPv6 address of the device.                                                                                                                                                                                                               |
| attributes   | ip_address                    | string   | Last observed IPv4 or IPv6 address of the device.                                                                                                                                                                                                        |
| attributes   | issues                        | [string] | List of issue identifiers currently affecting the device.                                                                                                                                                                                                |
| attributes   | kernel_name                   | string   | Name of the operating system kernel running on the device.                                                                                                                                                                                               |
| attributes   | last_reboot                   | string   | Timestamp of the most recent device reboot, in RFC 3339 format.                                                                                                                                                                                          |
| attributes   | last_seen                     | string   | Timestamp of the most recent telemetry received from the device, in RFC 3339 format.                                                                                                                                                                     |
| attributes   | manufacturer                  | string   | Manufacturer of the device.                                                                                                                                                                                                                              |
| attributes   | mem_usage                     | double   | Average memory usage on the device, as a percentage between 0 and 100.                                                                                                                                                                                   |
| attributes   | memory_total_kb               | int64    | Total amount of physical memory available on the device, in kilobytes.                                                                                                                                                                                   |
| attributes   | model_name                    | string   | Marketing or product name of the device model.                                                                                                                                                                                                           |
| attributes   | model_number                  | string   | Manufacturer-assigned model number of the device.                                                                                                                                                                                                        |
| attributes   | os                            | string   | Operating system family running on the device, as reported by the Datadog Agent (for example, `macOS`, `Windows`, or `linux`). Empty when unknown.                                                                                                       |
| attributes   | os_version                    | string   | Operating system version running on the device.                                                                                                                                                                                                          |
| attributes   | packet_sent                   | double   | Number of TCP packets sent by the device over the query window, as reported by Cloud Network Monitoring.                                                                                                                                                 |
| attributes   | resource_id                   | string   | Datadog resource identifier for the device.                                                                                                                                                                                                              |
| attributes   | retransmit                    | double   | Number of TCP packets retransmitted by the device over the query window.                                                                                                                                                                                 |
| attributes   | retransmit_pct                | double   | Percentage of sent TCP packets that were retransmitted, between 0 and 100.                                                                                                                                                                               |
| attributes   | serial_number                 | string   | Serial number assigned to the device by its manufacturer.                                                                                                                                                                                                |
| attributes   | status                        | enum     | Health status of the device, computed from its issues and recent telemetry. `inactive` means the device stopped reporting. `unknown` means no telemetry is available yet. Allowed enum values: `healthy`, `degraded`, `critical`, `inactive`, `unknown`. |
| attributes   | tcp_canceled                  | double   | Number of TCP connection attempts canceled by the device over the query window.                                                                                                                                                                          |
| attributes   | tcp_established               | double   | Number of TCP connections established by the device over the query window.                                                                                                                                                                               |
| attributes   | tcp_establishment_failure_pct | double   | Percentage of TCP connection attempts that failed, between 0 and 100.                                                                                                                                                                                    |
| attributes   | tcp_establishment_failures    | double   | Number of TCP connection attempts that failed over the query window.                                                                                                                                                                                     |
| attributes   | tcp_host_unreachable          | double   | Number of TCP connection attempts that failed because the host was unreachable.                                                                                                                                                                          |
| attributes   | tcp_network_unreachable       | double   | Number of TCP connection attempts that failed because the network was unreachable.                                                                                                                                                                       |
| attributes   | tcp_refusals                  | double   | Number of TCP connection attempts refused by the remote host over the query window.                                                                                                                                                                      |
| attributes   | tcp_timeouts                  | double   | Number of TCP connection attempts that timed out over the query window.                                                                                                                                                                                  |
| attributes   | type                          | string   | Hardware type of the device (for example, `laptop` or `desktop`). `unknown` when the type cannot be determined.                                                                                                                                          |
| attributes   | uptime                        | double   | Time elapsed since the device last booted, in seconds.                                                                                                                                                                                                   |
| attributes   | wlan_bssid                    | string   | BSSID (MAC address of the access point) of the wireless network the device is currently connected to.                                                                                                                                                    |
| attributes   | wlan_rssi                     | double   | Received signal strength indicator of the device's current wireless connection, in dBm.                                                                                                                                                                  |
| attributes   | wlan_ssid                     | string   | SSID of the wireless network the device is currently connected to.                                                                                                                                                                                       |
| data         | id [*required*]               | string   | Unique identifier of the device. Matches the Datadog host identifier.                                                                                                                                                                                    |
| data         | type [*required*]             | enum     | Devices resource type. Allowed enum values: `devices`. Default: `devices`.                                                                                                                                                                               |
{% /tab %}

{% tab label="Example" %}
```json
{
  "data": {
    "attributes": {
      "agent_key": "string",
      "agent_version": "string",
      "battery_charge_pct": "integer",
      "battery_charge_rate": "integer",
      "battery_critical": false,
      "battery_cycle_count": "integer",
      "battery_max_capacity_pct": "integer",
      "cnm_enabled": false,
      "cpu_cores": "integer",
      "cpu_logical_processors": "integer",
      "cpu_model": "string",
      "cpu_usage": "number",
      "disk_usage": "number",
      "employee": {
        "city": "string",
        "country": "string",
        "department": "string",
        "email": "string",
        "name": "string",
        "office": "string",
        "team": "string"
      },
      "geo_ip": {
        "geo_city": "string",
        "geo_country_iso_code": "string",
        "geo_latitude": "number",
        "geo_longitude": "number",
        "geo_subdivision_iso_code": "string",
        "public_ip_address": "string"
      },
      "ip_address": "string",
      "issues": [],
      "kernel_name": "string",
      "last_reboot": "string",
      "last_seen": "string",
      "manufacturer": "string",
      "mem_usage": "number",
      "memory_total_kb": "integer",
      "model_name": "string",
      "model_number": "string",
      "os": "string",
      "os_version": "string",
      "packet_sent": "number",
      "resource_id": "string",
      "retransmit": "number",
      "retransmit_pct": "number",
      "serial_number": "string",
      "status": "healthy",
      "tcp_canceled": "number",
      "tcp_established": "number",
      "tcp_establishment_failure_pct": "number",
      "tcp_establishment_failures": "number",
      "tcp_host_unreachable": "number",
      "tcp_network_unreachable": "number",
      "tcp_refusals": "number",
      "tcp_timeouts": "number",
      "type": "string",
      "uptime": "number",
      "wlan_bssid": "string",
      "wlan_rssi": "number",
      "wlan_ssid": "string"
    },
    "id": "LAPTOP-DEMO-001",
    "type": "devices"
  }
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="400" %}
Bad Request

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="404" %}
Not Found

{% tabs %}
{% tab label="Model" %}
API error response.

| Parent field | Field               | Type     | Description                                                                     |
| ------------ | ------------------- | -------- | ------------------------------------------------------------------------------- |
|              | errors [*required*] | [object] | A list of errors.                                                               |
| errors       | detail              | string   | A human-readable explanation specific to this occurrence of the error.          |
| errors       | meta                | object   | Non-standard meta-information about the error                                   |
| errors       | source              | object   | References to the source of the error.                                          |
| source       | header              | string   | A string indicating the name of a single request header which caused the error. |
| source       | parameter           | string   | A string indicating which URI query parameter caused the error.                 |
| source       | pointer             | string   | A JSON pointer to the value in the request document that caused the error.      |
| errors       | status              | string   | Status code of the response.                                                    |
| errors       | title               | string   | Short human-readable summary of the error.                                      |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    {
      "detail": "Missing required attribute in body",
      "meta": {},
      "source": {
        "header": "Authorization",
        "parameter": "limit",
        "pointer": "/data/attributes/title"
      },
      "status": "400",
      "title": "Bad Request"
    }
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}

{% tab label="429" %}
Too many requests

{% tabs %}
{% tab label="Model" %}
API error response.

| Field               | Type     | Description       |
| ------------------- | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |
{% /tab %}

{% tab label="Example" %}
```json
{
  "errors": [
    "Bad Request"
  ]
}
```
{% /tab %}
{% /tabs %}
{% /tab %}
{% /tabs %}

### Code Example

{% tabs %}
{% tab label="Curl" %}
```bash
# Path parameters
export device_id="CHANGE_ME"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com" # Or us3.datadoghq.com, us5.datadoghq.com, datadoghq.eu, ap1.datadoghq.com, ap2.datadoghq.com, uk1.datadoghq.com, ddog-gov.com, us2.ddog-gov.com
export DD_API_KEY="<DD_API_KEY>"
export DD_APP_KEY="<DD_APP_KEY>"

curl -X GET "https://api.${DD_SITE}/api/v2/eudm/devices/${device_id}" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"
```
{% /tab %}
{% /tabs %}
