Examples

DELETE /api/hosts/bulk
{
  "search": "id ^ (980190962,298486374)",
  "hosts_bulk_action": {
    "search": "id ^ (980190962,298486374)"
  }
}
200
{
  "message": "Deleted 2 hosts"
}

Params

Param name Description
location_id
optional

Set the current location context for the request

Validations:

  • Integer

organization_id
required

ID of the organization

Validations:

  • Must be a number.

included
required

Hosts to include in the action

Validations:

  • Hash

included[search]
optional , nil allowed

Search string describing which hosts to perform the action on

Validations:

  • String

included[ids]
optional , nil allowed

List of host ids to perform the action on

Validations:

  • Must be an array of any type

excluded
required

Hosts to explicitly exclude in the action. All other hosts will be included in the action, unless an included parameter is passed as well.

Validations:

  • Hash

excluded[ids]
optional , nil allowed

List of host ids to exclude and not perform the action on

Validations:

  • Must be an array of any type