SwaggerHub API Integration

We currently support the OpenAPI 3.0 version.

This topic describes how to navigate and control the SwaggerHub API integration.

View SwaggerHub APIs List in SwaggerHub Explore

The SwaggerHub API integration on the left toolbar of SwaggerHub Explore allows you to view and interact with all SwaggerHub APIs that you have access to.

sh-in-explore.png

By default, the last SwaggerHubupdated APIs are displayed in descending order.

  • Search for SwaggerHub APIs in Explore.

  • Enable the My Hub toggle to limit the search to APIs associated with you.

  • Filter APIs by specification, visibility, published state, or owner.

  • Open details for specific APIs.

Note

The SwaggerHub Explore integration allows you to view SwaggerHub APIs directly in Explore but does not support bi-directional updates to SwaggerHub API.

Search for SwaggerHub APIs in Explore

To search for a SwaggerHub API in Explore, click the SwaggerHub icon on the left toolbar of Explore. Use the search bar at the top of the SwaggerHub APIs list to search and discover public or private APIs.

View your APIs with the My Hub toggle

Select the My Hub switch to the right of the search bar to toggle between SwaggerHub APIs:

  • Toggle the switch to on, to limit the APIs to those you are an owner, collaborator, or a member of the owning organization.

  • Toggle the switch to off, to view and search across all public and private APIs you are associated with.

Sort and filter SwaggerHub APIs by specification, visibility, published state, or owner

You can use the filters to the right of the search bar to refine your SwaggerHub API search results:

  • Specification. Click the Screenshot_2023-07-05_at_09_13_31.png and filter by OpenAPI specification. 

  • Visibility. Click the Screenshot_2023-07-05_at_09_13_31.png and filter by public or private API status.

  • State. Click the Screenshot_2023-07-05_at_09_13_31.png and filter by published or unpublished API status.

  • Owner. Click the Screenshot_2023-07-05_at_09_13_31.png to filter by owner.

Work with the SwaggerHub APIs

From the SwaggerHub  API icon on the left-hand side panel, you can:

  • View SwaggerHub API Information.

  • Open the API definition in SwaggerHub.

  • View all connections associated with an API version.

To view SwaggerHub API information, select an API from the list. It displays the following details of the  APIs definition:

  • Visibility

  • State

  • Owner

    api-conections.png

View all available connections

Click the API you want to explore in the SwaggerHub API list to open the API connections panel.

Select any connection in the sidebar to:

  • Add input

  • Send requests

  • Receive responses

  • Add to Spaces

configure-endpoint.png

Generate OpenAPI Definition

  1. Set up Request

    To generate an OpenAPI definition, navigate to the Explore tab on the left-hand side panel.

    Use the filters to the left to select the following from the dropdown lists:

    • Protocol (REST, Kafka)

    • Operation (GET, POST, PUT, DELETE, PATH, OPTIONS)

    After creating a definition, save it to Spaces by clicking Add to Space.

    Note

    You can also add the connections to space for selected history records. For more information, see Access History Logs .

    she-req-save.png
  2. Export to Explore

    To export the OpenAPI definition, navigate to the SwaggerHub tab on the left-hand side panel and do the following:

    1. Navigate to the Spaces tab in the left toolbar.

    2. Select your Space, and within that, select the API you wish to export.

      export.png
    3. Click Export to SwaggerHub.

    4. Fill out details for adding the API definition to SwaggerHub API, including name, version, and visibility.

    5. Click Confirm.

      Your API is now created inSwaggerHub. Follow the link to view it there.

Publication date: