Use SwaggerHub Registry API to access, manage, and update the following resources in SwaggerHub, bypassing the web interface:
SwaggerHub also provides the User Management API to get information about organizations and manage organization members.
Use the following base URL for SwaggerHub SaaS:
http(s)://api.swaggerhub.com
Note: This documentation is for SwaggerHub SaaS. On-Premise customers should use the bundled API definition, which can be found at the URLs provided below.
Version 1.29.0 or later:
http(s)://SERVER/v1/openapi.yaml - YAML version
http(s)://SERVER/v1/openapi.json - JSON version
Earlier versions:
http(s)://SERVER/v1/swagger.yaml - YAML version
http(s)://SERVER/v1/swagger.json - JSON version
Operations that update data or access private data require authentication using an API key. You can find your personal API key on the API Keys page in your account settings. Send this key in the Authorization
header when making requests to the Registry API:
Authorization: YOUR_API_KEY
To test API calls from this documentation page, click the Authorize button below and paste your API key there.
Important: Keep the API key secure and do not store it directly in your code.
In addition to calling the Registry API directly, you can use the following tools to interact with the API from the command line or CI/CD pipeline:
Use this page to mock SwaggerHub Registry API in your testing and development.
Run our mock API sample using the open source WireMock library, or in the free edition of WireMock Cloud. You'll have a working API server simulating the behavior of SwaggerHub Registry API, which will allow you to keep building and testing even if the actual API you isn't currently available.