Sourcegraph API

Starting in Sourcegraph 7.0, a new versioned external API is being introduced for custom integrations (see the announcement). The currently available API surface can be seen in /api-reference (e.g. https://sourcegraph.example.com/api-reference). From this page, integrators can view the available operations and download the OpenAPI schema. We are committed to supporting integrations built on top of these new APIs with backwards compatibility and migration assistance for breaking changes.

The new Sourcegraph API is a work in progress, and capabilities are gradually being ported over. If you have an integration you'd like to build that is not currently served by the new Sourcegraph API, please reach out at [email protected].

For specific types of integrations, Sourcegraph also offers the following APIs:

For diagnostics use cases, the Sourcegraph GraphQL debug API is also available without any compatibility guarauntees.

The Sourcegraph GraphQL API has historically been an internal interface without formal compatibility guarantees. For external integrations, Sourcegraph 7.0 introduces a new, supported API at /api-reference. The GraphQL API remains available, but we recommend migrating to the new API for a stable integration experience.

If you have a use case that is not currently served by the new Sourcegraph API, please reach out at [email protected].

Previous
Editor Extensions