Skip to content
Maua.Culturewire

Sourcegraph

Code search and intelligence across all repositories

Developer toolsCatalog2 tools · 0 triggers

Managed auth

Authentication

Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.

  • API key

    Your users enter

    • Your Sourcegraph URLOptionalHTTPS URL
    • Access tokenSecretRequired

    Where to find them

    1. In Sourcegraph open your profile → “Settings” → “Access tokens” and click “Generate new token”.
    2. Copy the token (it starts with sgp_): it is shown only once.

Tools (2)

  • Sourcegraph API requestSOURCEGRAPH_SEND_REQUEST

    Authenticated call to the Sourcegraph API ({url}/.api). Any endpoint of the API is allowed. Examples: POST /graphql {"query": "{ search(query: \"repo:… lang:go func main\", version: V3) { results { matchCount } } }"} (better with SOURCEGRAPH_SEND_GRAPHQL_REQUEST), GET /search/stream?q=… (streaming results), POST /graphql with repositories(first: 20).

    Required scopes

    No scopes required

    Input

    Sourcegraph API request input
    NameTypeDescription
    methodstringHTTP methodOne of: GET, POST, PUT, PATCH, DELETEDefault: "GET"
    pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link)
    queryobjectQuery string parameters
    bodyunknownJSON body
    formobjectBody as application/x-www-form-urlencoded instead of JSON
    body_base64stringBinary body, base64 (at most 960000 characters)
    content_typestringContent-Type of body_base64
    headersobjectExtra headers such as Accept. Authentication is added automatically.
  • Sourcegraph GraphQL requestSOURCEGRAPH_SEND_GRAPHQL_REQUEST

    Runs a GraphQL query or mutation against the Sourcegraph API and returns its data and errors.

    Required scopes

    No scopes required

    Input

    Sourcegraph GraphQL request input
    NameTypeDescription
    queryrequiredstringGraphQL query or mutation
    variablesobjectGraphQL variables