- URL:
- https://<locks-url>/query
- Methods:
GET
- Required Capability:
- The ArcGIS Location Referencing license is required to use this resource.
- Version Introduced:
- 10.7
Description
This operation queries the LRS locks table and returns a list of lock records that match the WHERE
clause.
An error response is returned from this operation when conflict prevention is not enabled on the LRS. Refer to the conflict
property of the Locks resource.
The event
property in the response is populated for event lock objects and left empty for route lock objects.
Request Parameters
Parameter | Details |
---|---|
(Optional) |
Specifies the response format. The default response format is Values: |
(Required) | A |
(Optional) | Specifies whether the response will contain the
|
Example Usage
The following examples demonstrate lock queries by attribute.
Example 1
URL for querying locks by version name.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/query?f=json&where=LockVersion%3D'{'{'}20878084-24FC-40CB-8AF0-B7979CF9FE03{'}'}'
Example 2
URL for querying locks by username.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/query?f=json&where=LockUser%3D'alice'
Example 3
URL for querying locks by version name and username.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/query?f=json&where=LockVersion%3D'{'{'}20878084-24FC-40CB-8AF0-B7979CF9FE03{'}'}'%20and%20LockUser%3D'alice'
Example 4
URL for querying locks by route (or line) ID and network layer.
https://sampleserver/arcgis/rest/services/MyLRS/MapServer/exts/LRServer/locks/query?f=json&where=RouteId%20in('I90','US101')%20and%20NetworkId%3D1
JSON response syntax
{
"locks": [
{
"routeId": "<routeId>",
"layerId": <layerId>,
"lrsNetworkId": <networkId>,
"lrsNetworkName": "<networkName>",
"user": "<username>",
"versionName": "<versionName>",
"versionGuid": "<versionGuid",
"lockDate": <timestamp>,
"eventFeatureClassName": "<eventFeatureClassName>"
},
{
"lineId": "<lineId>",
"layerId": <layerId>,
"lrsNetworkId": <networkId>,
"lrsNetworkName": "<networkName>",
"user": "<username>",
"versionName": "<versionName>",
"versionGuid": "<versionGuid",
"lockDate": <timestamp>,
"eventFeatureClassName": "<eventFeatureClassName>"
} ,
...
]
}
JSON response example
{
"locks": [
{
"routeId": "I90",
"layerId": 3,
"lrsNetworkId": 1,
"lrsNetworkName": "Highways",
"user": "alice",
"versionName": "bob.job_65",
"versionGuid": "{66E39C10-9A79-4DC7-BDAC-F692251E91F7}",
"lockDate": 1397517340000,
"eventFeatureClassName": ""
},
{
"lineId": "NWS Line A",
"layerId": 4,
"lrsNetworkId": 2,
"lrsNetworkName": "Pipelines",
"user": "bob",
"versionName": "bob.job_23",
"versionGuid": "{DB13BAC4-08BB-4DCF-A93B-48BF105DC804}",
"lockDate": 1393888540000,
"eventFeatureClassName": ""
},
{
"lineId": "NWS Line B",
"layerId": 5,
"lrsNetworkId": 2,
"lrsNetworkName": "Pipelines",
"user": "alice",
"versionName": "alice.job_24",
"versionGuid": "{679599AE-16A2-4F8F-AC48-E278D6892016}",
"lockDate": 1393888542000,
"eventFeatureClassName": "P_Anomaly"
}
]
}