Skip to main content
Skip table of contents

Automatic Synchronization to Apiboost

This guide outlines the process of configuring a webhook integration in SwaggerHub and syncing it automatically with Apiboost. This will keep your API Documentation up to date in realtime without needing to manually sync changes within Apiboost.

For newly created API References in Apiboost, the API Reference will still need to be manually linked to an API Product for it to be visible to your API consumers. This sync process simply creates the API Reference. To manage the full lifecycle and connection between API Reference and Product, see our CI/CD Pipelines documentation.

Configuring SwaggerHub Webhook

  1. Open your API in the SwaggerHub editor.

  2. In the right hand corner of SwaggerHub UI, hover over Sync and click “Set Up Integrations

  3. In the Integrations list, select Webhook

Webhook Configuration Details

  • Name: Choose a descriptive name for your webhook (e.g., "Apiboost Sync").

  • Payload URL: Enter https://your-apiboost-domain.com/api/v1/sync-swaggerhub

  • Content Type: Select "application/json"

  • Lifecycle Events: Choose the events that will trigger the webhook:

    • After API/version saved

    • After API/version published

  • Additional Headers: Add necessary authentication Header: Authorization: Bearer <username:password>. Note: It is recommended to create a Service Administrator account - see RBAC for Internal Users for additional information related to this role.

Your username:password must be a Base64 encoded value. This can be generated using this command in your CLI:

echo -n “username:password” | base64

Be advised that using an online encoder is not recommended due to the sensitive nature of the username and password.

Finalizing Webhook Setup:

  1. Click "Create" to add the webhook.

  2. Click "Done" to complete the setup4.

Syncing with Apiboost

Once the webhook is configured, SwaggerHub will send a POST request to the specified Apiboost endpoin whenever the selected lifecycle events occur. The payload will either create an API Reference if one of the same name and version do not exist in Apiboost. Alternatively, if an API Reference is detected to use the API Documentation from SwaggerHub, it will be updated.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.