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:

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.

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.

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

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

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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close