REST API repository endpoints
The repository endpoints under /rhui/api/v1/repo/ list, inspect, add, create, delete, and synchronize Red Hat Update Infrastructure repositories. All repository endpoints require HTTP Basic authentication or a rhuiSessionId cookie.
| Endpoint | Description |
|---|---|
|
|
Get repository details by id. |
|
|
List all Red Hat Update Infrastructure repositories. |
|
|
List entitled Red Hat candidate repositories not yet created in the product. |
|
|
Add Red Hat repositories by id or product. |
|
|
Create a custom RPM repository. |
|
|
Delete repositories by id. |
|
|
Trigger repository syncs. |
GET /rhui/api/v1/repo/info/{repo_id}
Gets details for a single repository. The repo_id path parameter is the Red Hat Update Infrastructure repository identifier.
| Parameter | Type | In | Description |
|---|---|---|---|
|
|
RepoIdValue |
path |
Required. Red Hat Update Infrastructure repository identifier. |
|
|
boolean |
query |
When |
Returns 200 with a Repository object (application/json). Endpoint-specific code: 404 if the requested resource is not found. Common response codes also apply.
GET /rhui/api/v1/repo/list
Returns all Red Hat Update Infrastructure-managed repositories, including RPM (yum) and container repositories.
| Parameter | Type | In | Description |
|---|---|---|---|
|
|
boolean |
query |
When |
Returns 200 with a RepositoryListResponse object (application/json). Common response codes also apply.
GET /rhui/api/v1/repo/unused
Lists entitled Red Hat candidate repositories that are available in the entitlement but not yet created in Red Hat Update Infrastructure.
Returns 200 with an UnusedRedHatRepositoriesResponse object (application/json). Common response codes also apply.
POST /rhui/api/v1/repo/add
Registers undeployed Red Hat repositories. Supply exactly one of the following non-empty arrays in the request body:
repo_ids: explicit repository identifiers.product_names: all undeployed repositories in each named entitlement product.
Unknown product names are reported in the error. The optional sync_now field schedules a Pulp sync task immediately after each repository is successfully created. The response is always application/x-ndjson, with one JSON object per line for each repository processed.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
array of string |
Conditional |
Red Hat Update Infrastructure repository identifiers to add. Mutually exclusive with |
|
|
array of string |
Conditional |
Entitlement product names; all undeployed repositories in each product are added. Mutually exclusive with |
|
|
boolean |
No |
When |
Returns 200 with per-repository add results streamed as RepoOpStreamEvent (application/x-ndjson). Common response codes also apply.
POST /rhui/api/v1/repo/create_custom
Creates a custom RPM repository.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
string |
Yes |
Repository id. Alphanumerics, underscore, and hyphen only. |
|
|
string |
No |
Human-readable name. Defaults to |
|
|
string |
No |
Relative path segment. Defaults to |
|
|
boolean |
No |
If |
|
|
array of string |
No |
Absolute paths to GPG public key files. |
|
|
boolean |
No |
If |
Returns 201 with a RepoCreateCustomResponse object (application/json). Endpoint-specific code: 409 if the resource already exists or cannot be created in the current state. Common response codes also apply.
POST /rhui/api/v1/repo/delete
Deletes repositories by id.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
array of string |
Yes |
Repository identifiers to delete. |
Returns 200 with repository delete scheduling events streamed as RepoOpStreamEvent (application/x-ndjson). Common response codes also apply.
POST /rhui/api/v1/repo/sync
Schedules repository syncs. Supply exactly one of the following selectors in the request body:
all: must betrueto sync all Red Hat repositories.repo_ids: a non-empty array of specific repositories to sync.
The optional cron field defaults to false. When cron is true, the same due-date filtering is applied as rhui-tools sync uses when run from cron, skipping repositories whose scheduled sync is not yet due. The response is always application/x-ndjson, with one event per line while scheduling.
| Field | Type | Required | Description |
|---|---|---|---|
|
|
boolean |
Conditional |
Must be |
|
|
array of string |
Conditional |
Repositories to sync. Mutually exclusive with |
|
|
boolean |
No |
When |
Returns 200 with sync scheduling events streamed as RepoOpStreamEvent (application/x-ndjson). Endpoint-specific code: 502 for an upstream Pulp service error. 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 |