GET /api/dlmlocks
List all DLM locks

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

search
optional

filter results

Validations:

  • Must be a String

order
optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.


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

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

Errors

Code Description
404 Lock could not be found.

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Id or name of the DLM lock

Validations:

  • Must be a String


POST /api/dlmlocks
Create a DLM lock

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

dlmlock
required

Validations:

  • Must be a Hash

dlmlock[name]
required

Name

Validations:

  • Must be a String

dlmlock[type]
required

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

Validations:

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

dlmlock[enabled]
optional , nil allowed

Enable the lock

Validations:

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


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

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Id or name of the DLM lock

Validations:

  • Must be a String

dlmlock
required

Validations:

  • Must be a Hash

dlmlock[name]
optional

Name

Validations:

  • Must be a String

dlmlock[type]
optional

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

Validations:

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

dlmlock[enabled]
optional , nil allowed

Enable the lock

Validations:

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


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

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

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.

Errors

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

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

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.

Errors

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

Params

Param name Description
location_id
optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
optional

Scope by organizations

Validations:

  • Must be a Integer

id
required

Id or name of the DLM lock

Validations:

  • Must be a String