Skip To Content
ArcGIS Developers
Dashboard

Export Network

Description

License:

The ArcGIS Location Referencing license is required to use this resource.

This operation exports an LRS Network and then maintains the 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

Description: Optional parameter to specify the response format. The default response format is html.

Values: html | json

lastInvokedTime

Description: Optional parameter specifying 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: lastInvokedTime=<DateTime>

Example: lastInvokedTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lrsTime

Description: Optional parameter to specify 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, then 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: lastLrsTime=<DateTime>

Example: lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

lastLrsTime

Description: Optional parameter to specify 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: lastLrsTime=<DateTime>

Example: lastLrsTime=1609459200 (1 Jan 2021 00:00:00 GMT)

outputFormat

Description: Optional parameter that determines the data format of the output event records.

The following output formats are supported:

  • CSV—Comma-separated values file.
  • JSON—JavaScript Object Notation file. This is the default.
  • FGDB—Zipped File Geodatabase.

Syntax: outputFormat=<format>

Example: outputFormat=“JSON”

outputSrWkid

Description: Optional parameter to specify the spatial reference to output.

Syntax: outputSrWkid=<integer>

Example: outputSrWkid=2250 (NAD1983 StatePlane Massachusetts Island FIPS 2002)

Learn more about projected coordinate systems

precision

Description: Optional parameter that defines the number of decimal places to use for rounding measure values.

Syntax: precision=<integer>

Example: precision=5

lrmTranslations

Description: Optional parameter to specify LRS Networks for which to translate exported routes.

Syntax: lrmTranslations=<NetworkIds>

Example: lrmTranslations="3,5"

gdbVersion

Description: Optional parameter to specify the geodatabase version to use. If this parameter is not specified, the published map's version is used.

Syntax: gdbVersion=<version>

Example: gdbVersion="user1.version1"

Output file format

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

Route feature class

Column nameData typeNull?Length

Network_ID

Long

Y

n/a

Route_ID

Text

Y

255

Start_Measure

Double

Y

n/a

End_Measure

Double

Y

n/a

Start_Date

Date

Y

n/a

End_Date

Date

Y

n/a

ExportDetails table

Column nameData typeNull?Length

LRS_Time

Date

Y

n/a

Last_LRS_Time

Date

Y

n/a

Invoked_Time

Date

Y

n/a

Last_Invoked_Time

Date

Y

n/a

Out_Sr_Wkid

Long

Y

n/a

Precision

Long

Y

n/a

Lrm_Translations

Text

Y

100

Networks table

Column nameData typeNull?Length

Network_ID

Long

Y

n/a

Network_Name

Text

Y

100

Units_of_Measure

Long

Y

n/a

Gap table

Column nameData typeNull?Length

Route_ID

Text

Y

255

Gap_Start_Measure

Double

Y

n/a

Gap_End_Measure

Double

Y

n/a

Gap_Type

Long

Y

n/a

Start_Date

Date

Y

n/a

End_Date

Date

Y

n/a

Note:

The operation runs if one of the following is true:

  • If time parameters are not provided
  • If all time parameters are provided
  • If only the lastInvokedTime parameter is provided

In all other cases, this operation will not run. For example, this operation will not run if lrsTime, lastLrsTime, or lrsTime and lastLrsTime are used.

Example usage

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

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.

{
  "statusURL": <jobIdURL>
}

JSON Response example

Initial status response

The following example shows the statusURL that is returned with a jobIdURL, which is used to make additional status calls.

{"statusURL":"https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/jobs/je9b6aa1da1904a23ab0d1a5513fba6f5"}

Subsequent status response

The subsequent call uses the jobIdURL returned above.

{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult ": 
  {
    "url": <URL>,
    "invokedTime": <dateTime>
  }
}

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

{
  "status": "esriJobSucceeded",
  "percentComplete": 100,
  "exportNetworkJobResult": {
    "url": https://sampleServer/server/rest/directories/arcgisoutput/_ags_lrs_429B4209-7B0B-4A15-B7FD-2696DB757706.zip,
    "invokedTime": 1611137603000
  }
}