ArcGIS REST API

Get Flags (Network Diagrams)

Description

The getFlags operation is performed on a Diagram resource. The result of this operation is a JSON Information object which returns the list of diagram element id bringing a flag, with its flag type and its location.

It is used to get the root junction, end junction, pivot junction and barrier flag on a particular diagram feature.

License:
The ArcGIS Utility Network Management extension is required to use this operation.

Request Parameters

ParameterDetails
gdbVersion

Description: The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1

sessionId

Description: The token (guid) used to lock the version.

Syntax: sessionId=<guid>

Example: sessionId=44G259DE-87B0-407D-8F2E-DCB7665DD0F0

flagType

Required

Description: The type of flag you want to search for on the diagram resource.

Syntax: flagType=<esriDiagramRootJunction | esriDiagramEndJunction | esriDiagramPivotJunction | esriDiagramBarrierEdge | esriDiagramBarrierJunction>

Example: flagType=esriDiagramRootJunction

f

Description: The response format. The default response format is html.

Values: <html | json>

Example Usage

Retrieving all the root flags currently set up on the DiagramTest1 diagram in version ABV1: http://batz.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/getFlags?gdbVersion=ABV1&sessionId=&flagType=esriDiagramRootJunction&f=pjson

JSON Response Syntax

An array of JSON objects composed of three items:

  • flagType—the type of the returned flags; that is, <esriDiagramRootJunction | esriDiagramEndJunction>,
  • ID—the diagram junction element ID the flag is related to,
  • geometry—the location of the flag.

{
 "flags": [
  {"flagType": <flagType1>, "ID": <edgDEID1>,"geometry": <geometry1>},
  …,
  {"flagType": <flagTypeN>, "ID": <edgDEIDN>,"geometry": <geometryN>}
 ]
}

JSON Response Example

{
 "flags": [
  {
   "flagType": "esriDiagramRootJunction",
   "flagID": 1,
   "geometry": {
    "x": 1035414.5756438449,
    "y": 1864932.12482253462,
    "m": null,
    "spatialReference": {
     "wkid": 102671,
     "latestWkid": 3435
    }
   }
  }
 ]
}