Skip to content
Ona Docs

GetSCMIntegration

client.Runners.Configurations.ScmIntegrations.Get(ctx, body) (*RunnerConfigurationScmIntegrationGetResponse, error)
POST/gitpod.v1.RunnerConfigurationService/GetSCMIntegration

Gets details about a specific SCM integration.

Use this method to:

  • View integration settings
  • Check integration status
  • Verify configuration

Examples

  • Get integration details:

    Retrieves information about a specific integration.

    id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
ParametersExpand Collapse
body RunnerConfigurationScmIntegrationGetParams
ID param.Field[string]Optional
formatuuid
ReturnsExpand Collapse
type RunnerConfigurationScmIntegrationGetResponse struct{…}
Integration ScmIntegrationOptional
ID stringOptional

id is the unique identifier of the SCM integration

Host stringOptional
ClientID stringOptional

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

EncryptedClientSecret stringOptional

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

formatbyte
IssuerURL stringOptional

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 boolOptional
RunnerID stringOptional
ScmID stringOptional

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

VirtualDirectory stringOptional

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’.

GetSCMIntegration

package main

import (
  "context"
  "fmt"

  "github.com/gitpod-io/gitpod-sdk-go"
  "github.com/gitpod-io/gitpod-sdk-go/option"
)

func main() {
  client := gitpod.NewClient(
    option.WithBearerToken("My Bearer Token"),
  )
  scmIntegration, err := client.Runners.Configurations.ScmIntegrations.Get(context.TODO(), gitpod.RunnerConfigurationScmIntegrationGetParams{
    ID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", scmIntegration.Integration)
}
{
  "integration": {
    "id": "id",
    "host": "host",
    "oauth": {
      "clientId": "clientId",
      "encryptedClientSecret": "U3RhaW5sZXNzIHJvY2tz",
      "issuerUrl": "issuerUrl"
    },
    "pat": true,
    "runnerId": "runnerId",
    "scmId": "scmId",
    "virtualDirectory": "virtualDirectory"
  }
}
Returns Examples
{
  "integration": {
    "id": "id",
    "host": "host",
    "oauth": {
      "clientId": "clientId",
      "encryptedClientSecret": "U3RhaW5sZXNzIHJvY2tz",
      "issuerUrl": "issuerUrl"
    },
    "pat": true,
    "runnerId": "runnerId",
    "scmId": "scmId",
    "virtualDirectory": "virtualDirectory"
  }
}