FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.2   R E S T   S T D   G E O G R A P H Y   U T I L I T Y

Standard Geographies by Attributes Endpoint

Geography location names and IDs are returned for a string-based query.

 

Availability: Business Analyst Online, Business Analyst Server.

 

URL Example

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/StdGeographiesByAttributes/execute

Specific Parameters

Parameter

Description

GeoLevelID (required)

The unique identifier for the standard geography level. The list of available geography levels could be retrieved with Get Standard Geography Levels endpoint. Type string.

SearchString (required)

A string to search in names of geography locations. Type string.

Other Parameters

Parameter

Description

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

compatibility (optional)

Business Analyst Server version the JSON output is compatible with. Type string.

f (optional)

Response format. Type string. Available formats: HTML, JSON, PJSON, XML.

Default: HTML.

IsFullErrorMessage (optional)

Mode for composing error messages. Type boolean.

Default: false.

token

Authentication token. This parameter is required if your Business Analyst Server is secured. Type string.

Returns

Array of StdGeographiesReturnedFeature containing the list of IDs and names of features selected. In the case of JSON and PJSON response types, the response format depends on the compatibility parameter value.

Remarks

The SearchString parameter can contain up to two comma-separated substrings. The first substring specifies the criterion for search in the location name field and the last substring specifies the criterion for search in the location ID field. If the second string is omitted together with a delimiting comma, the search is applied to both location names and IDs with the same search criterion. The search is applied using logical "or" operation: a location matches the search criterion if either its name contains the name search substring or its ID contains the ID search substring. The case of an empty name or ID search substring means skipping search by name or ID, respectively. If both substrings are empty, all locations of the standard geography level are returned.

 

Example

Description

"San,123"

Searches location name containing "San" substring or location ID containing "123" substring.

"123"

Searches location name containing "123" substring or location ID containing "123" substring.

",123"

Searches location ID containing "123" substring.

"San,"

Searches location name containing "San" substring.

","

Returns all locations of the standard geography level.

Example Usage

The example below requests an array of ID/Name locations from a standard geography level filtering them by a search criterion. The list of available geography levels could be retrieved with Get Standard Geography Levels endpoint.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/StdGeographiesByAttributes/execute?
GeoLevelID=US.Counties&
SearchString=San&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"StdGeographyFeatures",
      "dataType":"BAStdGeographiesFeatures",
      "value":
      [
        {
          "ID":"04023",
          "Name":"Santa Cruz County",
          "StateName":"Arizona",
          "StateAbbrev":"AZ"
        },
        ...
        {
          "ID":"54073",
          "Name":"Pleasants County",
          "StateName":"West Virginia",
          "StateAbbrev":"WV"
        }
      ]
    }
  ],
  "messages":
  [
  ]
}

 

NOTE: The response has been abbreviated where "..." is noted.

 

See Also

Business Analyst Server REST Reference