Get Estimates (Feature Service/Layer)

URL:
https://<root>/<serviceName>/FeatureServer/<layerId>/getEstimates
Methods:
GET
Version Introduced:
10.9.1

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:

Use dark colors for code blocksCopy
1
2
3
4
"infoInEstimates": [
  "extent",
  "count"
],

Tables may list the following as they do not have features, and therefore extent is not applicable:

Use dark colors for code blocksCopy
1
2
3
"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:

Use dark colors for code blocksCopy
1
https://machine.domain.com/webadaptor/rest/services/GasNetwork/FeatureServer/0/getEstimates?f=pjson

JSON Response syntax

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "count": <number of rows>,
  "extent": {
    "xmin": <xmin>,
    "ymin": <ymin>,
    "xmax": <xmax>,
    "ymax": <ymax>
    "spatialReference": {
      "wkid": <wkid>,
      "latestWkid": <latestWkid>
    }
  }
}

JSON Response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
{
  "count": 931,
  "extent": {
    "xmin": 470789.09879999992,
    "ymin": 3597733.2151200008,
    "xmax": 531454.26599999971,
    "ymax": 3639864.79208,
    "spatialReference": {
      "wkid": 26911,
      "latestWkid": 26911
    }
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.