---
title: "Get device by ID"
method: GET
path: "/api/v1/devices/{deviceId}"
tags: ["Devices"]
---

# Get device by ID

`GET /api/v1/devices/{deviceId}`

Get information about a single device. Alternative is to call 'Get all devices' with a `deviceId` filter query parameter.

## Path parameters

- `deviceId` string, uuid, required

## Response `200`

Information about a single device.

- Device
  - `id` string
  - `types` string[]
  - `name` string
  - `metadata` DeviceMetadata
    - `status` object
      - `value` 'OFFLINE' | 'ONLINE'
      - `validUntil` string, int64 — Unix timestamp in nanoseconds.
      - `connectedAt` string, int64 — Unix timestamp in nanoseconds.
      - `serviceId` string — The service.ID, which identify the device being served, must be set when the status is ONLINE. However, during an OFFLINE event, they will be sed to empty values.
      - `localEndpoints` string[] — The last local endpoints of the device, and it is set when the status is ONLINE.
    - `twinSynchronization` TwinSynchronization
      - `state` 'OUT_OF_SYNC' | 'DISABLED' | 'SYNCING' | 'IN_SYNC' — OUT_OF_SYNC - As soon as it connects after it was offline or when it goes errorless offline or when twin enabled has been changed to true. DISABLED - As soon as twin enabled is set to false. SYNCING - As soon as device connects, successfully signs in and batch observe is called on device from the cloud. IN_SYNC - As soon as current device resources values are received and applied to twin database. Twin was successfully reconciled after device reconnect and is kept up to date using an active subscription to device resource changes.
      - `syncingAt` string, int64
      - `inSyncAt` string, int64
      - `commandMetadata` CommandMetadata
        - `connectionId` string
        - `sequence` string, uint64
    - `twinEnabled` boolean
  - `manufacturerName` object[]
    - `language` string
    - `value` string
  - `modelNumber` string
  - `interfaces` string[]
  - `protocolIndependentId` string

## Other responses

- `400` — Bad Request
- `401` — Not authorized
- `404` — Entity was not found.

## Changes

> 42 revisions in range; 3 not diffed.

- **2024-02-29** `24b9261b39f3` — 2 info
  - added the optional property `metadata/status/localEndpoints` to the response with the `200` status
  - added the optional property `metadata/status/serviceId` to the response with the `200` status
- **2022-11-08** `482579a45b1d` — 1 warning, 2 info
  - removed the optional property `metadata/shadowSynchronization` from the response with the `200` status
  - added the optional property `metadata/twinEnabled` to the response with the `200` status
  - added the optional property `metadata/twinSynchronization` to the response with the `200` status
- **2022-10-17** `1e8fcc1d1354` — 1 info
  - added the optional property `metadata/status/connectedAt` to the response with the `200` status
- **2022-01-05** `afc9b9af73b5` — 4 info
  - added the optional property `error/details/items/typeUrl` to the response with the `400` status
  - added the optional property `error/details/items/typeUrl` to the response with the `401` status
  - added the optional property `error/details/items/value` to the response with the `400` status
  - added the optional property `error/details/items/value` to the response with the `401` status
- …earlier changes not shown

[Full history](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/changes/api/v1/devices/:deviceId/get.md)

---

[API](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway.md) · [All operations](https://skmtc.dev/plgd-dev/apis/plgd-http-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/plgd-dev/plgd-http-gateway/revisions/bbfd9fa43407/schema)
