Skip to content

SwaggerHub Registry API API

by swaggerhub.com

API keyHTTPSDevelopment
Open documentation ↗

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](https://app.swaggerhub.com/apis-docs/swagger-hub/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](https://app.swaggerhub.com/settings/apiKey) 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: * [SwaggerHub CLI](https://www.npmjs.com/package/swaggerhub-cli) * [Maven plugin](https://github.com/swagger-api/swaggerhub-maven-plugin) * [Gradle plugin](https://github.com/swagger-api/swaggerhub-gradle-plugin)

SwaggerHub Registry API is a development API from swaggerhub.com. Requests are authenticated with an API key. It is served over HTTPS. Its OpenAPI description documents 87 endpoints.

At a glance

Authentication
API key
HTTPS
Yes
CORS
Unknown
Category
Development
Base URL
https://api.swaggerhub.com
Version
1.0.66
Endpoints
87
Spec updated
2023-02-17

Make a first request

Replace the placeholders; the documentation says exactly where credentials go.

cURL
curl -X GET "https://api.swaggerhub.com/apis" \
  -H "Accept: application/json" \
  -H "X-API-Key: YOUR_API_KEY"
JavaScript
const response = await fetch("https://api.swaggerhub.com/apis", {
  method: "GET",
  headers: {
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
  },
});
const data = await response.json();
console.log(data);
Python
import requests

response = requests.request(
    "GET",
    "https://api.swaggerhub.com/apis",
    headers={
    "Accept": "application/json",
    "X-API-Key": "YOUR_API_KEY",
    },
    timeout=30,
)
print(response.json())

Endpoints

MethodPathWhat it does
GET/apisSearch APIs
GET/apis/{owner}Get a list of APIs of the specified owner
GET/apis/{owner}/{api}Get a list of API versions
POST/apis/{owner}/{api}Create or update an API
DELETE/apis/{owner}/{api}Delete an API
POST/apis/{owner}/{api}/renameRename an API
GET/apis/{owner}/{api}/settings/defaultGet the default version of an API
PUT/apis/{owner}/{api}/settings/defaultSet the default API version
GET/apis/{owner}/{api}/{version}Get the OpenAPI definition of the specified API version
DELETE/apis/{owner}/{api}/{version}Delete an API version
POST/apis/{owner}/{api}/{version}/cloneCreate a new API version
GET/apis/{owner}/{api}/{version}/commentsGet comments for the specified API version
POST/apis/{owner}/{api}/{version}/commentsAdd a new comment
POST/apis/{owner}/{api}/{version}/comments/batchBulk update comments
PATCH/apis/{owner}/{api}/{version}/comments/{comment}Update a comment
DELETE/apis/{owner}/{api}/{version}/comments/{comment}Delete a comment
POST/apis/{owner}/{api}/{version}/comments/{comment}/repliesReply to a comment
PATCH/apis/{owner}/{api}/{version}/comments/{comment}/replies/{reply}Update a comment reply
DELETE/apis/{owner}/{api}/{version}/comments/{comment}/replies/{reply}Delete a comment reply
PUT/apis/{owner}/{api}/{version}/comments/{comment}/status/{status}Resolve or reopen a comment
POST/apis/{owner}/{api}/{version}/forkFork an API
GET/apis/{owner}/{api}/{version}/integrationsGet all integrations configured for the specified API version
POST/apis/{owner}/{api}/{version}/integrationsCreate an integration for the specified API and version
GET/apis/{owner}/{api}/{version}/integrations/{integrationId}Get integration settings
PUT/apis/{owner}/{api}/{version}/integrations/{integrationId}Update integration settings
PATCH/apis/{owner}/{api}/{version}/integrations/{integrationId}Partially update integration settings
DELETE/apis/{owner}/{api}/{version}/integrations/{integrationId}Delete an integration
POST/apis/{owner}/{api}/{version}/integrations/{integrationId}/executeRun an integration
GET/apis/{owner}/{api}/{version}/settings/lifecycleGet the published status for the specified API and version
PUT/apis/{owner}/{api}/{version}/settings/lifecyclePublish or unpublish an API version
GET/apis/{owner}/{api}/{version}/settings/privateGet the visibility (public or private) of API version
PUT/apis/{owner}/{api}/{version}/settings/privateSet the visibility (public or private) of an API version
GET/apis/{owner}/{api}/{version}/standardizationRetrieve the standardization errors for a given API definition
GET/apis/{owner}/{api}/{version}/swagger.jsonGet the OpenAPI definition for the specified API version in JSON format
GET/apis/{owner}/{api}/{version}/swagger.yamlGet the OpenAPI definition for the specified API version in YAML format
GET/apis/{owner}/{api}/{version}/validationdeprecatedDeprecated Get API Standardization errors and warnings
GET/domainsSearch domains
GET/domains/{owner}Get a list of domains of the specified owner
GET/domains/{owner}/{domain}Get a list of domain versions
POST/domains/{owner}/{domain}Create or update a domain
DELETE/domains/{owner}/{domain}Delete a domain
POST/domains/{owner}/{domain}/renameRename a domain
GET/domains/{owner}/{domain}/settings/defaultGet the default version of a domain
PUT/domains/{owner}/{domain}/settings/defaultSet the default version for a domain
GET/domains/{owner}/{domain}/{version}Get the OpenAPI definition of the specified domain version
DELETE/domains/{owner}/{domain}/{version}Delete a domain version
POST/domains/{owner}/{domain}/{version}/cloneCreate a new domain version
GET/domains/{owner}/{domain}/{version}/commentsGet comments for the specified domain version
POST/domains/{owner}/{domain}/{version}/commentsAdd a new comment
POST/domains/{owner}/{domain}/{version}/comments/batchBulk update comments
PATCH/domains/{owner}/{domain}/{version}/comments/{comment}Update a comment
DELETE/domains/{owner}/{domain}/{version}/comments/{comment}Delete a comment
POST/domains/{owner}/{domain}/{version}/comments/{comment}/repliesReply to a comment
PATCH/domains/{owner}/{domain}/{version}/comments/{comment}/replies/{reply}Update a comment reply
DELETE/domains/{owner}/{domain}/{version}/comments/{comment}/replies/{reply}Delete a comment reply
PUT/domains/{owner}/{domain}/{version}/comments/{comment}/status/{status}Resolve or reopen a comment
GET/domains/{owner}/{domain}/{version}/domain.jsonGet the OpenAPI definition for the specified domain version in JSON format
GET/domains/{owner}/{domain}/{version}/domain.yamlGet the OpenAPI definition for the specified domain version in YAML format
POST/domains/{owner}/{domain}/{version}/forkFork a domain
GET/domains/{owner}/{domain}/{version}/settings/lifecycleGet the published status for the specified domain and version
PUT/domains/{owner}/{domain}/{version}/settings/lifecyclePublish or unpublish a domain version
GET/domains/{owner}/{domain}/{version}/settings/privateGet the visibility (public or private) of a domain version
PUT/domains/{owner}/{domain}/{version}/settings/privateSet the visibility (public or private) of a domain version
GET/projectsGet all projects that a user has access to
GET/projects/{owner}Get all projects of an organization
POST/projects/{owner}Create a project in an organization
GET/projects/{owner}/{projectId}Get project information
PUT/projects/{owner}/{projectId}Update a project
DELETE/projects/{owner}/{projectId}Delete a project
GET/projects/{owner}/{projectId}/membersGet project members
PUT/projects/{owner}/{projectId}/membersUpdate a project's members list
PUT/projects/{owner}/{projectId}/{specType}/{name}Add an API or domain to a project
GET/specsRetrieve a list of currently defined APIs, domains, and templates in APIs.json format
GET/templatesRetrieve a list of templates for an owner
GET/templates/{owner}/{templateId}Retrieve an APIs.json listing for all template versions for an owner and template
POST/templates/{owner}/{templateId}Create or update a template
DELETE/templates/{owner}/{templateId}Delete a template
POST/templates/{owner}/{templateId}/renameRename a template
GET/templates/{owner}/{templateId}/{version}Retrieve a template definition
DELETE/templates/{owner}/{templateId}/{version}Delete a particular version of a template
GET/templates/{owner}/{templateId}/{version}/commentsReturn the list of comments for a template
POST/templates/{owner}/{templateId}/{version}/comments/batchUpdate the list of comments for a template
POST/templates/{owner}/{templateId}/{version}/forkCreate a fork for a template
GET/templates/{owner}/{templateId}/{version}/settings/lifecycleRetrieve lifecycle settings for a template
PUT/templates/{owner}/{templateId}/{version}/settings/lifecycleUpdate lifecycle settings for a template
GET/templates/{owner}/{templateId}/{version}/settings/privateRetrieve visibility settings for a template
PUT/templates/{owner}/{templateId}/{version}/settings/privateUpdate visibility settings for a template

Questions

Does the SwaggerHub Registry API API need an API key?

Yes. The SwaggerHub Registry API API uses API key authentication; the documentation explains how to get credentials.

Does the SwaggerHub Registry API API support HTTPS?

Yes, the SwaggerHub Registry API API is served over HTTPS.

How many endpoints does the SwaggerHub Registry API API have?

Its OpenAPI description lists 87 endpoints in version 1.0.66. All of them are shown on this page.

What are alternatives to the SwaggerHub Registry API API?

Other Development APIs include Cloudflare, Azure DevOps, IPify, App Store Connect API, StackExchange.

Compare alternatives →

Listed from APIs.guru (CC0).