Use REST API in Red Hat Update Infrastructure
Red Hat Update Infrastructure has a REST (Representational State Transfer) API (Application Programming Interface). The REST API is disabled by default.
Before you begin
- Make sure that you have reviewed the Red Hat Update Infrastructure 5 Installation and Management guide.
- You must be authenticated to the Red Hat Container Registry (registry.redhat.io) to pull the required images.
Important Before you can use the API to add repositories or check for unused products, the entitlement mappings cache must be created, which further depends on the existence of the Red Hat Update Infrastructure entitlement certificate in the RHUA container. If you have SSH access to the RHUA, you can speed this up by following the instructions in Managing Repositories. Otherwise, wait until the relevant systemd timers run, which can take up to 7 hours in total. The API responds with the following error until the cache has been created:
{"op": "repo_add", "type": "error", "error": "internal_error", "message": "The entitlement mappings cache doesn't exist."}Note that the cookie is only valid for 120 seconds by default. Be sure to refresh it regularly, or set a longer session length.