Skip To Content ArcGIS for Developers Sign In Dashboard

Release Locks

Description

License:

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

This operation releases a set of LRS locks that are held by the person currently invoking.

An error response is returned from this operation when conflict prevention is not enabled on the LRS. Refer to the conflictPreventionEnabled property of the Locks resource.

A lock can only be released if the version in which it was acquired does not need to be posted.

Request parameters

ParameterDetails
f

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

Values: html | json

releaseLocks

Required

Description: A list of one or more lines or routes with locks to be released.

The layerId can be for a network or an event layer

Syntax:

[ 
  {
   "layerId" : <layerId>, 
   "routeId" : "<routeId>"
  } |
  { 
   "layerId" : <layerId>, 
   "lineId" : "<lineId>"
  },
 
 ... 
]

Example usage

Example 1

URL for releasing a single lock.

https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/release?f=json&releaseLocks=[{"routeId":"I90","layerId":3}]

Example 2

URL for releasing multiple locks.

https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/release?f=json&releaseLocks=[{"routeId":"I90","layerId":3},{"routeId":"I90","layerId":4},{"routeId":"US101","layerId":4}},{"lineId":"NWS Line A", "layerId":5},{"lineId":"NWS Line B", "layerId":5}]

JSON Response syntax

{
  "releaseStatus" : "<status>",  // one of: esriSuccess, esriCouldNotReleaseAllLocks, esriCouldNotReleaseAllLocksActiveEditSession, esriCouldNotReleaseAllLocksPostRequired, esriCouldNotReleaseAllLocksOwnedByOtherUsers
  "releasedLocks" : [
    {
      "routeId" : "<routeId>",
      "layerId" : <layerId>
    } |
{
      "lineId" : "<lineId>",
      "layerId" : <layerId>
    },
    ...
  ]
}

JSON Response example

{
  "releaseStatus" : "esriSuccess",
  "releasedLocks" : [
    {
      "routeId" : "I90",
      "layerId" : 2
    } |
    {
      "routeId" : "I90",
      "layerId" : 4
    },
    {
      "routeId" : "US101",
      "layerId" : 4
    },
    {
      "lineId" : "NWS Line A",
      "layerId" : 5
    },
    {
      "lineId" : "NWS Line B",
      "layerId" : 6
    }
  ]
}