Release Locks

URL:
https://<locks-url>/release
Methods:
GET
Required Capability:
The ArcGIS Location Referencing license is required to use this resource.
Version Introduced:
10.7

Description

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.

The esriCouldNotReleaseAllLocksNeedToRunAebGpToolOnDefault release status is returned if you are trying to release a route lock on the default version but the event behaviors have not been applied yet for the corresponding route edit, using the Apply Event Behaviors tool.

Request parameters

ParameterDetails

f

(Optional)

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

Values: html | json | pjson

releaseLocks

(Required)

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:

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
[
  {
  "layerId": <layerId>,
  "routeId": "<routeId>"
  } |
  {
  "layerId": <layerId>,
  "lineId": "<lineId>"
  },

...
]

Example usage

The following are examples of releasing single or multiple locks held by the invoker.

Example 1

URL for releasing a single lock.

Use dark colors for code blocksCopy
1
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.

Use dark colors for code blocksCopy
1
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

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{
  "releaseStatus": "<status>", // one of: esriSuccess, esriCouldNotReleaseAllLocks, esriCouldNotReleaseAllLocksActiveEditSession, esriCouldNotReleaseAllLocksPostRequired, esriCouldNotReleaseAllLocksOwnedByOtherUsers, esriCouldNotReleaseAllLocksNeedToRunAebGpToolOnDefault
  "releasedLocks": [
    {
      "routeId": "<routeId>",
      "layerId": <layerId>
    } |
    {
      "lineId": "<lineId>",
      "layerId": <layerId>
    },
    ...
  ]
}

JSON response example

Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
  "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
    }
  ]
}

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