PUT /api/hosts/bulk/system_purpose
{
"included": {
"ids": [
980191161,
980191162
]
},
"service_level": "Standard",
"purpose_role": "Red Hat Enterprise Linux Server",
"purpose_usage": "Production",
"purpose_addons": [
"foo"
],
"hosts_bulk_action": {
"included": {
"ids": [
980191161,
980191162
]
},
"service_level": "Standard",
"purpose_role": "Red Hat Enterprise Linux Server",
"purpose_usage": "Production",
"purpose_addons": [
"foo"
]
}
}
202
{
"id": "7184799a-c069-40e5-a25e-76892bd90c65",
"label": "Actions::BulkAction",
"pending": false,
"action": "Updating System Purpose for host updating system purpose for host; ...",
"username": "restricted",
"started_at": "2023-08-23 20:02:01 UTC",
"ended_at": "2023-08-23 20:02:01 UTC",
"state": "stopped",
"result": "warning",
"progress": 1.0,
"input": {
"action_class": "Actions::Katello::Host::UpdateSystemPurpose",
"target_ids": [
980191161,
980191162
],
"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": "2023-08-23 20:02:01 UTC",
"available_actions": {
"cancellable": false,
"resumable": false
}
}
| Param name | Description |
|---|---|
|
organization_id
required |
ID of the organization Validations:
|
|
included
required |
Validations:
|
|
included[search]
optional , nil allowed |
Search string for hosts to perform an action on Validations:
|
|
included[ids]
optional , nil allowed |
List of host ids to perform an action on Validations:
|
|
excluded
required |
Validations:
|
|
excluded[ids]
optional , nil allowed |
List of host ids to exclude and not run an action on Validations:
|
|
service_level
optional |
Service level of host Validations:
|
|
purpose_role
optional |
Role of host Validations:
|
|
purpose_usage
optional |
Usage of host Validations:
|
|
purpose_addons
optional |
Sets the system add-ons Validations:
|