Skip to main content
Gathering Interest

Cognite Javascript SDK enhancement

Related products:API and SDKs
  • November 29, 2024
  • 0 replies
  • 39 views

Hi,

Referring to this ticket:

https://hub.cognite.com/slb-community-forum-288/maturity-of-cognite-javascript-sdk-4319

We use this Javascript SDK function DataPointsAPI.retrieve retrieve the aggregated data points for multiple timeseries externalids with different granularities like 1min, 10 min. If the datapoints for multiple timeseries externalids goes beyond 10000, then SDK (internally API) throws this error 

{
    "error": {
        "code": 400,
        "message": "Sum of limits for aggregate data points can not exceed 10000"
    }
}

 

Is it possible to handle this scenario in SDK itself and returns the cursor accordingly. Instead of throwing an error, if the datapoints across timeseries external ids goes beyond 10000, then SDK could retry the API call with default limits and return the cursor. 

 

The another option could be to consider Limit as None like Python SDK and SDK does the required optimizations so client doesn’t need to handle many conditions. 

0 replies

Be the first to reply!

Reply


Cookie Policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie Settings