Skip To Content
ArcGIS Developer
Dashboard

Get Estimates (Feature Service/Layer)

Description

The getEstimates operation returns up-to-date approximations of layer information, such as row count and extent. Layers that support the getEstimates operation will include an infoInEstimates array property that describes what is supported. For example, layers may list the following for infoInEstimates 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 (isDataArchived 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

ParameterDetails
f

The response format. The default format is html.

Values: html | json | pjson

Example usage

The following is a sample request URL for the getEstimates 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
    }
  }
}