Retrieve lock details
GET /protocols/locks
Introduced In: 9.10
Retrieves locks details.
Related ONTAP commands
-
vserver locks show
Parameters
Name | Type | In | Required | Description |
---|---|---|---|---|
smb.open_group_id |
string |
query |
False |
Filter by smb.open_group_id |
smb.connect_state |
string |
query |
False |
Filter by smb.connect_state |
smb.open_type |
string |
query |
False |
Filter by smb.open_type |
delegation |
string |
query |
False |
Filter by delegation |
node.uuid |
string |
query |
False |
Filter by node.uuid |
node.name |
string |
query |
False |
Filter by node.name |
volume.uuid |
string |
query |
False |
Filter by volume.uuid |
volume.name |
string |
query |
False |
Filter by volume.name |
uuid |
string |
query |
False |
Filter by uuid |
owner_id |
string |
query |
False |
Filter by owner_id |
byte_lock.offset |
integer |
query |
False |
Filter by byte_lock.offset |
byte_lock.super |
boolean |
query |
False |
Filter by byte_lock.super |
byte_lock.length |
integer |
query |
False |
Filter by byte_lock.length |
byte_lock.mandatory |
boolean |
query |
False |
Filter by byte_lock.mandatory |
byte_lock.soft |
boolean |
query |
False |
Filter by byte_lock.soft |
byte_lock.exclusive |
boolean |
query |
False |
Filter by byte_lock.exclusive |
interface.ip.address |
string |
query |
False |
Filter by interface.ip.address |
interface.name |
string |
query |
False |
Filter by interface.name |
interface.uuid |
string |
query |
False |
Filter by interface.uuid |
protocol |
string |
query |
False |
Filter by protocol |
share_lock.soft |
boolean |
query |
False |
Filter by share_lock.soft |
share_lock.mode |
string |
query |
False |
Filter by share_lock.mode |
state |
string |
query |
False |
Filter by state |
oplock_level |
string |
query |
False |
Filter by oplock_level |
path |
string |
query |
False |
Filter by path |
constituent |
boolean |
query |
False |
Filter by constituent |
client_address |
string |
query |
False |
Filter by client_address |
svm.uuid |
string |
query |
False |
Filter by svm.uuid |
svm.name |
string |
query |
False |
Filter by svm.name |
type |
string |
query |
False |
Filter by type |
max_records |
integer |
query |
False |
Limit the number of records returned. |
return_records |
boolean |
query |
False |
The default is true for GET calls. When set to false, only the number of records is returned.
|
return_timeout |
integer |
query |
False |
The number of seconds to allow the call to execute before returning. When iterating over a collection, the default is 15 seconds. ONTAP returns earlier if either max records or the end of the collection is reached.
|
order_by |
array[string] |
query |
False |
Order results by specified fields and optional [asc |
desc] direction. Default direction is 'asc' for ascending. |
fields |
array[string] |
query |
False |
Response
Status: 200, Ok
Name | Type | Description |
---|---|---|
_links |
||
num_records |
integer |
Number of records. |
records |
array[client_lock] |
Example response
{
"_links": {
"next": {
"href": "/api/resourcelink"
},
"self": {
"href": "/api/resourcelink"
}
},
"records": [
{
"byte_lock": {
"length": 10,
"offset": 100
},
"client_address": "0.0.0.0",
"delegation": "string",
"interface": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"ip": {
"address": "10.10.10.7"
},
"name": "lif1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"node": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "node1",
"uuid": "1cd8a442-86d1-11e0-ae1c-123478563412"
},
"oplock_level": "string",
"owner_id": "string",
"path": "string",
"protocol": "string",
"share_lock": {
"mode": "string"
},
"smb": {
"connect_state": "string",
"open_group_id": "string",
"open_type": "string"
},
"state": "string",
"svm": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "svm1",
"uuid": "02c9e252-41be-11e9-81d5-00a0986138f7"
},
"type": "string",
"uuid": "ceeac1b4-8646-4c76-a054-1c96e87594aa",
"volume": {
"_links": {
"self": {
"href": "/api/resourcelink"
}
},
"name": "volume1",
"uuid": "028baa66-41bd-11e9-81d5-00a0986138f7"
}
}
]
}
Error
Status: Default, Unexpected error_response
Name | Type | Description |
---|---|---|
error |
Example error
{
"error": {
"arguments": [
{
"code": "string",
"message": "string"
}
],
"code": "4",
"message": "entry doesn't exist",
"target": "uuid"
}
}
Definitions
See Definitions
href
Name | Type | Description |
---|---|---|
href |
string |
collection_links
Name | Type | Description |
---|---|---|
next |
||
self |
byte_lock
Name | Type | Description |
---|---|---|
exclusive |
boolean |
Indicates whether it is an exclusive bytelock. |
length |
integer |
Length of the bytelock starting from the offset. |
mandatory |
boolean |
Indicates whether or not the bytelock is mandatory. |
offset |
integer |
Starting offset for a bytelock. |
soft |
boolean |
Indicates whether it is a soft bytelock. |
super |
boolean |
Indicates whether it is a super bytelock. |
_links
Name | Type | Description |
---|---|---|
self |
ip
IP information
Name | Type | Description |
---|---|---|
address |
string |
IPv4 or IPv6 address |
interface
Name | Type | Description |
---|---|---|
_links |
||
ip |
IP information |
|
name |
string |
The name of the interface. |
uuid |
string |
The UUID that uniquely identifies the interface. |
node
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
|
uuid |
string |
Name | Type | Description |
---|---|---|
mode |
string |
Types of share lock modes. |
soft |
boolean |
Indicates whether it is a soft share lock. |
smb
Name | Type | Description |
---|---|---|
connect_state |
string |
SMB connection state. |
open_group_id |
string |
SMB open group ID. |
open_type |
string |
SMB open type. |
svm
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the SVM. |
uuid |
string |
The unique identifier of the SVM. |
volume
Name | Type | Description |
---|---|---|
_links |
||
name |
string |
The name of the volume. |
uuid |
string |
Unique identifier for the volume. This corresponds to the instance-uuid that is exposed in the CLI and ONTAPI. It does not change due to a volume move.
|
client_lock
This object represents locks on a volume.
Name | Type | Description |
---|---|---|
byte_lock |
||
client_address |
string |
IP address of the client holding the lock. |
constituent |
boolean |
Indicate if volume is contituent or not. |
delegation |
string |
Type of delegation. |
interface |
||
node |
||
oplock_level |
string |
The oplock level determines which operations the client may cache locally. |
owner_id |
string |
Owner ID. |
path |
string |
Object path |
protocol |
string |
Type of lock protocol. |
share_lock |
||
smb |
||
state |
string |
State of lock. |
svm |
||
type |
string |
Type of lock. |
uuid |
string |
Lock UUID |
volume |
error_arguments
Name | Type | Description |
---|---|---|
code |
string |
Argument code |
message |
string |
Message argument |
error
Name | Type | Description |
---|---|---|
arguments |
array[error_arguments] |
Message arguments |
code |
string |
Error code |
message |
string |
Error message |
target |
string |
The target parameter that caused the error. |