Export Network

URL:
https://<network-layer-url>/exportNetwork
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.9

Description

This operation exports an LRS Network then maintains the differences (deltas), which can be queried to list changes that have been made to route features during a period of time. External systems can use this information at regular intervals to synchronize themselves to route edits in the LRS Network.

Request parameters

ParameterDetails

f

(Optional)

Specifies the response format. The default response format is html.

Values: html | json | pjson

lastInvokedTime

(Optional)

Specifies the time value of the last time this operation was executed. When an external system makes an export network request, the time of the request is returned in the response (based on the date and time of the ArcGIS Server system time). The external system should pass this date and time back to this call on subsequent requests if they only want changes to the LRS since the last time they made this request.

If no value is provided, all routes and related information are exported across all time.

If the lastInvokedTime parameter is provided and the lrsTime and lastLrsTime parameter are not, all changed routes since lastInvokedTime are exported.

Changed routes are exported according to the provided time parameters (lastInvokedTime, lrsTime, lastLrsTime), which act as a temporal filter. These constraints result in one of the following:

  • Routes that were edited between the last and current invocation time (the LRS edit log transaction date) are exported for the desired LRS time (the start and end time on a route).
  • Routes that were edited before the last time of invocation (the LRS edit log edit transaction date) that apply to the current LRS time, but not to the previous LRS time (start and end time on route), are exported.

The parameter value for lastInvokedTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax:

Use dark colors for code blocksCopy
1
lastInvokedTime=<DateTime>

Example:

Use dark colors for code blocksCopy
1
lastInvokedTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lrsTime

(Optional)

Specifies the temporal view date on which route edits are inspected.

ArcGIS Location Referencing stores routes and other network details with different representations across time. This parameter can be used to focus the time view of the network changes to be processed, which is especially useful for external systems that don't support multiple representations of the LRS network across time. For such systems, a specific time snapshot of the LRS can be requested.

If no value is provided, then all routes and related information are exported across all time.

If a value is provided, it is used as a temporal filter to export changed routes, along with lastInvokedTime and lastLrsTime.

The parameter value for lrsTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax:

Use dark colors for code blocksCopy
1
lastLrsTime=<DateTime>

Example:

Use dark colors for code blocksCopy
1
lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lastLrsTime

(Optional)

Specifies the lastLrsTime that the caller used in the previous call to this service.

The provided value is used to identify route changes that have already been exported in previous invocations.

If a value is provided, it is used as a temporal filter along with lastInvokedTime and lastLrsTime to export changed routes.

If no value is provided, all routes and related information are exported across all time.

The parameter value for lastLrsTime is a number that represents the number of milliseconds since epoch (January 1, 1970) in UTC.

Syntax:

Use dark colors for code blocksCopy
1
lastLrsTime=<DateTime>

Example:

Use dark colors for code blocksCopy
1
lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

outputFormat

(Optional)

Determines the data format of the output event records.

The following output formats are supported:

  • FGDB—Zipped File Geodatabase.
  • JSON—Zipped JavaScript Object Notation file.

Syntax:

Use dark colors for code blocksCopy
1
outputFormat=<format>

Example 2:

Use dark colors for code blocksCopy
1
outputFormat="FGDB"

Example 1:

Use dark colors for code blocksCopy
1
outputFormat="JSON"

outputSrWkid

(Optional)

Specifies the spatial reference to output.

Syntax:

Use dark colors for code blocksCopy
1
outputSrWkid=<integer>

Example:

Use dark colors for code blocksCopy
1
outputSrWkid=2250 (NAD1983 StatePlane Massachusetts Island FIPS 2002)

precision

(Optional)

Defines the number of decimal places to use for rounding measure values.

Syntax:

Use dark colors for code blocksCopy
1
precision=<integer>

Example:

Use dark colors for code blocksCopy
1
precision=5

lrmTranslations

(Optional)

Specifies LRS Networks for which to translate exported routes.

Syntax:

Use dark colors for code blocksCopy
1
lrmTranslations=<NetworkIds>

Example:

Use dark colors for code blocksCopy
1
lrmTranslations="3,5"

gdbVersion

(Optional)

Specifies the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax:

Use dark colors for code blocksCopy
1
gdbVersion=<version>

Example:

Use dark colors for code blocksCopy
1
gdbVersion="user1.version1"

Output file format

The network can be exported as either a file geodatabase or as a JSON-formatted file. The file geodatabase format is the default.

In FGDB format, the output file contains one feature class (Route) and five tables (ExportDetails, Networks, Gap, Concurrency, and LrmTranslation). In JSON format, the output contains one JSON file each for the route and the tables.

The following tables define the schema of the output file geodatabase.

Route feature class

Column nameData typeLength
Network_IDLongN/a
Route_IDText255
Start_MeasureDoubleN/a
End_MeasureDoubleN/a
Start_DateDateN/a
End_DateDateN/a

ExportDetails table

Column nameData typeLength
LRS_TimeDateN/a
Last_LRS_TimeDateN/a
Invoked_TimeDateN/a
Last_Invoked_TimeDateN/a
Out_Sr_WkidLongN/a
PrecisionLongN/a
Lrm_TranslationsText100

Networks table

Column nameData typeLength
Network_IDLongN/a
Network_NameText100
Units_of_MeasureLongN/a

Gap table

Column nameData typeLength
Route_IDText255
Gap_Start_MeasureDoubleN/a
Gap_End_MeasureDoubleN/a
Gap_TypeLongN/a
Start_DateDateN/a
End_DateDateN/a

Concurrency table

Column NameData TypeLength
Dominant_Route_IDText255
Dominant_Start_MeasureDoubleN/a
Dominant_End_MeasureDoubleN/a
Subordinate_Route_IDText255
Subordinate_Start_MeasureDoubleN/a
Subordinate_End_MeasureDoubleN/a
Start_DateDateN/a
End_DateDateN/a

LrmTranslation table

Column NameData TypeLength
Base_Route_IDText255
Base_Start_MeasureDoubleN/a
Base_End_MeasureDoubleN/a
Translated_Network_IDLongN/a
Translated_Route_IDText255
Translated_Start_MeasureDoubleN/a
Translated_End_MeasureDoubleN/a
Start_DateDateN/a
End_DateDateN/a

Example usage

The following example URL exports a network using all time parameters.

Use dark colors for code blocksCopy
1
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/networkLayers/6/ exportNetwork?lastInvokedTime=1609200000000&lrsTime=1609200000000&lastLrsTime=1609027200000&outputFormat=FGDB&outputSrWkid=&precision=7&lrmTranslations&gdbVersion=ExportNetwork&f=html

JSON Response syntax

The following is an example of response syntax for a statusURL:

Use dark colors for code blocksCopy
1
2
3
{
  "statusURL": <jobIdURL>
}

JSON Response example

Initial status response

The following is an example statusURL returned with a jobIdURL, which is used to make additional status calls:

Use dark colors for code blocksCopy
1
{"statusURL":"https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/jobs/je9b6aa1da1904a23ab0d1a5513fba6f5"}

Subsequent status response

The subsequent call uses the jobIdURL returned above.

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult ":
  {
    "url": <URL>,
    "invokedTime": <dateTime>
  }
}

The following example demonstrates a response for calls using the jobIdURL returned above:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult": {
    "url": https://sampleServer/server/rest/directories/arcgisoutput/_ags_lrs_429B4209-7B0B-4A15-B7FD-2696DB757706.zip,
    "invokedTime": 1611137603000
  }
}

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.