Skip to content
Ona Docs

ListSCMOrganizations

runners.list_scm_organizations(RunnerListScmOrganizationsParams**kwargs) -> RunnerListScmOrganizationsResponse
POST/gitpod.v1.RunnerService/ListSCMOrganizations

Lists SCM organizations the user belongs to.

Use this method to:

  • Get all organizations for a user on a specific SCM host
  • Check organization admin permissions for webhook creation

Examples

  • List GitHub organizations:

    Lists all organizations the user belongs to on GitHub.

    runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    scmHost: "github.com"
ParametersExpand Collapse
token: Optional[str]
page_size: Optional[int]
maximum100
minimum0
runner_id: Optional[str]
formatuuid
scm_host: Optional[str]

The SCM host to list organizations from (e.g., “github.com”, “gitlab.com”)

minLength1
ReturnsExpand Collapse
class RunnerListScmOrganizationsResponse:
organizations: Optional[List[Organization]]

List of organizations the user belongs to

is_admin: Optional[bool]

Whether the user has admin permissions in this organization. Admin permissions typically allow creating organization-level webhooks.

name: Optional[str]

Organization name/slug (e.g., “gitpod-io”)

url: Optional[str]

Organization URL (e.g., “https://github.com/gitpod-io”)

ListSCMOrganizations

import os
from gitpod import Gitpod

client = Gitpod(
    bearer_token=os.environ.get("GITPOD_API_KEY"),  # This is the default and can be omitted
)
response = client.runners.list_scm_organizations(
    runner_id="d2c94c27-3b76-4a42-b88c-95a85e392c68",
    scm_host="github.com",
)
print(response.organizations)
{
  "organizations": [
    {
      "isAdmin": true,
      "name": "name",
      "url": "url"
    }
  ]
}
Returns Examples
{
  "organizations": [
    {
      "isAdmin": true,
      "name": "name",
      "url": "url"
    }
  ]
}