2

I want to retrieve customer devices including server attributes all at once to display the information in a table, without having to retrieve the list of the devices first and then retrieving the attributes afterwards for each device.

I don't know if it is possible to push server attributes to additionalInfo field that is included in the device response.

Following the Swagger documentation I have this option:

  • Actual Scenario:

1 call:

GET /api/customer/{customerId}/devices{type,textSearch,idOffset,textOffset,limit}
getCustomerDevices

N calls:

GET /api/plugins/telemetry/{entityType}/{entityId}/keys/attributes/{scope}
getAttributeKeysByScope
  • Desired Scenario:

1 call:

GET /api/customer/{customerId}/devices/attributes{type,textSearch,idOffset,textOffset,limit,scope}
getCustomerDevices

But it is not the best.

Device {
    additionalInfo (string, optional),
    createdTime (integer, optional),
    customerId (CustomerId, optional),
    id (DeviceId, optional),
    name (string, optional),
    tenantId (TenantId, optional),
    type (string, optional),
    attributes {   # <<
         client,   # <<
         shared,   # <<
         server.   # <<
    }
 }
CivFan
  • 13,560
  • 9
  • 41
  • 58

0 Answers0