- URL:
- https://<root>/<serviceName>/FeatureServer/<layerId>/getEstimates
- Methods:
GET
- Version Introduced:
- 10.9.1
Description
The get
operation returns up-to-date approximations of layer information, such as row count and extent. Layers that support the get
operation will include an info
array property that describes what is supported. For example, layers may list the following for info
if they support getting estimates of both count and extent:
"infoInEstimates": [
"extent",
"count"
],
Tables may list the following as they do not have features, and therefore extent is not applicable:
"infoInEstimates": [
"count"
],
The extent is returned as an envelope and may be larger than the exact extent of the data.
Count returns the total row count from the data in the back-end data store. The value returned does not apply any attribute or spatial filters that may be baked into the layer. If the data is archived (is
is true
), the count will be based on the entire archive, not just the live rows. Branch versioned and archived, non-versioned data, are data types that are archived. Traditional versioned layers and tables do not support count.
Request parameters
Parameter | Details |
---|---|
| The response format. The default format is Values: |
Example usage
The following is a sample request URL for the get
resource:
https://machine.domain.com/webadaptor/rest/services/GasNetwork/FeatureServer/0/getEstimates?f=pjson
JSON Response syntax
{
"count": <number of rows>,
"extent": {
"xmin": <xmin>,
"ymin": <ymin>,
"xmax": <xmax>,
"ymax": <ymax>
"spatialReference": {
"wkid": <wkid>,
"latestWkid": <latestWkid>
}
}
}
JSON Response example
{
"count": 931,
"extent": {
"xmin": 470789.09879999992,
"ymin": 3597733.2151200008,
"xmax": 531454.26599999971,
"ymax": 3639864.79208,
"spatialReference": {
"wkid": 26911,
"latestWkid": 26911
}
}
}