Geo_question_name parameter


I need to use the parameter geo_question_name in a query with the API. I need to apply different geometries for some features. I appreciate some help with an example.

Welcome to the community, @adchp! Is geo_question_name a variable name in your case?

I found this in the API documentation:

About the GeoJSON format

Requesting the geojson format returns a FeatureCollection where each submission is a Feature. If your form has multiple geographic questions, use the geo_question_name query parameter to determine which question’s responses populate the geometry for each Feature; otherwise, the first geographic question is used. All question/response pairs are included in the properties of each Feature, but repeating groups are omitted.

Question types are mapped to GeoJSON geometry types as follows:

  • geopoint to Point;
  • geotrace to LineString;
  • geoshape to Polygon.

But I already have the solution. The geo_question_name parameter must be used as the following example:

https://[kpi-url]/api/v2/assets/[asset-uid]/data.geojson/?geo_question_name=[name of the geographic question]

This will return a GeoJSON file with the type of geometry that you need.


Thank you for sharing your solution

1 Like