Closed wadhwamatic closed 6 months ago
additionally:
vam
query argument can be omitted, in which case both vim
& rfh
are returned in a single responseformat
can be set to csv
for csv response format (can be useful for user bulk download of tabular data). default is json
thanks @valpesendorfer, I edited the original text to add those changes too
I've created a redirect in the current endpoint PRISM is using, to facilitate the switchover and avoid any service disruptions.
So you can:
/stats/admin/fetch
to /stats/admin
admin_code
to id_code
format
, vam
code) which the new API supports.At the moment this will redirect your request to the API deployed at dev.api.earthobservation.vam.wfp.org
but we're very close to rolling that over, and like this there should be no service disruption.
Thanks @valpesendorfer - that's very helpful!
Provide a clear and concise description of what you want to happen.
The HDC Stats API which PRISM uses for charts will be updated soon. The update includes a slight change to the parameters and URL. The following parameter changes have been been implemented on the the API that we need to accommodate in PRISM:
admin_id
is now calledid_code
vam
query argument can be omitted, in which case bothvim
&rfh
are returned in a single responseformat
can be set tocsv
for csv response format (can be useful for user bulk download of tabular data). The default value isjson
See swagger below:
Example requests: New: curl -X 'GET' \ 'https://dev.api.earthobservation.vam.wfp.org/stats/admin?id_code=31&level=0&coverage=full&vam=rfh&start=2024-04-01&end=2024-04-30&format=json' \ -H 'accept: application/json'
Old: curl -X 'GET' \ 'https://api.earthobservation.vam.wfp.org/stats/admin/fetch?admin_id=31&level=0&coverage=full&vam=rfh&start=2024-04-01&end=2024-04-30' \ -H 'accept: application/json'
Note that once we're ready on the PRISM side, dev.api.earthobservation.vam.wfp.org will replace api.earthobservation.vam.wfp.org. This will be a breaking change for PRISM deployments.
Is there anything else you can add about the proposal? You might want to link to related issues here, if you haven't already.
@valpesendorfer - anything to add?