• Recent
    • Tags
    • Popular
    • Register
    • Login

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    /data-sources API - Limits results to 100 items

    User help
    2
    4
    723
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • cmusselmC
      cmusselm
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • MattFoxM
        MattFox
        last edited by

        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

        Do not follow where the path may lead; go instead where there is no path.
        And leave a trail - Muriel Strode

        1 Reply Last reply Reply Quote 0
        • cmusselmC
          cmusselm
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • MattFoxM
            MattFox
            last edited by

            Bizarre, help docs used to mention using -1 as no limit. Glad you have got it sorted!

            Fox

            Do not follow where the path may lead; go instead where there is no path.
            And leave a trail - Muriel Strode

            1 Reply Last reply Reply Quote 0
            • First post
              Last post