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