• 0
Sign in to follow this  
Mosh

REST API - How to get all instance for a datasource

Question

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.

 

 

Edited by Mosh

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

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.

Share this post


Link to post
Share on other sites
  • 0
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.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this