Get Device Log

Description

Get device key for device in Domain.

Request

GET /v1/domains/:domain/devices/:device/logs

Response

Successful response contains the following JSON formated body:

{
   timestamp: string,
  eventType: string,
  domain: string,
  basestation: {
     region: string 
  },
  device: {
     id: string,
    ip: string,
    port: number,
    versionString: string 
  },
  client: {
     id: string,
    ip: string,
    versionString: string 
  },
  connection: {
     type: string,
    receivedBytes: number,
    receivedPackets: number,
    sentBytes: number,
    sentPackets: number,
    duration: number 
  },
  streamStats: {
     rttAvg: number,
    receivedBytes: number,
    receivedPackets: number,
    sentBytes: number,
    sentPackets: number,
    duration: number,
    status: string
  }
}[]

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

Response

{
   timestamp: "2022-10-18T10:17:24.299Z",
  eventType: "<eventType>",
  domain: "mydomain.example.net",
  basestation: {
     region: "<region>" 
  },
  device: {
     id: "<id>",
    ip: "10.0.0.42",
    port: 42,
    versionString: "<versionString>" 
  },
  client: {
     id: "<id>",
    ip: "10.0.0.42",
    versionString: "<versionString>" 
  },
  connection: {
     type: "<type>",
    receivedBytes: 42,
    receivedPackets: 42,
    sentBytes: 42,
    sentPackets: 42,
    duration: 42 
  },
  streamStats: {
     rttAvg: 42,
    receivedBytes: 42,
    receivedPackets: 42,
    sentBytes: 42,
    sentPackets: 42,
    duration: 42,
    status: "<status>" 
  }