FRAMES | NO FRAMES

 

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

Open Feature Layer Endpoint

Returns a repository feature layer item as a serialized Esri Feature RecordSet.

 

Availability: Business Analyst Server.

 

URL Example

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

Parameters

Parameter

Description

Item (required)

Folder item containing a feature layer. Type esriFolderItem.

f (optional)

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

Default: HTML.

OutputSpatialReference (optional)

An option specifying the spatial reference to return the output feature layer. Type SpatialReference. If this parameter is missing, the output record set will be returned in the default spatial reference. See Get Default Spatial Reference lookup operation to query the default spatial reference.

ReturnGeometry (optional)

An option specifying the presence of the shape attribute in the returned record set. Type boolean.

Default: true.

token

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

Returns

Variable of type TaskResultOutput containing the repository feature layer as the RecordSet property.

Example Usage

The example below retrieves an existing feature layer item from Business Analyst Server Repository.

 

NOTE 1: The example uses the "Potential Sites" point layer already created in the Store Layers folder of the San Francisco Tutorial Project of the Default Workspace.

 

NOTE 2: The name of the Object ID attribute of features depends on a feature class workspace type used. Typical names for Object ID are "FID", "OID", or "OBJECTID".

 

Request

http://localhost:6080/arcgis/rest/services/DefaultMap/MapServer/exts/BAServer/OpenFeatureLayer/execute?
Item={
  "WorkspaceName":"Default Workspace",
  "ProjectName":"San Francisco Tutorial Project",
  "folderType":"esriFolderStoreLayers",
  "itemName":"Potential Sites"
}&
f=PJSON

 

Response

{
  "results":
  [
    {
      "paramName":"OutputFeatureClass",
      "dataType":"GPFeatureRecordSetLayer",
      "value":
      {
        "geometryType":"esriGeometryPoint",
        "spatialReference":
        {
          "wkid":4326
        },
        "fieldAliases":
        {
          "OBJECTID":"FID",
          "Loc_name":"Loc_name",
          "Status":"Status",
          "Score":"Score",
          "Side":"Side",
          "X":"X",
          "Y":"Y",
          "Match_addr":"Match_addr",
          "Block":"Block",
          "St_Side":"St_Side",
          "BlockL":"BlockL",
          "BlockR":"BlockR",
          "STORE_ID":"STORE_ID",
          "NAME":"NAME",
          "ADDRESS":"ADDRESS",
          "CITY":"CITY",
          "STATE":"STATE",
          "ZIP":"ZIP",
          "ST_DESC":"ST_DESC"
        },
        "fields":
        [
          {
            "name":"OBJECTID",
            "type":"esriFieldTypeOID",
            "alias":"FID"
          },
          ...
          {
            "name":"ST_DESC",
            "type":"esriFieldTypeString",
            "alias":"ST_DESC",
            "length":254
          }
        ],
        "features":
        [
          {
            "geometry":
            {
              "x":-122.435438,
              "y":37.7616710000001,
              "spatialReference":
              {
                "wkid":4326
              }
            },
            "attributes":
            {
              "OBJECTID":1,
              "Loc_name":"Address_Points",
              "Status":"M",
              "Score":100,
              "Side":"",
              "X":-122.435438,
              "Y":37.761671,
              "Match_addr":"450 CASTRO ST, SAN FRANCISCO, CA, 94114",
              "Block":"060750205001007",
              "St_Side":"R",
              "BlockL":"",
              "BlockR":"",
              "STORE_ID":1,
              "NAME":"Potential Site 1",
              "ADDRESS":"450 Castro Street",
              "CITY":"San Francisco",
              "STATE":"CA",
              "ZIP":94114,
              "ST_DESC":""
            }
          },
          ...
          {
            "geometry":
            {
              "x":-122.437664548012,
              "y":37.7745494836577,
              "spatialReference":
              {
                "wkid":4326
              }
            },
            "attributes":
            {
              "OBJECTID":3,
              "Loc_name":"Street_Address",
              "Status":"M",
              "Score":82,
              "Side":"L",
              "X":-122.437661862894,
              "Y":37.774549461638,
              "Match_addr":"550 DIVISADERO ST, SAN FRANCISCO, CA, 94117",
              "Block":"",
              "St_Side":"",
              "BlockL":"060750164001003",
              "BlockR":"060750164001003",
              "STORE_ID":3,
              "NAME":"Potential Site 3",
              "ADDRESS":"550 Divisadero Street",
              "CITY":"San Francisco",
              "STATE":"CA",
              "ZIP":94114,
              "ST_DESC":""
            }
          }
        ]
      }
    }
  ],
  "messages":
  [
  ]
}

 

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

 

See Also

Business Analyst Server Repository

Business Analyst Server REST Reference