Open
Description
JSON is a widely used format that can be processed in many applications. Accepting JSON as input would increase the usability of the API.
For example https://github.com/GIScience/ohsome-py is logging the data body input it sends to the API in JSON format if the query fails. If the API accepted JSON the logged files could be directly used to reproduce the failed query using curl:
curl --data-urlencode "bpolys@the_bpolys.geojson" \
--data-urlencode "@the_body.json" \
-X POST https://api.ohsome.org/v1/elements/count/groupBy/boundary \
-H "Content-Type: application/json"
Currently manual interaction is necessary to rewrite the query as follows:
curl -d "time=2007-10-08T00:00:00Z,2019-05-04" \
-d "clipGeometry=false" \
...
--data-urlencode "bpolys@the_bpolys.geojson" \
-X POST https://api.ohsome.org/v1/elements/count/groupBy/boundary