Examples

PUT /api/hosts/bulk/remove_content
{
  "included": {
    "ids": [
      980191266,
      980191267
    ]
  },
  "organization_id": 114267492,
  "content_type": "package",
  "content": [
    "foo"
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191266,
        980191267
      ]
    },
    "organization_id": 114267492,
    "content_type": "package",
    "content": [
      "foo"
    ]
  }
}
202
{
  "id": null,
  "label": null,
  "pending": null,
  "username": null,
  "started_at": null,
  "ended_at": null,
  "state": null,
  "result": null,
  "progress": null,
  "input": null,
  "output": {},
  "humanized": null,
  "cli_example": null,
  "available_actions": {
    "cancellable": null,
    "resumable": null
  }
}

Params

Param name Description
organization_id
required

ID of the organization

Validations:

  • Must be a number.

included
required

Validations:

  • Hash

included[search]
optional , nil allowed

Search string for hosts to perform an action on

Validations:

  • String

included[ids]
optional , nil allowed

List of host ids to perform an action on

Validations:

  • Must be an array of any type

excluded
required

Validations:

  • Hash

excluded[ids]
optional , nil allowed

List of host ids to exclude and not run an action on

Validations:

  • Must be an array of any type

content_type
required

The type of content. The following types are supported: 'package' and 'package_group.

Validations:

  • String

content
required

List of content (e.g. package or package group names)

Validations:

  • Must be an array of any type