GET /api/dlmlocks
List all DLM locks

参数

参数名字 描述
location_id
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

search
选填

过滤结果

Validations:

  • Must be a String

order
选填

排序项和顺序,例如 ‘id DESC’

Validations:

  • Must be a String

page
选填

页号,从 1 开始

Validations:

  • Must be a number.

per_page
选填

每页中显示的返回结果数

Validations:

  • Must be a number.


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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

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
选填

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
选填

Set the current organization context for the request

Validations:

  • Must be a Integer

id
必填

Id or name of the DLM lock

Validations:

  • Must be a String