GET /{serviceName}/FeatureServer/{layerId}/query

arcgis.com:arcgis-rest-api

Summary: Query Feature Service Layer
Operation ID: queryFeatureLayer
Auth: unknown
Description

Performs a query operation on a feature layer or table resource.

Parameters (17)

f (string, query, optional, default: json)

Response format

Constraints: {'enum': ['json', 'html', 'geojson', 'pbf']}

geometry (string, query, optional)

The geometry to apply as the spatial filter

geometryType (string, query, optional)

The type of geometry

Constraints: {'enum': ['esriGeometryPoint', 'esriGeometryMultipoint', 'esriGeometryPolyline', 'esriGeometryPolygon', 'esriGeometryEnvelope']}

groupByFieldsForStatistics (string, query, optional)

Fields to group by for statistics

layerId (integer, path, required)

Layer ID

objectIds (string, query, optional)

Comma-separated object IDs to query

orderByFields (string, query, optional)

Fields to order results by

outFields (string, query, optional)

Comma-separated fields to return (* for all)

outStatistics (string, query, optional)

JSON array of statistics definitions

resultOffset (integer, query, optional)

Number of records to skip

resultRecordCount (integer, query, optional)

Maximum records to return

returnCountOnly (boolean, query, optional, default: False)

If true, returns only the count

returnGeometry (boolean, query, optional, default: True)

If true, includes geometry in results

returnIdsOnly (boolean, query, optional, default: False)

If true, returns only object IDs

serviceName (string, path, required)

Name of the feature service

spatialRel (string, query, optional)

The spatial relationship

Constraints: {'enum': ['esriSpatialRelIntersects', 'esriSpatialRelContains', 'esriSpatialRelCrosses', 'esriSpatialRelEnvelopeIntersects', 'esriSpatialRelOverlaps', 'esriSpatialRelTouches', 'esriSpatialRelWithin']}

where (string, query, optional)

A WHERE clause for the query filter

No probe data for this endpoint yet.