SwaggerHub Registry API
Overview Use SwaggerHub Registry API to access, manage, and update the following resources in SwaggerHub, bypassing the web interface: * APIs * Domains *…
Developer tools#openapi#developer-tools
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
Overview
Use SwaggerHub Registry API to access, manage, and update the following resources in SwaggerHub, bypassing the web interface:
- APIs
- Domains
- Integrations
- Projects
- Templates
SwaggerHub also provides the User Management API to get information about organizations and manage organization members.
Base URL
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
Authentication
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.
Tools
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:
Endpoints 87
APIs
- GETSearch APIs
/apis?query=string&state=ALL&page=0&limit=10&sort=NAME&order=ASCThis is a convenience alias for GET /specs?specType=API. - GETGet a list of APIs of the specified owner
/apis/:owner?page=0&limit=10&sort=NAME&order=ASC - GETGet a list of API versions
/apis/:owner/:api - POSTCreate or update an API
/apis/:owner/:api?isPrivate=false&version=string&force=trueUse this operation to create a new API or update an existing API by uploading its OpenAPI definition in YAML or JSON format. The authenticating user must have… - DELETEDelete an API
/apis/:owner/:api - POSTRename an API
/apis/:owner/:api/rename?newName=stringThe new name must follow the naming rules. - GETGet the default version of an API
/apis/:owner/:api/settings/defaultThis operation returns the version identifier, such as 1.0.0. To get the definition itself, use GET /apis/{owner}/{api}/{version}. - PUTSet the default API version
/apis/:owner/:api/settings/default - GETGet the OpenAPI definition of the specified API version
/apis/:owner/:api/:version?resolved=false&flatten=false - DELETEDelete an API version
/apis/:owner/:api/:version - POSTCreate a new API version
/apis/:owner/:api/:version/cloneUse this operation to clone an existing API version as a new version. The new version will have the same YAML content but with updated info.version. Note:… - GETGet comments for the specified API version
/apis/:owner/:api/:version/comments - POSTAdd a new comment
/apis/:owner/:api/:version/comments - POSTBulk update comments
/apis/:owner/:api/:version/comments/batch - DELETEDelete a comment
/apis/:owner/:api/:version/comments/:comment - PATCHUpdate a comment
/apis/:owner/:api/:version/comments/:comment - POSTReply to a comment
/apis/:owner/:api/:version/comments/:comment/replies - DELETEDelete a comment reply
/apis/:owner/:api/:version/comments/:comment/replies/:reply - PATCHUpdate a comment reply
/apis/:owner/:api/:version/comments/:comment/replies/:reply - PUTResolve or reopen a comment
/apis/:owner/:api/:version/comments/:comment/status/:status - POSTFork an API
/apis/:owner/:api/:version/forkCreates a fork of the specified API definition and version. The fork can be created as a new API, or as a new version in another existing API. - GETGet the published status for the specified API and version
/apis/:owner/:api/:version/settings/lifecycle - PUTPublish or unpublish an API version
/apis/:owner/:api/:version/settings/lifecycle?force=false - GETGet the visibility (public or private) of API version
/apis/:owner/:api/:version/settings/private - PUTSet the visibility (public or private) of an API version
/apis/:owner/:api/:version/settings/private - GETRetrieve the standardization errors for a given API definition
/apis/:owner/:api/:version/standardization - GETGet the OpenAPI definition for the specified API version in JSON format
/apis/:owner/:api/:version/swagger.json?resolved=false&flatten=false - GETGet the OpenAPI definition for the specified API version in YAML format
/apis/:owner/:api/:version/swagger.yaml?resolved=false&flatten=false - GETDeprecated Get API Standardization errors and warnings
/apis/:owner/:api/:version/validationDeprecated. Note: This endpoint is deprecated. Use the following new endpoint instead: GET /apis/{owner}/{api}/{version}/standardization If your organization… - GETRetrieve a list of currently defined APIs, domains, and templates in APIs.json format
/specs?specType=ANY&visibility=ANY&state=ALL&owner=string&query=string&page=0&limit=10&sort=NAME&order=ASC
Templates
- GETRetrieve a list of templates for an owner
/templates?owner=string - GETRetrieve an APIs.json listing for all template versions for an owner and template
/templates/:owner/:templateId - POSTCreate or update a template
/templates/:owner/:templateId?isPrivate=false&version=string&force=true&projectName=stringSaves the provided template definition; the owner must match the token owner. The version will be extracted from the template definitions itself. - DELETEDelete a template
/templates/:owner/:templateId - POSTRename a template
/templates/:owner/:templateId/rename?newName=string - GETRetrieve a template definition
/templates/:owner/:templateId/:version?flatten=false - DELETEDelete a particular version of a template
/templates/:owner/:templateId/:version - GETReturn the list of comments for a template
/templates/:owner/:templateId/:version/comments - POSTUpdate the list of comments for a template
/templates/:owner/:templateId/:version/comments/batch - POSTCreate a fork for a template
/templates/:owner/:templateId/:version/fork - GETRetrieve lifecycle settings for a template
/templates/:owner/:templateId/:version/settings/lifecycle - PUTUpdate lifecycle settings for a template
/templates/:owner/:templateId/:version/settings/lifecycle?force=true - GETRetrieve visibility settings for a template
/templates/:owner/:templateId/:version/settings/private - PUTUpdate visibility settings for a template
/templates/:owner/:templateId/:version/settings/private
Domains
- GETSearch domains
/domains?query=string&state=ALL&page=0&limit=10&sort=NAME&order=ASCThis is a convenience alias for GET /specs?specType=DOMAIN. - GETGet a list of domains of the specified owner
/domains/:owner?page=0&limit=10&sort=NAME&order=ASC - GETGet a list of domain versions
/domains/:owner/:domain - POSTCreate or update a domain
/domains/:owner/:domain?isPrivate=false&version=string&force=true - DELETEDelete a domain
/domains/:owner/:domain?force=false - POSTRename a domain
/domains/:owner/:domain/rename?newName=string&force=falseThe new name must follow the naming rules. - GETGet the default version of a domain
/domains/:owner/:domain/settings/defaultThis operation returns the version identifier, such as 1.0.0. To get the definition itself, use GET /domains/{owner}/{domain}/{version}. - PUTSet the default version for a domain
/domains/:owner/:domain/settings/default - GETGet the OpenAPI definition of the specified domain version
/domains/:owner/:domain/:version - DELETEDelete a domain version
/domains/:owner/:domain/:version?force=false - POSTCreate a new domain version
/domains/:owner/:domain/:version/cloneUse this operation to clone an existing domain version as a new version. Note that the new version is not automatically set as the default version. - GETGet comments for the specified domain version
/domains/:owner/:domain/:version/comments - POSTAdd a new comment
/domains/:owner/:domain/:version/comments - POSTBulk update comments
/domains/:owner/:domain/:version/comments/batch - DELETEDelete a comment
/domains/:owner/:domain/:version/comments/:comment - PATCHUpdate a comment
/domains/:owner/:domain/:version/comments/:comment - POSTReply to a comment
/domains/:owner/:domain/:version/comments/:comment/replies - DELETEDelete a comment reply
/domains/:owner/:domain/:version/comments/:comment/replies/:reply - PATCHUpdate a comment reply
/domains/:owner/:domain/:version/comments/:comment/replies/:reply - PUTResolve or reopen a comment
/domains/:owner/:domain/:version/comments/:comment/status/:status - GETGet the OpenAPI definition for the specified domain version in JSON format
/domains/:owner/:domain/:version/domain.json - GETGet the OpenAPI definition for the specified domain version in YAML format
/domains/:owner/:domain/:version/domain.yaml - POSTFork a domain
/domains/:owner/:domain/:version/forkCreates a fork of the specified domain definition and version. The fork can be created as a new domain, or as a new version in another existing domain. - GETGet the published status for the specified domain and version
/domains/:owner/:domain/:version/settings/lifecycle - PUTPublish or unpublish a domain version
/domains/:owner/:domain/:version/settings/lifecycle?force=false - GETGet the visibility (public or private) of a domain version
/domains/:owner/:domain/:version/settings/private - PUTSet the visibility (public or private) of a domain version
/domains/:owner/:domain/:version/settings/private?force=false
Projects
- GETGet all projects that a user has access to
/projects?nameOnly=false - DELETE&page=0&limit=10&sort=NAME&order=ASCReturns all projects that the authenticating user has access to. Organization owners get a list of all projects in owned organizations. Other members get a… - GETGet all projects of an organization
/projects/:owner?nameOnly=false - DELETE&page=0&limit=10&order=ASC - POSTCreate a project in an organization
/projects/:owner - GETGet project information
/projects/:owner/:projectId - PUTUpdate a project
/projects/:owner/:projectIdUse this operation to update an existing project, for example, add or remove APIs, or change the project description. When updating a project, the apis and… - DELETEDelete a project
/projects/:owner/:projectId - GETGet project members
/projects/:owner/:projectId/members - PUTUpdate a project's members list
/projects/:owner/:projectId/membersWhen updating a project, the members list _replaces_ the existing one. This means that to add new members to a project, you need to send the members list… - PUTAdd an API or domain to a project
/projects/:owner/:projectId/:specType/:nameUse this operation to add a single API or domain to the specified project. To add multiple APIs or domains at once, use PUT /projects/{owner}/{projectId}.
Integrations
- GETGet all integrations configured for the specified API version
/apis/:owner/:api/:version/integrationsThe returned information includes integration types, names, unique IDs, and enabled/disabled status. Note: The following integration types are currently not… - POSTCreate an integration for the specified API and version
/apis/:owner/:api/:version/integrationsUse this operation to configure an integration for a specific API version. The integration type is determined by which object is provided in the request body… - GETGet integration settings
/apis/:owner/:api/:version/integrations/:integrationIdReturns the configuration of the specified integration. Access tokens and passwords are not returned for security reasons. - PUTUpdate integration settings
/apis/:owner/:api/:version/integrations/:integrationIdUpdates integration settings for the specified API and integration ID. The integration type is determined by which object is passed in the request body. The… - DELETEDelete an integration
/apis/:owner/:api/:version/integrations/:integrationIdDelete an existing integration specified by its ID. - PATCHPartially update integration settings
/apis/:owner/:api/:version/integrations/:integrationIdUse this operation to partially update integration settings for the specified API and integration ID. For example, enable or disable an integration, or… - POSTRun an integration
/apis/:owner/:api/:version/integrations/:integrationId/execute?commitMessage=stringUse this operation to trigger an existing integration. Source control integrations push to (not pull from) the configured repository and branch. You can…
API details
- Base URL
https://api.swaggerhub.com- Authentication
- An API key in the Authorization header
- Operations
- 87 operations on 56 pathsGET 35POST 21PUT 14DELETE 12PATCH 5
1 marked deprecated - Main resources
- APIs 30Domains 28Templates 15Projects 9Integrations 7
- Response formats
application/json- Description format
- Swagger 2.0, API version
1.0.66 - Links
- OpenAPI document · Terms of service · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the SwaggerHub Registry API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the SwaggerHub Registry API collection, without the publisher's secrets.
- Add your credentialsThis API uses an API key in the Authorization header. Add yours in the collection's variables or an environment; the requests already reference it.
- Send a requestPick an endpoint, for example “Search APIs” (GET /apis?query=string&state=ALL&page=0&limit=10&sort=NAME&order=ASC), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the SwaggerHub Registry API?
Overview Use SwaggerHub Registry API to access, manage, and update the following resources in SwaggerHub, bypassing the web interface: * APIs * Domains *… It is listed under Developer tools and has 87 endpoints.
Who publishes the SwaggerHub Registry API?
It is listed from Swaggerhub's public API description (an OpenAPI document), not published by Swaggerhub on Swastik Codes. Anyone who controls swaggerhub.com can claim the profile by adding a DNS TXT record.
What is the base URL of the SwaggerHub Registry API?
Requests go to https://api.swaggerhub.com. Endpoint paths are added to this base URL.
How do I authenticate with the SwaggerHub Registry API?
With an API key in the Authorization header.
How many endpoints does the SwaggerHub Registry API have?
87 operations on 56 paths (35 GET, 21 POST, 14 PUT, 12 DELETE, 5 PATCH). The largest groups are APIs, Domains, Templates, Projects.
Is forking the SwaggerHub Registry API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.