Skip to main content
A newer release of this product is available.

Retrieve lock details

Contributors

GET /protocols/locks

Introduced In: 9.10

Retrieves locks details.

  • vserver locks show

Parameters

Name Type In Required Description

path

string

query

False

Filter by path

smb.open_type

string

query

False

Filter by smb.open_type

smb.open_group_id

string

query

False

Filter by smb.open_group_id

smb.connect_state

string

query

False

Filter by smb.connect_state

share_lock.soft

boolean

query

False

Filter by share_lock.soft

share_lock.mode

string

query

False

Filter by share_lock.mode

interface.uuid

string

query

False

Filter by interface.uuid

interface.ip.address

string

query

False

Filter by interface.ip.address

interface.name

string

query

False

Filter by interface.name

type

string

query

False

Filter by type

node.name

string

query

False

Filter by node.name

node.uuid

string

query

False

Filter by node.uuid

state

string

query

False

Filter by state

volume.name

string

query

False

Filter by volume.name

volume.uuid

string

query

False

Filter by volume.uuid

constituent

boolean

query

False

Filter by constituent

uuid

string

query

False

Filter by uuid

protocol

string

query

False

Filter by protocol

client_address

string

query

False

Filter by client_address

delegation

string

query

False

Filter by delegation

oplock_level

string

query

False

Filter by oplock_level

owner_id

string

query

False

Filter by owner_id

svm.uuid

string

query

False

Filter by svm.uuid

svm.name

string

query

False

Filter by svm.name

byte_lock.offset

integer

query

False

Filter by byte_lock.offset

byte_lock.soft

boolean

query

False

Filter by byte_lock.soft

byte_lock.length

integer

query

False

Filter by byte_lock.length

byte_lock.mandatory

boolean

query

False

Filter by byte_lock.mandatory

byte_lock.super

boolean

query

False

Filter by byte_lock.super

byte_lock.exclusive

boolean

query

False

Filter by byte_lock.exclusive

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.

  • Default value: 1

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.

  • Default value: 1

  • Max value: 120

  • Min value: 0

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

collection_links

num_records

integer

Number of records.

records

array[client_lock]

Example response
{
  "_links": {
    "next": {
      "href": "/api/resourcelink"
    },
    "self": {
      "href": "/api/resourcelink"
    }
  },
  "num_records": 1,
  "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

returned_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

Name Type Description

next

href

self

href

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.

Name Type Description

self

href

ip

IP information

Name Type Description

address

string

IPv4 or IPv6 address

interface

A network interface. Either UUID or name may be supplied on input.

Name Type Description

_links

_links

ip

ip

IP information

name

string

The name of the interface. If only the name is provided, the SVM scope must be provided by the object this object is embedded in.

uuid

string

The UUID that uniquely identifies the interface.

node

Name Type Description

_links

_links

name

string

uuid

string

share_lock

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

SVM, applies only to SVM-scoped objects.

Name Type Description

_links

_links

name

string

The name of the SVM. This field cannot be specified in a PATCH method.

uuid

string

The unique identifier of the SVM. This field cannot be specified in a PATCH method.

volume

Name Type Description

_links

_links

name

string

The name of the volume. This field cannot be specified in a POST or PATCH method.

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.

  • example: 028baa66-41bd-11e9-81d5-00a0986138f7

  • Introduced in: 9.6

  • x-nullable: true

client_lock

This object represents locks on a volume.

Name Type Description

byte_lock

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

interface

A network interface. Either UUID or name may be supplied on input.

node

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

share_lock

smb

smb

state

string

State of lock.

svm

svm

SVM, applies only to SVM-scoped objects.

type

string

Type of lock.

uuid

string

Lock UUID

volume

volume

error_arguments

Name Type Description

code

string

Argument code

message

string

Message argument

returned_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.