Get device attach information

Description

Gets the current attach information for a device. This used to contain additional information now only available through the device log.

Request

GET /v1/domains/:domain/devices/:deviceId/attach-info

Response

Successful response contains the following JSON formated body:

{
   device: {
     deviceId: string,
    domain: string,
    attached: boolean,
    lastAttach: string,
    lastDetach: string 
  }
}

Response Status codes:

  • 200 on success

  • 404 If the device has never been online.

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/domains/:domain/devices/:deviceId/attach-info" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>"

Response

{
   device: {
     deviceId: "a.mydomain.example.net",
    domain: "mydomain.example.net",
    attached: true,
    lastAttach: "<lastAttach>",
    lastDetach: "<lastDetach>" 
  }
}