using the rest api to query multiple XID pointValues versus single XID
Using the swagger REST API, is there a way to pass an array of XID to the point-values or the /v1/realtime api and the output would return a JSON set of results? Passing one XID per REST call seems like it would be too intensive. For example, I'd like to get the values of the points in a specific hierarchy. I can scrape the XID from the pointHierarchy and then iterate for each XID but that doesn't seem optimal. Any idea for improvement?
There is no way to currently get a list of realtime values for multiple points by filtering by data point XID. The next release of Mango will have some RQL endpoints. I can see if I can put it in for the realtime endpoint, this would allow you to perform SQL-like queries via the URL such as:
More on RQL here: https://github.com/persvr/rql
For now you could just request ALL the realtime data and filter it by XID on the client side. See this:
Where the limit is greater than or equal to the number of points in your Point Hierarchy.
any follow up on this feature?
This has been implemented in Mango 2.6.x and above when you have the mangoApi module installed.
There is no explain endpoint on this controller yet so you will have to play around with what you can and cannot achieve via RQL.
I've tried this and I'm getting
Status Code:406 Not Acceptable
I'm having mangoApi 1.1.0 - *** unlicensed *** installed
I've tested it on the 1.1.1 module that is about to be released with Mango 2.7.0 this week and it works fine with that version. You may have to wait as I'm not 100% sure when that feature was added.