REST API package endpoints
The package endpoints under /rhui/api/v1/packages/ list, remove, and upload RPM packages in Red Hat Update Infrastructure repositories. All package endpoints require HTTP Basic authentication or a rhuiSessionId cookie.
| Endpoint | Description |
|---|---|
|
|
List RPM packages in a repository. |
|
|
Remove RPM packages from a custom repository. |
|
|
Upload RPM packages to a custom repository. |
GET /rhui/api/v1/packages/list/{repo_id}
Streams packages from the latest repository version of the named RPM (yum) repository only. The response is always application/x-ndjson, with one JSON object per line. Results are sorted by full RPM filename (name-version-release.arch.rpm) before streaming. Each package line includes mandatory RPM metadata under package; optional field query parameters add further keys from the Pulp RPM package JSON.
| Parameter | Type | In | Description |
|---|---|---|---|
|
|
RepoIdValue |
path |
Required. Red Hat Update Infrastructure repository identifier. |
|
|
PackageListFieldValue |
query |
Optional. Repeat to include extra Pulp RPM package attributes. Each value must be one of the enum entries; mandatory response keys are ignored if listed. Omit this parameter entirely when no extra fields are needed. |
|
|
PackageListNameFilter |
query |
Exact match on the RPM package name (Pulp |
|
|
PackageListNamePartFilter |
query |
Partial match on the RPM package name (Pulp |
|
|
PackageListVersionFilter |
query |
Exact match on the RPM package version field. |
|
|
PackageListReleaseFilter |
query |
Partial match on the RPM package release field. |
Returns 200 with package list events streamed as PackageListStreamEvent, sorted by filename (application/x-ndjson). Endpoint-specific code: 404 if the requested resource is not found. Common response codes also apply.
POST /rhui/api/v1/packages/remove
Removes matching RPM packages from a custom RPM repository, in the same way as rhui-manager packages remove. Unlike the CLI, this endpoint does not prompt for confirmation. The response returns the disassociate task_href and the list of RPM filenames queued for removal.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
string |
Yes |
Custom RPM repository id to remove packages from. Must identify an existing custom RPM repository. |
|
|
string |
Yes |
Package name to remove. |
|
|
string |
No |
Optional version-release filter ( |
Returns 202 with a PackageRemoveResponse object (application/json). Endpoint-specific code: 404 if the requested resource is not found. Common response codes also apply.
POST /rhui/api/v1/packages/upload
Uploads a package file or directory of RPMs into a custom RPM repository, in the same way as rhui-manager packages upload. The operation copies packages to a temporary directory, generates repository metadata, and queues an additive Pulp sync. The response returns the sync task_href and the list of RPM filenames queued for upload.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
string |
Yes |
Custom RPM repository id that will receive the packages. Must identify an existing custom RPM repository. |
|
|
string |
Yes |
Absolute path on the RHUA to a |
Returns 202 with a PackageUploadResponse object (application/json). Endpoint-specific code: 404 if the requested resource is not found. Common response codes also apply.
| Number | Description | Response |
|---|---|---|
|
201 |
Client configuration RPM created — application/json |
ClientRpmResponse |
|
400 |
Invalid request — application/json |
Error |
|
401 |
Authentication required or invalid credentials — application/json |
Error |
|
500 |
Unexpected internal error — application/json |
Error |
|
503 |
Required session signing configuration is missing or invalid — application/json |
Error |