PUT /api/hosts/bulk/add_host_collections
Add one or more host collections to one or more hosts

Examples

PUT /api/hosts/bulk/add_host_collections
{
  "included": {
    "ids": [
      980191251,
      980191252
    ]
  },
  "organization_id": 114267492,
  "host_collection_ids": [
    992660475,
    1031461452
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191251,
        980191252
      ]
    },
    "organization_id": 114267492,
    "host_collection_ids": [
      992660475,
      1031461452
    ]
  }
}
200
{
  "displayMessages": [
    "Successfully added 1 content host(s) to host collection Simple Host Collection.",
    "Successfully added 2 content host(s) to host collection Another Simple Host Collection."
  ]
}

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

host_collection_ids
required

List of host collection ids

Validations:

  • Must be an array of any type


PUT /api/hosts/bulk/remove_host_collections
Remove one or more host collections from one or more hosts

Examples

PUT /api/hosts/bulk/remove_host_collections
{
  "included": {
    "ids": [
      980191237,
      980191238
    ]
  },
  "organization_id": 114267492,
  "host_collection_ids": [
    992660475,
    1031461452
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191237,
        980191238
      ]
    },
    "organization_id": 114267492,
    "host_collection_ids": [
      992660475,
      1031461452
    ]
  }
}
200
{
  "displayMessages": [
    "Successfully removed 1 content host(s) from host collection Simple Host Collection.",
    "Successfully removed 0 content host(s) from host collection Another Simple Host Collection."
  ]
}

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

host_collection_ids
required

List of host collection ids

Validations:

  • Must be an array of any type


POST /api/hosts/bulk/applicable_errata
Fetch applicable errata for one or more hosts.

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


POST /api/hosts/bulk/installable_errata
Fetch installable errata for one or more hosts.

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


PUT /api/hosts/bulk/install_content DEPRECATED
Install content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

Examples

PUT /api/hosts/bulk/install_content
{
  "included": {
    "ids": [
      980191243
    ]
  },
  "organization_id": 114267492,
  "content_type": "errata",
  "content": [
    "RHBA-2014-013"
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191243
      ]
    },
    "organization_id": 114267492,
    "content_type": "errata",
    "content": [
      "RHBA-2014-013"
    ]
  }
}
202
[

]

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', 'package_group' and 'errata'.

Validations:

  • String

content
optional

List of content (e.g. package names, package group names (Deprecated) or errata ids)

Validations:

  • Must be an array of any type


PUT /api/hosts/bulk/update_content DEPRECATED
Update content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

Examples

PUT /api/hosts/bulk/update_content
{
  "included": {
    "ids": [
      980191231,
      980191232
    ]
  },
  "organization_id": 114267492,
  "content_type": "package_group",
  "content": [
    "foo group"
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191231,
        980191232
      ]
    },
    "organization_id": 114267492,
    "content_type": "package_group",
    "content": [
      "foo group"
    ]
  }
}
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

update_all
optional

Updates all packages on the host(s)

Validations:

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


PUT /api/hosts/bulk/remove_content DEPRECATED
Remove content on one or more hosts using katello-agent. NOTE: Katello-agent is deprecated and will be removed in a future release. Consider using remote execution instead.

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


PUT /api/hosts/bulk/destroy
Destroy one or more hosts

Examples

PUT /api/hosts/bulk/destroy
{
  "included": {
    "ids": [
      980191247,
      980191248
    ]
  },
  "organization_id": 114267492,
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191247,
        980191248
      ]
    },
    "organization_id": 114267492
  }
}
204

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


PUT /api/hosts/bulk/remove_subscriptions
Remove subscriptions from one or more hosts

Examples

PUT /api/hosts/bulk/content_overrides
{
  "included": {
    "ids": [
      980191274,
      980191275
    ]
  },
  "organization_id": 114267492,
  "subscriptions": [
    {
      "id": 128914721,
      "quantity": 1
    }
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191274,
        980191275
      ]
    },
    "organization_id": 114267492,
    "subscriptions": [
      {
        "id": 128914721,
        "quantity": 1
      }
    ]
  }
}
204

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

subscriptions
optional

Array of subscriptions to remove

Validations:

  • Must be an Array of nested elements

subscriptions[id]
required

Subscription Pool id

Validations:

  • String

subscriptions[quantity]
optional

Quantity of specified subscription to remove

Validations:

  • Integer


PUT /api/hosts/bulk/add_subscriptions
Add subscriptions to one or more hosts

Examples

PUT /api/hosts/bulk/add_subscriptions
{
  "included": {
    "ids": [
      980191249,
      980191250
    ]
  },
  "organization_id": 114267492,
  "subscriptions": [
    {
      "id": 128914721,
      "quantity": 1
    }
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191249,
        980191250
      ]
    },
    "organization_id": 114267492,
    "subscriptions": [
      {
        "id": 128914721,
        "quantity": 1
      }
    ]
  }
}
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

subscriptions
required

Array of subscriptions to add

Validations:

  • Must be an Array of nested elements

subscriptions[id]
required

Subscription Pool id

Validations:

  • String

subscriptions[quantity]
required

Quantity of this subscriptions to add

Validations:

  • Must be a number.


PUT /api/hosts/bulk/auto_attach
Trigger an auto-attach of subscriptions on one or more hosts

Examples

PUT /api/hosts/bulk/auto_attach
{
  "organization_id": 114267492,
  "included": {
    "ids": [
      980191241,
      980191242
    ]
  },
  "hosts_bulk_action": {
    "organization_id": 114267492,
    "included": {
      "ids": [
        980191241,
        980191242
      ]
    }
  }
}
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


PUT /api/hosts/bulk/content_overrides
Set content overrides to one or more hosts

Examples

PUT /api/hosts/bulk/content_overrides
{
  "included": {
    "ids": [
      980191270,
      980191271
    ]
  },
  "organization_id": 114267492,
  "content_overrides": [
    {
      "content_label": "some-content",
      "value": 1
    },
    {
      "content_label": "some-content2",
      "value": "default"
    }
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191270,
        980191271
      ]
    },
    "organization_id": 114267492,
    "content_overrides": [
      {
        "content_label": "some-content",
        "value": 1
      },
      {
        "content_label": "some-content2",
        "value": "default"
      }
    ]
  }
}
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_overrides
optional

Array of Content override parameters

Validations:

  • Must be an Array of nested elements

content_overrides[content_label]
required

Label of the content

Validations:

  • String

content_overrides[value]
optional

Override value. Provide a boolean value if name is 'enabled'

Validations:

  • String

content_overrides[name]
optional

Override key or name. Note if name is not provided the default name will be 'enabled'

Validations:

  • String

content_overrides[remove]
optional

Set true to remove an override and reset it to 'default'

Validations:

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


PUT /api/hosts/bulk/environment_content_view
Assign the environment and content view to one or more hosts

Examples

PUT /api/hosts/bulk/environment_content_view
{
  "included": {
    "ids": [
      980191239,
      980191240
    ]
  },
  "organization_id": 114267492,
  "environment_id": 562075838,
  "content_view_id": 405955044,
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191239,
        980191240
      ]
    },
    "organization_id": 114267492,
    "environment_id": 562075838,
    "content_view_id": 405955044
  }
}
204

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

environment_id
optional

Validations:

  • Integer

content_view_id
optional

Validations:

  • Integer


PUT /api/hosts/bulk/release_version
Assign the release version to one or more hosts

Examples

PUT /api/hosts/bulk/release_version
{
  "included": {
    "ids": [
      980191288,
      980191289
    ]
  },
  "organization_id": 114267492,
  "release_version": "7.2",
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191288,
        980191289
      ]
    },
    "organization_id": 114267492,
    "release_version": "7.2"
  }
}
204

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

release_version
optional

content release version

Validations:

  • String


POST /api/hosts/bulk/traces
Fetch traces for one or more hosts

Examples

POST /api/hosts/bulk/traces
{
  "organization_id": 114267492,
  "included": {
    "ids": [
      980191290,
      980191291
    ]
  },
  "hosts_bulk_action": {
    "organization_id": 114267492,
    "included": {
      "ids": [
        980191290,
        980191291
      ]
    }
  }
}
200
{
  "total": 2,
  "subtotal": 2,
  "selectable": 2,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "application",
    "order": "desc"
  },
  "results": [
    {
      "id": 13,
      "application": "kernel",
      "helper": "reboot the system",
      "restart_command": "reboot",
      "app_type": "static",
      "host_id": 980191290,
      "host": "host341",
      "reboot_required": true
    },
    {
      "id": 14,
      "application": "dbus",
      "helper": "reboot the system",
      "restart_command": "reboot",
      "app_type": "static",
      "host_id": 980191291,
      "host": "host342",
      "reboot_required": true
    }
  ]
}

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


PUT /api/hosts/bulk/resolve_traces
Resolve traces for one or more hosts

Examples

PUT /api/hosts/bulk/resolve_traces
{
  "trace_ids": [
    11
  ],
  "hosts_bulk_action": {
    "trace_ids": [
      11
    ]
  }
}
204

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

trace_ids
required

Array of Trace IDs

Validations:

  • Must be an array of any type


PUT /api/hosts/bulk/system_purpose
Assign system purpose attributes on one or more hosts

Examples

PUT /api/hosts/bulk/system_purpose
{
  "included": {
    "ids": [
      980191235,
      980191236
    ]
  },
  "service_level": "Standard",
  "purpose_role": "Red Hat Enterprise Linux Server",
  "purpose_usage": "Production",
  "purpose_addons": [
    "foo"
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191235,
        980191236
      ]
    },
    "service_level": "Standard",
    "purpose_role": "Red Hat Enterprise Linux Server",
    "purpose_usage": "Production",
    "purpose_addons": [
      "foo"
    ]
  }
}
202
{
  "id": "40f52010-a004-4e93-a681-841f45eb1ccf",
  "label": "Actions::BulkAction",
  "pending": false,
  "action": "Updating System Purpose for host updating system purpose for host; ...",
  "username": "restricted",
  "started_at": "2022-11-08 19:27:24 UTC",
  "ended_at": "2022-11-08 19:27:25 UTC",
  "state": "stopped",
  "result": "warning",
  "progress": 1.0,
  "input": {
    "action_class": "Actions::Katello::Host::UpdateSystemPurpose",
    "target_ids": [
      980191235,
      980191236
    ],
    "target_class": "Host::Managed",
    "args": [
      "Standard",
      "Red Hat Enterprise Linux Server",
      "Production",
      [
        "foo"
      ]
    ]
  },
  "output": {
    "planned_count": 2,
    "cancelled_count": 0,
    "total_count": 2,
    "failed_count": 2,
    "pending_count": 0,
    "success_count": 0
  },
  "humanized": {
    "action": "Updating System Purpose for host",
    "input": [
      "updating system purpose for host",
      "..."
    ],
    "output": "2 task(s), 0 success, 2 fail",
    "errors": [
      "A sub task failed"
    ]
  },
  "cli_example": null,
  "start_at": "2022-11-08 19:27:24 UTC",
  "available_actions": {
    "cancellable": false,
    "resumable": false
  }
}

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

service_level
optional

Service level of host

Validations:

  • String

purpose_role
optional

Role of host

Validations:

  • String

purpose_usage
optional

Usage of host

Validations:

  • String

purpose_addons
optional

Sets the system add-ons

Validations:

  • Must be an array of any type


POST /api/hosts/bulk/available_incremental_updates
Given a set of hosts and errata, lists the content view versions and environments that need updating.

Examples

POST /api/hosts/bulk/available_incremental_updates
{
  "included": {
    "ids": [
      980191233
    ]
  },
  "organization_id": 114267492,
  "errata_ids": [
    "RHSA-1999-1231"
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191233
      ]
    },
    "organization_id": 114267492,
    "errata_ids": [
      "RHSA-1999-1231"
    ]
  }
}
200
[
  {
    "next_version": "2.1",
    "content_host_count": 1,
    "content_view_version": {
      "name": "Published LIbrary view 2.0",
      "id": 111397700,
      "version": "2.0",
      "content_view": {
        "id": 405955044,
        "name": "Published LIbrary view",
        "label": "published_library_view"
      }
    },
    "environments": [
      {
        "name": "Library",
        "id": 562075838
      }
    ],
    "components": 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

errata_ids
required

List of Errata ids

Validations:

  • Must be an array of any type


POST /api/hosts/bulk/module_streams
Fetch available module streams for hosts.

Examples

POST /api/hosts/bulk/module_streams
{
  "included": {
    "ids": [
      980191312,
      980191313
    ]
  },
  "organization_id": 114267492,
  "host_collection_ids": [
    992660475,
    1031461452
  ],
  "hosts_bulk_action": {
    "included": {
      "ids": [
        980191312,
        980191313
      ]
    },
    "organization_id": 114267492,
    "host_collection_ids": [
      992660475,
      1031461452
    ]
  }
}
200
{
  "total": 0,
  "subtotal": 0,
  "selectable": 0,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "results": []
}

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


PUT /api/hosts/bulk/change_content_source
Update the content source for specified hosts and generate the reconfiguration script

Examples

PUT /api/hosts/bulk/change_content_source
{
  "hosts_bulk_action": {}
}
404
{
  "displayMessage": "Could not find host resource with id . Potential missing permissions: edit_hosts",
  "errors": [
    "Could not find host resource with id . Potential missing permissions: edit_hosts"
  ]
}

Params

Param name Description
host_ids
required

The ids of the hosts to alter. Hosts not managed by Katello are ignored

Validations:

  • Must be an array of any type

environment_id
required

The id of the lifecycle environment

Validations:

  • Must be a number.

content_view_id
required

The id of the content view

Validations:

  • Must be a number.

content_source_id
required

The id of the content source

Validations:

  • Must be a number.