How to get statistics
The statistics endpoint provides the number of features in a layer, the size, and a list of properties on the layer.
GET /<Base path for the interactive API from the API Lookup Service>/layers/<Layer ID>/statistics
Host: <Hostname for the interactive API from the API Lookup Service>
Authorization: Bearer <Authorization Token>
Cache-Control: no-cacheNote
For authorization in a GET request you can also use an API Key as a query parameter instead of a bearer token in an authorization header.
Response
{
"type": "StatisticsResponse",
"count": {
"value": 29208,
"estimated": true
},
"byteSize": {
"value": 108364,
"estimated": true
},
"bbox": {
"value": [
-10,
-10,
10,
10
],
"estimated": true
},
"geometryTypes": {
"value": [
"Point"
],
"estimated": true
},
"properties": {
"value": [
{
"key": "Route",
"count": 29208,
"searchable": true
},
{
"key": "Route Type",
"count": 29208,
"searchable": true
}
],
"estimated": true,
"searchable": "PARTIAL"
}
}Note
When using a version enabled interactive map layer, statistics will not be applicable on all versions of a layer.
Updated 25 days ago