Hello,
I need some help with the date query syntax I am supposed to use for the REST API. I am trying to only bring records that happen before 2024-01-01. Here is the url I generated for the request:
'https://api.combocurve.com/v1/projects/62cae85ce990d000121d05d2/scenarios/62cae877e786780012531f9a/econ-runs/62caeb92e990d000121d0795/monthly-exports/713611d7-1a54-43bc-88aa-49d4a941770c?take=200&date[le]=2024-01-01'
This is still returning 600 rows (50 years of data) for that well. What should I do differently?
Hello,
The date query syntax you are using is correct.
For the monthly-exports endpoints you need to specify the filters when you create the export (in the POST). Right now, we are ignoring unknown filters, that is the reason why you aren’t getting an error when you provide the date filter in the GET /projects/:pid/scenarios/:sid/econ-runs/:rid/monthly-exports endpoint, but it just ignored. If you want to provide filters for monthly export you need to:
- Create the export using the filters
POST /projects/:pid/scenarios/:sid/econ-runs/:rid/monthly-exports?<field>=<value>
- Paginate over the results without additional filters, result data is already filtered because filters were specified on the post
GET /projects/:pid/scenarios/:sid/econ-runs/:rid/monthly-exports.
In the current REST API version, It isn’t possible to use operators for the monthly-exports endpoints. So right now, it is not possible to filter by date[le]=2024-01-01.
Thanks Jorge,
I am still running into issues. Here is my post URL
‘https://api.combocurve.com/v1/projects/62cae85ce990d000121d05d2/scenarios/62cae877e786780012531f9a/econ-runs/62caeb92e990d000121d0795/monthly-exports?date[le]=2024-01-01’
And here is how I am posting:
response = requests.request("POST", url, headers=auth_headers)
But I am getting a Response 400
Hi @eduardomar -
The filter you are passing will not work in the current version of the REST API. We are in the middle of adding this feature of a date filter. Currently, the dev is complete. Testing is in progress. Once released, we’ll notify everybody on this forum.
Hi @sopheap.meas is there any filter that will work with the current version or I should just wait for the update?