➑️ query-layer-data-spec

GET https://{{host}}.arcgis.com/{{org_id}}/ArcGIS/rest/services/{{service_name}}/FeatureServer/{{layer_id}}/query

Use the query operation to access de data in a feature layer. Learn more about what Feature layers are and how they work in ➑️ query-feature-layer-metadata-spec

Query layer HTML interface

In the [Structures and definitions] folder you will find request to help you setting the: host, org_id, service_name and layer_id environment variables.

πŸ“„ API reference: query operation
πŸ§ͺ Playground: each Feature Layer includes a web interface under the URL https://<host>.arcgis.com/<org_id>/ArcGIS/rest/services/<service_name>/FeatureServer/<layer_id>/query (Utils: video tutorial & Chrome Extension) πŸ“™ Related guides: Hosted feature layers > Get feature layer data

Request Params

KeyDatatypeRequiredDescription
fstring(Required) Format of the response: html
tokenstringYou need a valid access token if acccessing private layers. To learn more, read the collection's documentation.
wherestringSQL where clause syntax
geometrystringGeometry to apply as the spatial filter.
geometryTypestringesriGeometryPoint
spatialRelstringThe spatial relationship to be applied to the input geometry for the query. esriSpatilRelIntersects
outFieldsstringList of fields to include in the returned result.
returnGeometrystringThe default is true.
resultRecordCountstringFetch query results up to the number specified.