Skip to content
Ona Docs

ListSCMIntegrations

runners.configurations.scm_integrations.list(ScmIntegrationListParams**kwargs) -> SyncIntegrationsPage[ScmIntegration]
POST/gitpod.v1.RunnerConfigurationService/ListSCMIntegrations

Lists SCM integrations for a runner.

Use this method to:

  • View all integrations
  • Monitor integration status
  • Check available SCMs

Examples

  • List integrations:

    Shows all SCM integrations.

    filter:
      runnerIds: ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
    pagination:
      pageSize: 20
ParametersExpand Collapse
token: Optional[str]
page_size: Optional[int]
maximum100
minimum0
filter: Optional[Filter]
runner_ids: Optional[Sequence[str]]

runner_ids filters the response to only SCM integrations of these Runner IDs

ReturnsExpand Collapse
class ScmIntegration:
id: Optional[str]

id is the unique identifier of the SCM integration

host: Optional[str]
oauth: Optional[ScmIntegrationOAuthConfig]
client_id: Optional[str]

client_id is the OAuth app’s client ID in clear text.

encrypted_client_secret: Optional[str]

encrypted_client_secret is the OAuth app’s secret encrypted with the runner’s public key.

formatbyte
issuer_url: Optional[str]

issuer_url is used to override the authentication provider URL, if it doesn’t match the SCM host.

+optional if not set, this account is owned by the installation.

pat: Optional[bool]
runner_id: Optional[str]
scm_id: Optional[str]

scm_id references the scm_id in the runner’s configuration schema that this integration is for

virtual_directory: Optional[str]

virtual_directory is the virtual directory path for Azure DevOps Server (e.g., “/tfs”). This field is only used for Azure DevOps Server SCM integrations and should be empty for other SCM types. Azure DevOps Server APIs work without collection when PAT scope is ‘All accessible organizations’.

ListSCMIntegrations

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
page = client.runners.configurations.scm_integrations.list(
    filter={
        "runner_ids": ["d2c94c27-3b76-4a42-b88c-95a85e392c68"]
    },
    pagination={
        "page_size": 20
    },
)
page = page.integrations[0]
print(page.id)
{
  "integrations": [
    {
      "id": "id",
      "host": "host",
      "oauth": {
        "clientId": "clientId",
        "encryptedClientSecret": "U3RhaW5sZXNzIHJvY2tz",
        "issuerUrl": "issuerUrl"
      },
      "pat": true,
      "runnerId": "runnerId",
      "scmId": "scmId",
      "virtualDirectory": "virtualDirectory"
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}
Returns Examples
{
  "integrations": [
    {
      "id": "id",
      "host": "host",
      "oauth": {
        "clientId": "clientId",
        "encryptedClientSecret": "U3RhaW5sZXNzIHJvY2tz",
        "issuerUrl": "issuerUrl"
      },
      "pat": true,
      "runnerId": "runnerId",
      "scmId": "scmId",
      "virtualDirectory": "virtualDirectory"
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}