• 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

    get /point-values/multiple-arrays/latest/{xids}

    User help
    2
    12
    2.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
      Desmond
      last edited by Desmond

      0_1566294216773_XIDS.jpg

      Hi all,

      Refer to the photo attached, I have tried to guess the correct string for the input field in the points xids but no success.

      "DP_XID1, DP_XID2" --Code404:(Error: Not Found)
      [DP_XID1, DP_XID2] --Code404:(Error: Not Found)
      /DP_XID1/DP_XID2--Code404:(Error: Not Found)
      {DP_XID1, DP_XID2} --Code404:(Error: Not Found)
      "DP_XID1", "DP_XID2"--Code404:(Error: Not Found)

      I want to get latest values for multiple data Points in swagger:
      get /point-values/multiple-arrays/latest/{xids}.

      Hope that someone will provide me the correct string.
      Thank you.

      [edit as per @phildunlap comment]

      1 Reply Last reply Reply Quote 0
      • phildunlapP
        phildunlap
        last edited by

        Hi Desmond,

        Did you try a comma between the XIDs and no space? For instance, navigating to this address once I've logged into Mango in a browser allows me to get the response:

        http://localhost:8081/rest/v2/point-values/multiple-arrays/latest/brown,DP_5016c01c-a345-4604-af6b-aec8343189f9

        I want to get latest values for multiple data Points in swagger:

        get /point-values/multiple-arrays/latests/{xids}.

        Probably not the issue since you are using swagger, but it should be /multiple-arrays/latest , not latests

        D 1 Reply Last reply Reply Quote 0
        • D
          Desmond @phildunlap
          last edited by Desmond

          @phildunlap
          Hmm... interesting! I have followed your comments to provide the 2 XIDs without a space.

          Here my expect object:
          I should expect {"DP_XID1":[{"timestamp":1566370945515,"value":202875.0},....}],
          "DP_XID2":[{"timestamp":1566370945515,"value":228536.0},....}]}

          Here my return object:
          However, the result is always return a {object [array]} of only the first DP_XID1, ignoring the second DP_XID2.
          {"DP_XID1":[{"timestamp":1566370945515,"value":202875.0},....}]}

          I have tried both in URL(Mango core 3.6.X) and swagger(V2) giving me the same behaviour. Could it be something that i have misinterpret the return object?

          Thank you for your attention.

          1 Reply Last reply Reply Quote 0
          • phildunlapP
            phildunlap
            last edited by

            You should see the key for the second XID after all the values in the series for the first, as a key in the outermost object. This is what multiple arrays means, each point has its whole data series in an array off its XID, with no intermixing.

            D 1 Reply Last reply Reply Quote 0
            • D
              Desmond @phildunlap
              last edited by

              @phildunlap
              Thank you for your insight.
              I just find it odd that I cannot find the key for the second XID after all the values in the series for the first.
              Perhap you may help to double check for the second XID appear after executing the get method.
              Maybe I should consider to change my pair of spectacles.
              Thank you for your attention once again.

              1 Reply Last reply Reply Quote 0
              • phildunlapP
                phildunlap
                last edited by phildunlap

                I certainly did check. If you didn't have read permission to the second point it would come back with an "unauthorized" response, and would be a "not found" if no such point exists. Perhaps it would be more evident with less data returned. Did you try setting a limit, as with ?limit=1 added at the end of the URL?

                Edit: it could be there was corruption in the series, but then I would expect running the request again should work. Also it would be noted either in your Mango/logs/ma.log file or the Mango/logs/iastsdb-corruption.log

                1 Reply Last reply Reply Quote 0
                • D
                  Desmond
                  last edited by

                  @phildunlap,
                  Thank for your guidance to direct me to dive deeper into this issue.

                  Here are my findings: get /point-values/multiple-arrays/latest/{xids}

                  Test1: request size limit 5000, default is TIMESTAMP,VALUE
                  It's very likely to miss the key for the second XID after all the values in the series for the first

                  Test2: no request size limit, default is TIMESTAMP,VALUE
                  It's very likely to miss the key for the second XID after all the values in the series for the first if the metadata is very large

                  Conclusion:
                  It seems to me that there is a limitation on the maximum length of character for serialized to JSON or the payload body. It is always necessary to include a reasonable size limit to avoid missing point values.

                  Hope that it gives some values to whoever reading this post.

                  Thank you one more time for your attention.

                  1 Reply Last reply Reply Quote 0
                  • phildunlapP
                    phildunlap
                    last edited by phildunlap

                    My first request was very large and I still saw the second XID. If there is a limit on the payload in the response I don't think it is being imposed by Mango. In multiple arrays the limits apply to each series individually. You can request a 1 millisecond rollup of a series and download many GB all of the sudden (3.6 improved the memory footprint of huge data streams significantly). When you tried a limit of 1 did you always see both XIDs?

                    D 1 Reply Last reply Reply Quote 0
                    • D
                      Desmond @phildunlap
                      last edited by

                      @phildunlap
                      It always see both XIDs for request size limit 1.
                      Out of curiosity I tried up to limit 3000. It works like a breeze. However the break point is when I performed test1 and test2.

                      1 Reply Last reply Reply Quote 0
                      • phildunlapP
                        phildunlap
                        last edited by

                        I was not able to replicate. I downloaded over a hundred thousand values and still saw the second item way down in the response. What does the end of the JSON look like when it doesn't download both? Does it still close the JSON objects and lists properly?

                        1 Reply Last reply Reply Quote 0
                        • D
                          Desmond
                          last edited by

                          Today I restart my mango in my laptop and do a fresh confirmation test. In addition I also cleared all the browsing data for chrome.

                          Whoray! My Test1 & Test2 passed. It works like a breeze.

                          Wonderful! It is so exciting to see Mango has done a tremendous improvement for rest api over the years. This functionality provide more flexibility and powerful to design or integrate our application.

                          @phildunlap, My apology for causing the false alarm. Due to limited knowledge and experience, I fail to do a comprehensive test. Luckily you pick it up and help me to be a better debugger. Thank you for your support and have a nice weekend.

                          1 Reply Last reply Reply Quote 1
                          • phildunlapP
                            phildunlap
                            last edited by

                            Thanks for taking a second look, reporting your experience, and the kind words!

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