• 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

    using the rest api to query multiple XID pointValues versus single XID

    Dashboard Designer & Custom AngularJS Pages
    3
    7
    3.4k
    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.
    • D
      djmolloyjr22
      last edited by

      Hello-

      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?

      Thanks,

      Dan

      1 Reply Last reply Reply Quote 0
      • terrypackerT
        terrypacker
        last edited by

        Dan,

        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:

        http://localhost:8080/rest/v1/realtime.json?in(xid,(DP_1,DP_1))&limit(100)

        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:

        http://localhost:8080/rest/v1/realtime.json?limit=100

        Where the limit is greater than or equal to the number of points in your Point Hierarchy.

        1 Reply Last reply Reply Quote 1
        • R
          radu.cigmaian
          last edited by

          any follow up on this feature?

          1 Reply Last reply Reply Quote 0
          • terrypackerT
            terrypacker
            last edited by

            This has been implemented in Mango 2.6.x and above when you have the mangoApi module installed.

            Using RQL:

            http://mangohost:mangoport/rest/v1/realtime?xid=DP_xxx0|xid=DP_xxx1

            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.

            1 Reply Last reply Reply Quote 0
            • R
              radu.cigmaian
              last edited by

              I've tried this and I'm getting
              url: "/rest/v1/realtime?xid=DP_353314|xid=DP_369714|xid=DP_154277"
              Request Method:GET
              Status Code:406 Not Acceptable

              1 Reply Last reply Reply Quote 0
              • R
                radu.cigmaian
                last edited by

                I'm having mangoApi 1.1.0 - *** unlicensed *** installed

                1 Reply Last reply Reply Quote 0
                • terrypackerT
                  terrypacker
                  last edited by

                  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.

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