GET /api/dlmlocks
List all DLM locks

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

search
選填

篩選結果

Validations:

  • Must be a String

order
選填

Sort field and order, eg. ‘id DESC’

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 描述
404 Lock could not be found.

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

id
必填

Id or name of the DLM lock

Validations:

  • Must be a String


POST /api/dlmlocks
Create a DLM lock

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

dlmlock
必填

Validations:

  • Must be a Hash

dlmlock[name]
必填

名稱

Validations:

  • Must be a String

dlmlock[type]
必填

Type, e.g. ForemanDlm::Dlmlock:Update

Validations:

  • Must be one of: ForemanDlm::Dlmlock:Update.

dlmlock[enabled]
選填 , 允許空值

Enable the lock

Validations:

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


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

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

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. ForemanDlm::Dlmlock:Update

Validations:

  • Must be one of: ForemanDlm::Dlmlock:Update.

dlmlock[enabled]
選填 , 允許空值

Enable the lock

Validations:

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


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

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

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 描述
200 Lock acquired successfully.
412 Lock could not be acquired.

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

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 描述
200 Lock released successfully.
412 Lock could not be released.

參數

參數名字 描述
location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

id
必填

Id or name of the DLM lock

Validations:

  • Must be a String