Skip To Content ArcGIS for Developers Sign In Dashboard

Linear Referencing Service

Description

License:

The ArcGIS Pipeline Referencing for Server extension is required to use this resource.

Linear referencing services provide access to the data, metadata, and behaviors of a Linear Referencing System (LRS) in a geodatabase. The REST API linear referencing resource contains lists of the LRS-related layers and LRS workspaces in your published map.

Request parameters

ParameterDetails
f

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

Values: html | json

Example usage

The following examples show how to construct a URL using this service.

Example 1

URL for the "MyLRS" Linear Referencing service.

https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer?f=json

JSON Response syntax

{
  "currentVersion" : <currentVersion>,
  "capabilities" : "<capabilities>",
  "networkLayers" : [
    { "id" : <layerId1>, "name" : "<layerName1>", "type" : "<layerType1>", },
    { "id" : <layerId2>, "name" : "<layerName2>", "type" : "<layerType2>", },
    ...
  ],
  "eventLayers" : [
    { "id" : <layerId1>, "name" : "<layerName1>", "type" : "<layerType1>", },
    { "id" : <layerId2>, "name" : "<layerName2>", "type" : "<layerType2>", },
    ...
  ],
  "centerlineLayers": [
    { "id" : <layerId1>, "name" : "<layerName1>", "type" : "<layerType1>", }
   ],
  "editLogTableFields": {
    "objectIdFieldName": "<objectIdFieldName>",
    "transactionIdFieldName": "<transactionIdFieldName>",
    "transactionDateFieldName": "<transactionDateFieldName>",
    "userNameFieldName": "<userNameFieldName>",
    "activityTypeFieldName": "<activityTypeFieldName>",
    "lrsIdFieldName": "<lrsIdFieldName>",
    "networkIdFieldName": "<networkIdFieldName>",
    "routeIdFieldName": "<routeIdFieldName>",
    "toRouteIdFieldName": "<toRouteIdFieldName>",
    "fromDateFieldName": "<fromDateFieldName>",
    "toDateFieldName": "<toDateFieldName>",
    "editDataFieldName": "<editDataFieldName>",
    "processedFieldName": "<processedFieldName>",
    "processedTimeFieldName": "<processedTimeFieldName>",
    "processedUserFieldName": "<processedUserFieldName>",
    "processedVersionFieldName": "<processedVersionFieldName>"
  },
  "lrs" : [
    {
      "id" : "<id>",
      "name" : "<name>",
      "description" : "<description>",
      "versions" : [  // only for versioned LRS workspaces
        {
          "name" : "<versionName1>",
          "description" : "<description1>",
          "access" : "<access1>",  // one of: esriVersionAccessPublic, esriVersionAccessProtected, esriVersionAccessPrivate
          "parentVersion" : "<parentVersion1>"
        },
        {
          "name" : "<versionName2>",
          "description" : "<description2>",
          "access" : "<access2>",
          "parentVersion" : "<parentVersion2>"
        },
        ...
      ],
    },
    ...
  ]
}

JSON Response example

{
  "currentVersion" : 10.6,
  "capabilities" : "EventEditing",
  "networkLayers" : [
    { "id" : 0, "name" : "Pipes", "type" : "esriLRSNetworkLayer" }
  ],
  "eventLayers" : [
    { "id" : 1, "name" : "Valves", "type" : "esriLRSPointEventLayer" },
    { "id" : 2, "name" : "Pressure", "type" : "esriLRSLinearEventLayer" }
  ],
  "centerlineLayers": [
    { "id" : 3, "name" : "Centerline", "type" : "esriLRSCenterlineLayer", }
   ],
  "editLogTableFields": {
    "objectIdFieldName": "ObjectId",
    "transactionIdFieldName": "TransactionId",
    "transactionDateFieldName": "TransactiomDate",
    "userNameFieldName": "UserName",
    "activityTypeFieldName": "ActivityType",
    "lrsIdFieldName": "LrsId",
    "networkIdFieldName": "NetworkId",
    "routeIdFieldName": "RouteId",
    "toRouteIdFieldName": "ToRouteId",
    "fromDateFieldName": "FromDate",
    "toDateFieldName": "ToDate",
    "editDataFieldName": "EditData",
    "processedFieldName": "Processed",
    "processedTimeFieldName": "ProcessedTime",
    "processedUserFieldName": "ProcessedUser",
    "processedVersionFieldName": "ProcessedVersion"
  },
  "lrs" : [
    {
      "id" : "DFB23B7D-69D1-460F-B7E0-0FB190D23B96",
      "name" : "LRS",
      "description" : "",
      "versions" : [
        { "name" : "sde.DEFAULT", "description" : "Default version", "access" : "esriVersionAccessPublic", "parentVersion" : null },
        { "name" : "sde.QC", "description" : "QC checks", "access" : "esriVersionAccessPublic", "parentVersion" : "sde.DEFAULT" }
      ]
    }
  ]
}