get /point-values/multiple-arrays/latest/{xids}
-
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
-
@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.
-
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.
-
@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. -
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
-
@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 firstTest2: 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 largeConclusion:
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.
-
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?
-
@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. -
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?
-
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.
-
Thanks for taking a second look, reporting your experience, and the kind words!