-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation on the fields
query param on the JSON Data endpoint
#2052
Comments
Ive had a look at this and I believe the According to this documentation, the A sample of request fetching geojson XForm data using this query param would be:
The response seems to iterate over all the submissions and append the value of the {"type": "FeatureCollection", "features": [{"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [36.744421, -1.29943]}]}, "properties": {"id": 60549136, "xform": 513322, "_last_edited": null}}, {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [36.744595, -1.29973]}]}, "properties": {"id": 60549177, "xform": 513322, "_last_edited": null}}, {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [-56.217314, 44.840291]}]}, "properties": {"id": 64999082, "xform": 513322, "_last_edited": null}}, {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [27.874707, 45.336702]}]}, "properties": {"id": 64999278, "xform": 513322, "_last_edited": null}}, {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [34.30051, 48.69096]}]}, "properties": {"id": 64999819, "xform": 513322, "_last_edited": null}}, {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [58.157921, 50.958427]}]}, "properties": {"id": 64999942, "xform": 513322, "_last_edited": null}}]} A sample of request fetching geojson Submission data using this query param would be:
The response from this would be specific to the submission, and append the value of the {"type": "Feature", "geometry": {"type": "GeometryCollection", "geometries": [{"type": "Point", "coordinates": [36.744421, -1.29943]}]}, "properties": {"id": 60549136, "xform": 513322, "_last_edited": null}} Further information on how to use the |
Issue with the current documentation is that it implies the i.e https://stage-api.ona.io/api/v1/data/.json?fields=["_id"] |
field
query param for the data viewsetfields
query param on the JSON Data endpoint
Requested Documentation Change
Currently, the documentation is a bit unclear on how the
fields
query works and where the query parameter is usable. It would be nice to add documentation on how the query parameter can be used and the type of responses it returns. The field is currently documented on the GeoJSON side of the endpoint but that functionality works a bit different from the JSON fields query paramSuggested changes
fields
query param when used on thegeojson
formatfields
query param when used on thejson
formatThe text was updated successfully, but these errors were encountered: