GetRunnerConfigurationSchema
client.Runners.Configurations.Schema.Get(ctx, body) (*RunnerConfigurationSchemaGetResponse, error)
POST/gitpod.v1.RunnerConfigurationService/GetRunnerConfigurationSchema
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"
GetRunnerConfigurationSchema
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"),
)
schema, err := client.Runners.Configurations.Schema.Get(context.TODO(), gitpod.RunnerConfigurationSchemaGetParams{
RunnerID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", schema.Schema)
}
{
"schema": {
"environmentClasses": [
{
"id": "id",
"bool": {
"default": true
},
"description": "description",
"display": {
"default": "default"
},
"enum": {
"default": "default",
"defaultValue": {
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
},
"possibleValues": [
{
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
}
],
"values": [
"string"
]
},
"int": {
"default": 0,
"max": 0,
"min": 0
},
"name": "name",
"required": true,
"secret": true,
"string": {
"default": "default",
"pattern": "pattern"
}
}
],
"runnerConfig": [
{
"id": "id",
"bool": {
"default": true
},
"description": "description",
"display": {
"default": "default"
},
"enum": {
"default": "default",
"defaultValue": {
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
},
"possibleValues": [
{
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
}
],
"values": [
"string"
]
},
"int": {
"default": 0,
"max": 0,
"min": 0
},
"name": "name",
"required": true,
"secret": true,
"string": {
"default": "default",
"pattern": "pattern"
}
}
],
"scm": [
{
"defaultHosts": [
"string"
],
"name": "name",
"oauth": {
"callbackUrl": "callbackUrl"
},
"pat": {
"description": "description",
"docsLink": "docsLink"
},
"scmId": "scmId"
}
],
"version": "version"
}
}Returns Examples
{
"schema": {
"environmentClasses": [
{
"id": "id",
"bool": {
"default": true
},
"description": "description",
"display": {
"default": "default"
},
"enum": {
"default": "default",
"defaultValue": {
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
},
"possibleValues": [
{
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
}
],
"values": [
"string"
]
},
"int": {
"default": 0,
"max": 0,
"min": 0
},
"name": "name",
"required": true,
"secret": true,
"string": {
"default": "default",
"pattern": "pattern"
}
}
],
"runnerConfig": [
{
"id": "id",
"bool": {
"default": true
},
"description": "description",
"display": {
"default": "default"
},
"enum": {
"default": "default",
"defaultValue": {
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
},
"possibleValues": [
{
"detail": "detail",
"subtitle": "subtitle",
"title": "title"
}
],
"values": [
"string"
]
},
"int": {
"default": 0,
"max": 0,
"min": 0
},
"name": "name",
"required": true,
"secret": true,
"string": {
"default": "default",
"pattern": "pattern"
}
}
],
"scm": [
{
"defaultHosts": [
"string"
],
"name": "name",
"oauth": {
"callbackUrl": "callbackUrl"
},
"pat": {
"description": "description",
"docsLink": "docsLink"
},
"scmId": "scmId"
}
],
"version": "version"
}
}