---
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.
    - `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

> 36 revisions in range; 3 not diffed.

- **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
- **2021-07-27** `4d121732b593` — 3 warning, 11 info
  - removed the optional property `device` from the response with the `200` status
  - removed the optional property `links` from the response with the `200` status
  - removed the optional property `status` from the response with the `200` status
  - added the media type `application/json` for the response with the status `401`
  - …10 more
- **2021-03-12** `91690cbfa230` — 1 warning
  - deleted the `header` request parameter `Correlation-ID`

[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/43d5d4e000ad/schema)
