FRAMES | NO FRAMES

 

B U S I N E S S   A N A L Y S T   10.5   R E S T   B U S I N E S S E S   S E A R C H   U T I L I T Y

Select Locations Endpoint

Returns business locations matching the given search criteria.

 

Availability: Business Analyst Server.

 

URL Example

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

Parameters

Parameter

Description

GeographyLevelsFilter (required)

Array of strings specifying criteria for search in address fields from top to bottom. Type array of string.

ActiveDatasetID (optional)

ID of the active dataset. Type string.

Default: ID of the first available dataset.

f (optional)

Response format. Type string. Available formats: HTML, JSON, 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

Variable of type TaskResultOutput whose RecordSet parameter contains records with attributes of business locations selected.

Remarks

The GeographyLevelsFilter parameter specifies an array of search criteria whose number is equal to the number of address fields identifying a business location and whose order is from top to bottom. For example, the geography levels filter for USA should contain 3 strings for search in State abbreviation, City name, and ZIP Code fields of business locations. The wildcard * can be substituted instead of any search string. It means that the corresponding field of a business location is ignored in the search.

 

Example

Description

CA;Redlands;92373

Searches for State field containing "CA", City field containing "Redlands", and ZIP5 field containing "92373" substring.

CA;Red;*

Searches for State field containing "CA" and City field containing "Red" substring. ZIP5 field value is any.

CA;*;9237

Searches for State field containing "CA" and ZIP5 field containing "9237" substring. City field value is any.

*;Red;*

Searches for City field containing "Red" substring. State and ZIP5 field values are any.

*;*;*

Returns all available business locations.

 

NOTE 1: The search is case insensitive.

 

NOTE 2: Do not use the wildcard symbol * together with ordinary symbols in one search criterion. In this case, the wildcard symbol will be interpreted as an ordinary symbol and an empty table of business locations will be returned.

 

NOTE 3: The City attribute field of a resulting feature has been occasionally named as COUNTY. This field has been renamed to CITY since Business Analyst Server.

Example Usage

The example below requests business locations whose State field contains "CA" and City field contains "Red" substrings.

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/SelectLocations/execute?
GeographyLevelsFilter=CA;Red;*&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"OutputFeatureClass",
      "dataType":"GPFeatureRecordSetLayer",
      "value":
      {
        "fieldAliases":
        {
          "OBJECTID":"OBJECTID",
          "STATE":"STATE",
          "CITY":"CITY",
          "ZIP5":"ZIP5"
        },
        "fields":
        [
          {
            "name":"OBJECTID",
            "type":"esriFieldTypeOID",
            "alias":"OBJECTID"
          },
          ...
          {
            "name":"ZIP5",
            "type":"esriFieldTypeString",
            "alias":"ZIP5",
            "length":5
          }
        ],
        "features":
        [
          {
            "geometry":
            {
            },
            "attributes":
            {
              "OBJECTID":1,
              "STATE":"CA",
              "CITY":"REDDING",
              "ZIP5":"96002"
            }
          },
          ...
          {
            "geometry":
            {
            },
            "attributes":
            {
              "OBJECTID":22,
              "STATE":"CA",
              "CITY":"RED MOUNTAIN",
              "ZIP5":"93558"
            }
          }
        ]
      }
    }
  ],
  "messages":
  [
  ]
}

 

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

 

See Also

Select Businesses Endpoint

Business Analyst Server REST Reference