- URL:https://<diagram-url>/getFlags
- Version Introduced: 10.6
Description
The getFlags operation is performed on a Diagram resource. The result of this operation is a JSON Information object that returns the list of diagram element IDs 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 active portal account must be licensed with the ArcGIS Advanced Editing user type extension to use this operation.Request parameters
Parameter | Details |
---|---|
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 |
moment | Description: The session moment. Syntax: moment=<moment> Example: moment=1490867969324 |
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 |
outSR | Description: The spatial reference of the returned geometry. The spatial reference can be specified as either a well-known ID or as a spatial reference JSON object. If outSR is not specified, the geometry is returned in the spatial reference of the map. |
f | Description: The response format. The default response format is html. Values: <html | json> |
Example usage
Retrieve all the root flags currently set up on the DiagramTest1 diagram in version ABV1; that is:
- URL: https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/getFlags
- Parameters:
gdbVersion=ABV1 sessionId= moment= flagType=esriDiagramRootJunction outSR= f=pjson
- Sent URL (GET): https://myserver.esri.com/server/rest/services/Naperville/NetworkDiagramServer/diagrams/DiagramTest1/getFlags?gdbVersion=ABV1&sessionId=&moment=&flagType=esriDiagramRootJunction&outSR=&f=pjson
JSON Response syntax
An array of JSON objects composed of three items:{
"flags": [
{"flagType": < flagType1 >, "flagID": < edgDEID1 >,"geometry": < geometry1 >},
…,
{"flagType": < flagTypeN >, "flagID": < 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
}
}
}
]
}