Skip to content
Ona Docs

GetRunnerConfigurationSchema

client.runners.configurations.schema.retrieve(SchemaRetrieveParams { runnerId } body, RequestOptionsoptions?): SchemaRetrieveResponse { schema }
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"
ParametersExpand Collapse
body: SchemaRetrieveParams { runnerId }
runnerId?: string
formatuuid
ReturnsExpand Collapse
SchemaRetrieveResponse { schema }
schema?: RunnerConfigurationSchema { environmentClasses, runnerConfig, scm, version }
environmentClasses?: Array<EnvironmentClass>
id?: string
bool?: Bool { default }
default?: boolean
description?: string
display?: Display { default }
default?: string
enum?: Enum { default, defaultValue, possibleValues, values }
Deprecateddefault?: string

deprecated, will be removed, use default_value instead

defaultValue?: DefaultValue { detail, subtitle, title }
detail?: string
subtitle?: string
title?: string
possibleValues?: Array<PossibleValue>
detail?: string
subtitle?: string
title?: string
Deprecatedvalues?: Array<string>

deprecated, will be removed, use possible_values instead

int?: Int { default, max, min }
default?: number
formatint32
max?: number
formatint32
min?: number
formatint32
name?: string
required?: boolean
secret?: boolean
string?: String { default, pattern }
default?: string
pattern?: string
runnerConfig?: Array<RunnerConfig>
id?: string
bool?: Bool { default }
default?: boolean
description?: string
display?: Display { default }
default?: string
enum?: Enum { default, defaultValue, possibleValues, values }
Deprecateddefault?: string

deprecated, will be removed, use default_value instead

defaultValue?: DefaultValue { detail, subtitle, title }
detail?: string
subtitle?: string
title?: string
possibleValues?: Array<PossibleValue>
detail?: string
subtitle?: string
title?: string
Deprecatedvalues?: Array<string>

deprecated, will be removed, use possible_values instead

int?: Int { default, max, min }
default?: number
formatint32
max?: number
formatint32
min?: number
formatint32
name?: string
required?: boolean
secret?: boolean
string?: String { default, pattern }
default?: string
pattern?: string
scm?: Array<Scm>
defaultHosts?: Array<string>
name?: string
oauth?: OAuth { callbackUrl }
callbackUrl?: string

callback_url is the URL the OAuth app will redirect to after the user has authenticated.

pat?: Pat { description, docsLink }
description?: string

description is a human-readable description of the PAT.

scmId?: string
version?: string

The schema version

GetRunnerConfigurationSchema

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const schema = await client.runners.configurations.schema.retrieve({
  runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});

console.log(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"
  }
}