Forum Discussion

Mosh's avatar
Mosh
Icon for Professor rankProfessor
7 years ago

REST API - How to get all instance for a datasource

Hi,

Is there a way to get all instances for given data source, but without having to provide device IDs?

The REST API offers the following URI:

URI: /device/devices/{deviceId}/devicedatasources/{deviceDatasourceId}/instances

What I need is the equivalent of something like this:

URI: /datasource/datasources/{datasourceId}/instances

Which would return all instances for the datasource from all devices that have the datasource.  The returned data should include  the "managedObjectName" property so that from the instance we can refer back to a device.

 

 

2 Replies

Replies have been turned off for this discussion
  • I think you can do this with this URI

    /setting/datasources/{datasourceId}/devices

    I had to write a script that would show us how many devices were associated with each datasource in our portal but it was a couple years ago now.

  • On 28/12/2017 at 6:09 PM, Matt Gauthier said:

    I think you can do this with this URI

    /setting/datasources/{datasourceId}/devices

    I had to write a script that would show us how many devices were associated with each datasource in our portal but it was a couple years ago now.

    Hi Matt,

    I'm after the instances in one request rather than getting the devices and having to make subsequent calls per devices.