3 min • read

Git

Blackbird integrates with Git to simplify how you discover, import, and manage your APIs. When you connect your GitHub repositories, Blackbird can automatically detect OpenAPI and Swagger definitions and import them directly into your Blackbird catalog. As your API specifications evolve in GitHub, Blackbird stays in sync to ensure that your definitions are always up to date.

Key features include:

  • GitHub API discovery – Scan your private and public GitHub repositories for OpenAPI and Swagger definitions.
  • GitHub API importing – Create a project from a specific GitHub repository by selecting one or more API definitions that you want to import. Blackbird keeps the imported definitions up to date with changes made in the repository, so your definitions stay current as your APIs evolve. The sync only works one way, so changes made in Blackbird won’t update your GitHub repository.

Prerequisites

Before configuring the Git integration, ensure you meet the following requirements:

  • You have a GitHub account.
  • To import API definitions from private repositories, you must have access permissions. If you aren't an administrator, your GitHub administrator must approve adding the Blackbird app. To import API definitions from public repositories, you don't need administrator approval. You can connect and add public API specifications directly.

Configure the Git integration

After you meet the prerequisites, use the following procedure to configure the Git integration.

To configure the Git integration:

  1. Log into the Blackbird UI.

  2. In the left pane, choose APIs.

  3. Choose the Add API button.

  4. Choose the Connect with GitHub link to allow Blackbird to discover your public APIs in GitHub.

  5. (Optional) If you only see public repositories in the Select Repository drop-down menu, choose the add the Blackbird GitHub app link. If you aren’t a GitHub administrator for your private repositories, Blackbird submits a permissions request to your administrator.

  6. In the Select repository drop-down menu, choose the repository you want to analyze for API definitions.

  7. Choose the Analyze button. Blackbird analyzes your repository for API definitions and lists them.

  8. Use the checkboxes to choose one or more API files you want to import into Blackbird. Blackbird imports the API definitions.

  9. Choose the View Project button.

    Note: You can choose this button at any time without interrupting the process.

    Your new project opens, displaying a list of the APIs associated with the project. It also shows the repository name, branch name, time, date and time of your last commit, the commit SHA, and whether your webhook is active or inactive.

Next steps

Now that your project includes one or more APIs, you can take one of the following next steps:

  • To generate a mock instance of your API to simulate its behavior in a controlled testing environment, choose Create Mock.
  • To view the API’s endpoints and details, choose the eye icon.
  • To add or remove APIs from the project, navigate to Projects in the left pane. Find the project you want to edit, select the three vertical dots on its tile, and choose Edit APIs. Select or deselect the files you want to use in Blackbird.
  • To remove a project from Blackbird, navigate to Projects in the left pane. Find the project you want to delete, select the three vertical dots on its tile, and choose Remove. If the project is the only one linked to a GitHub repository with a webhook, Blackbird removes the webhook and disassociates any related APIs and mocks. All related APIs and mocks remain available in your catalog.