Get all device keys

This function is deprecated and should not be used for new implementations: use GET /v1/domains/:domain/configured-devices

Description

Get all device key for a Domain.

Request

GET /v1/domains/:domain/keys/devices

Response

Successful response contains the following JSON formated body:

{
  keys: {
    deviceId: string,
    preSharedKey: string,
    tags?:{
      [key: string]: string
    },
    created: 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/keys/devices" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>"

Response

{
   keys: [{
     deviceId: "a.mydomain.example.net",
    preSharedKey: "01010101010101010101010101010101",
    tags:{
      "foo": "bar" 
    },
    created: "2022-10-18T10:17:24.299Z" 
  },
  ...]
}