Chapter 3. Accessing available subscription management APIs


Red Hat provides a Swagger file to describe the specifications of the Red Hat Subscription Management APIs. The Swagger specification includes information about the API endpoints available, input parameters, expected output, and possible error responses. The swagger file can be imported into REST clients like Postman or RESTlet to automatically build a library of API calls.

3.1. Troubleshooting API errors

3.2. API errors

Expand
CodeExplanationResolution

400

BadRequest error

Validate that you entered the API call correctly and try again.

401

Unauthorized

Generate a new authorization token.

403

Forbidden

Generate a new authorization token.

404

Not found

Resource not found or does not exist.

429

Too many requests

Reduce the frequency of requests

500

Internal server error

The problem is on Red Hat’s end. Wait a minute and try your request again.

3.3. Troubleshooting error 403

Error 403 is a "not authorized" error, meaning that the authentication you are using for Red Hat Subscription Manager APIs has failed. There are two possible solutions you can try.

Procedure

  1. To authenticate through the Red Hat Subscription Manager gateway, ensure the authorization header includes the text "bearer" before entering your API call:

    curl -H "Authorization: Bearer <token>" <api_url>
    Copy to Clipboard Toggle word wrap
  2. If the header is correct, create a new token. Refresh tokens last for five minutes.

3.4. Troubleshooting error 429

Error 429 is a “rate limiting” error, meaning that your account has exceeded the number of allowed requests per second. This limit applies to all users of a single Red Hat account.

Procedure

Extract the header of the response, which includes: * X-RateLimit-Limit: the total requests/sec allowed * X-RateLimit-Remaining: the number of requests/sec remaining (this will be a negative integer) * X-RateLimit-Delay: the number of seconds the requester should wait before trying again

Adjust the rate of requests to the X-RateLimit-Limit value and start again once the X-RateLimit-Delay time has passed.

Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2026 Red Hat
Back to top