Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
/data-sources API - Limits results to 100 items
-
When running the /data-sources GET via the API the total reports the actual number of data sources we have, but the items array is limited to 100 data sources.
Is there a "limit" parameter or paging option that I'm missing?
How can I get all of the data sources returned to me via the API?
Thanks,
Chad -
Yes, limit is set to 100 by default. Same goes for datapoints. Try limit=-1 as a parameter. I believe will tell it to pull all.
Use swagger to test your api calls.
Fox
-
Thanks once again, Fox, for the help!
It took us a little bit to figure out the syntax, but got it working: /rest/v2/data-sources?limit(1000)
We tried to use -1, but that created a 500 error.
Could not write JSON: PreparedStatementCallback; bad SQL grammar [select `ds`.`id`, `ds`.`xid`, `ds`.`name`, `ds`.`dataSourceType`, `ds`.`data`, `ds`.`editPermission` from dataSources AS ds limit ?]
Not a big deal for our purposes though.
-
Bizarre, help docs used to mention using -1 as no limit. Glad you have got it sorted!
Fox