Runners
runners
Methods
Checks if a user is authenticated for a specific host.
Use this method to:
- Verify authentication status
- Get authentication URLs
- Check PAT support
Examples
Check authentication:
Verifies authentication for a host.
host: "github.com"
Creates a new runner registration with the server. Registrations are very short-lived and must be renewed every 30 seconds.
Use this method to:
- Register organization runners
- Set up runner configurations
- Initialize runner credentials
- Configure auto-updates
Examples
Create cloud runner:
Creates a new runner in AWS EC2.
name: "Production Runner" provider: RUNNER_PROVIDER_AWS_EC2 spec: desiredPhase: RUNNER_PHASE_ACTIVE configuration: region: "us-west" releaseChannel: RUNNER_RELEASE_CHANNEL_STABLE autoUpdate: trueCreate local runner:
Creates a new local runner on Linux.
name: "Local Development Runner" provider: RUNNER_PROVIDER_LINUX_HOST spec: desiredPhase: RUNNER_PHASE_ACTIVE configuration: releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST autoUpdate: true
deprecated, will be removed. Use exchange_token instead.
exchange_token is a one-time use token that should be exchanged by the runner for an access token, using the IdentityService.ExchangeToken rpc. The token expires after 24 hours.
Creates an access token for runner logs and debug information.
Generated tokens are valid for one hour and provide runner-specific access permissions. The token is scoped to a specific runner and can be used to access support bundles.
Examples
Generate runner logs token:
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Creates a new authentication token for a runner.
Use this method to:
- Generate runner credentials
- Renew expired tokens
- Set up runner authentication
Note: This does not expire previously issued tokens.
Examples
Create token:
Creates a new token for runner authentication.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Deletes a runner permanently.
Use this method to:
- Remove unused runners
- Clean up runner registrations
- Delete obsolete runners
Examples
Delete runner:
Permanently removes a runner.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Lists all registered runners with optional filtering.
Use this method to:
- View all available runners
- Filter by runner type
- Monitor runner status
- Check runner availability
Examples
List all runners:
Shows all runners with pagination.
pagination: pageSize: 20Filter by provider:
Lists only AWS EC2 runners.
filter: providers: ["RUNNER_PROVIDER_AWS_EC2"] pagination: pageSize: 20
Parses a context URL and returns the parsed result.
Use this method to:
- Validate context URLs
- Check repository access
- Verify branch existence
Returns:
- FAILED_PRECONDITION if authentication is required
- PERMISSION_DENIED if access is not allowed
- INVALID_ARGUMENT if URL is invalid
- NOT_FOUND if repository/branch doesn't exist
Examples
Parse URL:
Parses and validates a context URL.
contextUrl: "https://github.com/org/repo/tree/main"
Gets details about a specific runner.
Use this method to:
- Check runner status
- View runner configuration
- Monitor runner health
- Verify runner capabilities
Examples
Get runner details:
Retrieves information about a specific runner.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Searches for repositories across all authenticated SCM hosts.
Use this method to:
- List available repositories
- Search repositories by name or content
- Discover repositories for environment creation
Returns repositories from all authenticated SCM hosts in natural sort order. If no repositories are found, returns an empty list.
Examples
List all repositories:
Returns up to 25 repositories from all authenticated hosts.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"Search repositories:
Searches for repositories matching the query across all hosts.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" searchString: "my-project" limit: 10
Updates a runner's configuration.
Use this method to:
- Modify runner settings
- Update release channels
- Change runner status
- Configure auto-update settings
Examples
Update configuration:
Changes runner settings.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" name: "Updated Runner Name" spec: configuration: releaseChannel: RUNNER_RELEASE_CHANNEL_LATEST autoUpdate: true
Domain types
RunnerKind represents the kind of a runner
RunnerPhase represents the phase a runner is in
RunnerProvider identifies the specific implementation type of a runner. Each provider maps to a specific kind of runner (local or remote), as specified below for each provider.
RunnerStatus represents the status of a runner
Configurations
runners.configurations
Methods
Validates a runner configuration.
Use this method to:
- Check configuration validity
- Verify integration settings
- Validate environment classes
Examples
Validate SCM integration:
Checks if an SCM integration is valid.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmIntegration: id: "integration-id" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret"
Domain types
runners.configurations.environment_classes
Methods
Creates a new environment class for a runner.
Use this method to:
- Define compute resources
- Configure environment settings
- Set up runtime options
Examples
Create environment class:
Creates a new environment configuration.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" displayName: "Large Instance" description: "8 CPU, 16GB RAM" configuration: - key: "cpu" value: "8" - key: "memory" value: "16384"
Lists environment classes with optional filtering.
Use this method to:
- View available classes
- Filter by capability
- Check enabled status
Examples
List all classes:
Shows all environment classes.
pagination: pageSize: 20Filter enabled classes:
Lists only enabled environment classes.
filter: enabled: true pagination: pageSize: 20
buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE
Gets details about a specific environment class.
Use this method to:
- View class configuration
- Check resource settings
- Verify availability
Examples
Get class details:
Retrieves information about a specific class.
environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Updates an environment class.
Use this method to:
- Modify class settings
- Update resource limits
- Change availability
Examples
Update class:
Changes class configuration.
environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" displayName: "Updated Large Instance" description: "16 CPU, 32GB RAM" enabled: true
runners.configurations.host_authentication_tokens
Methods
Creates a new authentication token for accessing remote hosts.
Use this method to:
- Set up SCM authentication
- Configure OAuth credentials
- Manage PAT tokens
Examples
Create OAuth token:
Creates a new OAuth-based authentication token.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" host: "github.com" token: "gho_xxxxxxxxxxxx" source: HOST_AUTHENTICATION_TOKEN_SOURCE_OAUTH expiresAt: "2024-12-31T23:59:59Z" refreshToken: "ghr_xxxxxxxxxxxx"
Deletes a host authentication token.
Use this method to:
- Remove unused tokens
- Revoke access
- Clean up expired tokens
Examples
Delete token:
Permanently removes a token.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Lists host authentication tokens with optional filtering.
Use this method to:
- View all tokens
- Filter by runner or user
- Monitor token status
Examples
List all tokens:
Shows all tokens with pagination.
pagination: pageSize: 20Filter by runner:
Lists tokens for a specific runner.
filter: runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20
Gets details about a specific host authentication token.
Use this method to:
- View token information
- Check token expiration
- Verify token validity
Examples
Get token details:
Retrieves information about a specific token.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Updates an existing host authentication token.
Use this method to:
- Refresh token values
- Update expiration
- Modify token settings
Examples
Update token:
Updates token value and expiration.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" token: "gho_xxxxxxxxxxxx" expiresAt: "2024-12-31T23:59:59Z" refreshToken: "ghr_xxxxxxxxxxxx"
Domain types
runners.configurations.schema
Methods
Gets the latest runner configuration schema.
Use this method to:
- View available settings
- Check configuration options
- Validate configurations
Examples
Get schema:
Retrieves configuration schema for a runner.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
Domain types
runners.configurations.scm_integrations
Methods
Creates a new SCM integration for a runner.
Use this method to:
- Configure source control access
- Set up repository integrations
- Enable code synchronization
Examples
Create GitHub integration:
Sets up GitHub SCM integration.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret"
Deletes an SCM integration.
Use this method to:
- Remove unused integrations
- Clean up configurations
- Revoke SCM access
Examples
Delete integration:
Removes an SCM integration.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
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
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"
Updates an existing SCM integration.
Use this method to:
- Modify integration settings
- Update credentials
- Change configuration
Examples
Update integration:
Updates OAuth credentials.
id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" oauthClientId: "new_client_id" oauthPlaintextClientSecret: "new_client_secret"
Domain types
Policies
runners.policies
Methods
Creates a new policy for a runner.
Use this method to:
- Set up access controls
- Define group permissions
- Configure role-based access
Examples
Create admin policy:
Grants admin access to a group.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: RUNNER_ROLE_ADMIN
Deletes a runner policy.
Use this method to:
- Remove access controls
- Revoke permissions
- Clean up policies
Examples
Delete policy:
Removes a group's access policy.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60"
Lists policies for a runner.
Use this method to:
- View access controls
- Check policy configurations
- Audit permissions
Examples
List policies:
Shows all policies for a runner.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" pagination: pageSize: 20
Updates an existing runner policy.
Use this method to:
- Modify access levels
- Change group roles
- Update permissions
Examples
Update policy role:
Changes a group's access level.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" groupId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: RUNNER_ROLE_USER
Domain types