GET /api/hosts/:host_id/packages
List packages installed on the host

Examples

GET /api/hosts/980190962/packages
200
{
  "total": 0,
  "subtotal": 0,
  "selectable": 0,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "results": null
}

Params

Param name Description
host_id
required

ID of the host

Validations:

  • Must be a number.

include_latest_upgradable
optional

Also include the latest upgradable package version for each host package

Validations:

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

status
optional

Return only packages of a particular status (upgradable or up-to-date)

Validations:

  • String

search
optional

Search string

Validations:

  • 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.

order
optional

Sort field and order, eg. 'id DESC'

Validations:

  • String

full_result
optional

Whether or not to show all results

Validations:

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

sort_by
optional

Field to sort the results on

Validations:

  • String

sort_order
optional

How to order the sorted results (e.g. ASC for ascending)

Validations:

  • String

Search fields

Field name Type Possible values
arch string
epoch string
id integer
name string
nvra string
nvrea string
release string
vendor string
version string

PUT /api/hosts/:host_id/packages/install DEPRECATED
Install packages remotely 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/980190962/packages/install
{
  "packages": [
    "foo"
  ],
  "host_package": {
    "packages": [
      "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
host_id
required

ID of the host

Validations:

  • Must be a number.

packages
optional

List of package names

Validations:

  • Must be an array of any type

groups
optional

List of package group names (Deprecated)

Validations:

  • Must be an array of any type


PUT /api/hosts/:host_id/packages/upgrade DEPRECATED
Update packages remotely 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/980190962/packages/install
{
  "packages": [
    "foo*"
  ],
  "host_package": {
    "packages": [
      "foo*"
    ]
  }
}
204

Params

Param name Description
host_id
required

ID of the host

Validations:

  • Must be a number.

packages
required

list of packages names

Validations:

  • Must be an array of any type


PUT /api/hosts/:host_id/packages/upgrade_all DEPRECATED
Update packages remotely 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/980190962/packages/install
{
  "packages": [
    "foo*"
  ],
  "host_package": {
    "packages": [
      "foo*"
    ]
  }
}
204

Params

Param name Description
host_id
required

ID of the host

Validations:

  • Must be a number.


PUT /api/hosts/:host_id/packages/remove DEPRECATED
Uninstall packages remotely 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/980190962/packages/remove
{
  "packages": [
    "foo"
  ],
  "host_package": {
    "packages": [
      "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
host_id
required

ID of the host

Validations:

  • Must be a number.

packages
optional

List of package names

Validations:

  • Must be an array of any type

groups
optional

List of package group names (Deprecated)

Validations:

  • Must be an array of any type