GET /api/dlmlocks
List all DLM locks

参数

参数名字 描述
search
选填

过滤结果

Validations:

  • Must be a String

order
选填

结果排序

Validations:

  • Must be a String

page
选填

编页结果

Validations:

  • Must be a String

per_page
选填

每个请求中的条目数

Validations:

  • Must be a String


GET /api/dlmlocks/:id
Show a DLM lock

GET /api/dlmlocks/:id/lock
Show a DLM lock

错误

Code Description
404 Lock could not be found.

参数

参数名字 描述
id
必填

Id or name of the DLM lock

Validations:

  • Must be a String


POST /api/dlmlocks
Create a DLM lock

参数

参数名字 描述
dlmlock
必填

Validations:

  • Must be a Hash

dlmlock[name]
必填

名称

Validations:

  • Must be a String

dlmlock[type]
必填

Type, e.g. Dlmlock:Update

Validations:

  • Must be one of: Dlmlock:Update.

dlmlock[enabled]
选填 , 允许空值

Enable the lock

Validations:

  • Must be one of: true, false, 1, 0


PUT /api/dlmlocks/:id
Update a DLM lock

参数

参数名字 描述
id
必填

Id or name of the DLM lock

Validations:

  • Must be a String

dlmlock
必填

Validations:

  • Must be a Hash

dlmlock[name]
选填

名称

Validations:

  • Must be a String

dlmlock[type]
选填

Type, e.g. Dlmlock:Update

Validations:

  • Must be one of: Dlmlock:Update.

dlmlock[enabled]
选填 , 允许空值

Enable the lock

Validations:

  • Must be one of: true, false, 1, 0


DELETE /api/dlmlocks/:id
Delete a DLM lock

参数

参数名字 描述
id
必填

Id or name of the DLM lock

Validations:

  • Must be a String


PUT /api/dlmlocks/:id/lock
Acquire a DLM lock

Acquire a lock

This action acquires a lock. It fails, if the lock is currently taken by another host.

Authentication & Host Identification

The host is authenticated via a client certificate and identified via the CN of that certificate.

错误

Code Description
200 Lock acquired successfully.
412 Lock could not be acquired.

参数

参数名字 描述
id
必填

Id or name of the DLM lock

Validations:

  • Must be a String


DELETE /api/dlmlocks/:id/lock
Release a DLM lock

Release a lock

This action releases a lock.
It fails, if the lock is currently taken by another host.

Authentication & Host Identification

The host is authenticated via a client certificate and identified via the CN of that certificate.

错误

Code Description
200 Lock released successfully.
412 Lock could not be released.

参数

参数名字 描述
id
必填

Id or name of the DLM lock

Validations:

  • Must be a String