Swagger Portal Integration


swagger-portal.png

The Swagger Portal client provides comprehensive portal and product management capabilities. Access to these features requires authentication with a SWAGGER_API_KEY.

Available Tools

Portal Management Tools

list_portals

  • Purpose: Search for available portals within Swagger. 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 Swagger.
  • 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 Swagger (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 Swagger.

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 Swagger 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 Swagger Studio (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 a Swagger portal.

Configuration

To use Swagger Portal tools, you need to configure the SWAGGER_API_KEY environment variable with your Swagger 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.