转载于https://digitalsupport.ge.com/communities/en_US/Article/Maximum-Query-Limit-ignored-by-RestAPI-how-to-increase-it
Objective
I’m using the restAPI in to query data, but when I try to query 1/minute data for any tag longer than 4 days I get error -24, upper limit of 5,000 has been exceeded.
Long story short, error -24 leads us to the Maximum Query Interval set on the DataStores>Global Options tab in Historian, by default it is set to 100,000 - but restAPI clamps the result at 5,000 anyway. Other articles in the KB indicate that some tools like Trend do in fact have a hard limit of 5,000. But I’m just running basic sampled data query.
For good measure, I have tried in two separate applications, KNIME and Postman, but the result is always the same: The restAPI returns Status=200 (success) but the body of the returned request gives error -24, maximum limit of 5,000 exceeded. I also tried to use the count parameter in the query, setting it to 10000, but got the same error and the same limits of 5,000.
Bottom line: The Historian restAPI seems to ignore the Maximum Query Interval parameter and clamps the number of returned values at a paltry 5,000 - where does this limit come from, and how can I raise it?
Environment
Primary Product Module : Other/Unknown
Primary Product Version : 7.1
Procedure
I will request to try following workaround:
-
Go to “C:\Program Files\GE Digital\Historian Embedded Web Server\webapps\historian-rest-api\WEB-INF\classes”.
-
open the “application.yml” file in notepad.
-
Change following option in “application.yml” file:
maxNumberOfTags: 100000
multipleTagsQueries: true
search:
pageSize: 0
maxPageSize: 0
-
Restart “Historian Embedded Tomcat Container” service.
-
Wait till the CPU uses on Historian server goes down and then try to do the same query.
Note: You can increase the as per your use.