Get Device

Description

Get a specific device.

Request

GET /v1/n5/products/:productId/devices/:deviceId

Response

Successful response contains the following JSON formated body:

{
   productId: string,
  deviceId: string,
  name: string|null,
  batchId: number,
  fingerprint: string|null,
  created: string,
  tags: {
    [key: string]: string
  },
  deleted: boolean,
  attached: boolean,
  lastAttach?: string|null,
  lastDetach?: string|null
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • X-Nabto-Organization: <organizationId>

Example

Request

curl "https://api.cloud.nabto.com/v1/n5/products/:productId/devices/:deviceId" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>"

Response

{
   productId: "pr-abcdefgh",
  deviceId: "de-efghijkl",
  name: "friendly name",
  batchId: 42,
  fingerprint: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  created: "2022-10-18T10:17:24.299Z",
  tags: {
    "foo": "bar" 
  },
  deleted: true,
  attached: true,
  lastAttach: "<lastAttach>",
  lastDetach: "<lastDetach>"
}