Get Flags (Network Diagrams)


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.

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

Request Parameters


Description: The name of the geodatabase version.

Syntax: gdbVersion=<version>

Example: gdbVersion=ABV1


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

Syntax: sessionId=<guid>

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



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

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

Example: flagType=esriDiagramRootJunction


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:

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