API Hub Integration


api-hub.png

The API Hub client provides comprehensive API Hub Portal and API Hub for Design management capabilities. Access to these features requires authentication with an API_HUB_API_KEY.

Available Tools

Portal Management Tools

list_portals

  • Purpose: Search for available portals within API Hub. Returns only the portals for which you are an owner or designer, either at the product or organization level.
  • Returns: Paginated list of portals, including metadata such as name, subdomain, status, and more.
  • Use case: Discovery of available portals.

get_portal

  • Purpose: Retrieve information about a specific portal.
  • Parameters: Portal UUID or subdomain (portalId).
  • Returns: Complete set of metadata properties for a specific portal.
  • Use case: Get full details on a specific portal configuration.

create_portal

  • Purpose: Create a new portal with API Hub.
  • Returns: Complete set of metadata properties for a specific portal.
  • Use case: Get full details on a specific portal configuration.
  • Parameters:
ParameterDescriptionTypeRequired
nameThe portal name.
Must be between 3 and 40 characters.
stringNo
subdomainThe subdomain to use for the portal.
Must be between 3 and 20 characters.
stringYes
offlineIf set to true the portal will not be visible to customers.
Default: false
booleanNo
routingDetermines the routing strategy ('browser' or 'proxy').
Default: browser
stringNo
credentialsEnabledIndicates if credentials are enabled for the portal.
Default: true
booleanNo
swaggerHubOrganizationIdThe corresponding API Hub (formerly SwaggerHub) organization UUIDstring (uuid)Yes
openapiRendererPortal level setting for the OpenAPI renderer.
- SWAGGER_UI - Use the Swagger UI renderer
- ELEMENTS - Use the Elements renderer
- TOGGLE - Switch between the two renderers with elements set as the default
Default: TOGGLE
stringNo
pageContentFormatDetermines the format of the page content (HTML or MARKDOWN or BOTH)
Default: HTML
stringNo

delete_portal

  • Purpose: Delete a portal.
  • Parameters: Portal UUID or subdomain (portalId).
  • Returns: No content on success.
  • Use case: Delete an existing portal from API Hub.

update_portal

  • Purpose: Update a specific portal's configuration.
  • Returns: Complete set of metadata properties for a specific portal.
  • Use case: Update configuration settings of existing API Hub portal.
  • Parameters:
ParameterDescriptionTypeRequired
nameThe portal name.
Must be between 3 and 40 characters.
stringNo
subdomainSubdomain for this portal. Must be unique.
Must be between 3 and 20 characters.
stringNo
customDomainCustom domain for this portal. Must be unique.
If the value is explicitly set to null, the custom domain will be removed.
stringNo
offlineIf set to true the portal will not be visible to customers.
Default: false
booleanNo
gtmKeyThe Google Tag Manager key for this portal.stringNo
routingDetermines the routing strategy ('browser' or 'proxy').
Default: browser
stringNo
credentialsEnabledIndicates if credentials are enabled for the portal.
Default: true
booleanNo
swaggerHubOrganizationIdThe corresponding API Hub (formerly SwaggerHub) organization UUIDstring (uuid)Yes
openapiRendererPortal level setting for the OpenAPI renderer.
- SWAGGER_UI - Use the Swagger UI renderer
- ELEMENTS - Use the Elements renderer
- TOGGLE - Switch between the two renderers with elements set as the default
Default: TOGGLE
stringNo
pageContentFormatDetermines the format of the page content (HTML or MARKDOWN or BOTH)
Default: HTML
stringNo

list_portal_products

  • Purpose: Get products for a specific portal.
  • Parameters: Portal UUID or subdomain (portalId).
  • Returns: Paginated list of products in a portal.
  • Use case: Understanding the products that exist for a given portal.

get_portal_product

  • Purpose: Retrieve information about a specific product resource.
  • Parameters: Product UUID (productId).
  • Returns: Complete set of properties for a specific product.
  • Use case: Understanding the product information and status (both from a publishing and visibility perspective).

create_portal_product

  • Purpose: Create a new product within a specific portal.
  • Returns: Information about the newly created product.
  • Use case: Add a new product to a portal.
  • Parameters:
ParameterDescriptionTypeRequired
portalIdPortal UUID or subdomain.stringYes
createPortalArgstypeThe mode of creation. new or copystringYes
nameThe product name.
Must be between 3 and 40 characters.
stringYes
slugURL component for this product. Must be unique within the portal.
Must be between 3 and 22 characters.
stringYes
descriptionThe product description.
Max length is 110 characters.
stringNo
publicWhether this product is available to non-members of the organization.booleanNo
hiddenIf set to true, this product will not be displayed on the landing page.booleanNo

update_portal_product

  • Purpose: Update an product within a specific portal.
  • Returns: Information about the update product.
  • Use case: Change information on an existing product.
  • Parameters:
ParameterDescriptionTypeRequired
productIdIdentifier of product to update.stringYes
updatePortalArgsnameThe product name.
Must be between 3 and 40 characters.
stringYes
slugURL component for this product. Must be unique within the portal.
Must be between 3 and 22 characters.
stringYes
descriptionThe product description.
Max length is 110 characters.
stringNo
versionThe product version.stringNo
publicWhether this product is available to non-members of the organization.booleanNo
hiddenIf set to true, this product will not be displayed on the landing page.booleanNo

delete_portal_product

  • Purpose: Delete a product from a specific portal.
  • Parameters: Product UUID (productId).
  • Returns: No content on success.
  • Use case: Delete an existing product from an API Hub portal.

API Hub for Design API Tools

search_apis_and_domains

  • Purpose: Search for APIs and Domains in API Hub for Design using the comprehensive /specs endpoint and retrieve metadata including owner, name, description, summary, version, and specification.
  • Returns: List of API and Domain specifications matching the search criteria.
  • Use case: Discover existing APIs and domains for integration or reference.
  • Parameters:
ParameterDescriptionTypeRequired
queryFree text search - searches name and descriptionstringNo
ownerAPI/Domain owner (username or organization name)stringNo
sortField used to sort the list.
Options: NAME, UPDATED, CREATED, OWNER
Default: NAME
stringNo
orderSort order.
Options: ASC, DESC
Default: ASC
stringNo
pagePage to return
Default: 0
numberNo
limitNumber of results per page
Default: 10, Max: 100
numberNo
specTypeType of spec to search for.
Options: API, DOMAIN, ANY
Default: ANY
stringNo
visibilityVisibility of the spec.
Options: PUBLIC, PRIVATE, ANY
Default: ANY
stringNo
stateState of the spec.
Options: PUBLISHED, UNPUBLISHED, ANY
Default: ANY
stringNo

get_api_definition

  • Purpose: Fetch a resolved API definition from API Hub for Design based on its owner, API name, and version.
  • Returns: Complete OpenAPI specification for the requested API.
  • Use case: Retrieve the specified API definitions for integration, testing, or documentation purposes.
  • Parameters:
ParameterDescriptionTypeRequired
ownerAPI owner (username or organization name)stringYes
apiAPI namestringYes
versionAPI versionstringYes

Configuration

To use API Hub tools, you need to configure the API_HUB_API_KEY environment variable with your API Hub API token.

Common Use Cases

  1. Portal Discovery: Use list_portals to find available portals you have access to.
  2. Portal Management: Create, update, and delete portals using the respective tools.
  3. Product Organization: Manage products within portals for better API organization.
  4. API Discovery: Use search_apis_and_domains to find existing APIs in your API Hub for Design.
  5. API Integration: Retrieve specific API definitions with get_api_definition for development or testing purposes.