Skip to content
Ona Docs

ListEnvironmentClasses

POST/gitpod.v1.EnvironmentService/ListEnvironmentClasses

Lists available environment classes with their specifications and resource limits.

Use this method to understand what types of environments you can create and their capabilities. Environment classes define the compute resources and features available to your environments.

Examples

  • List all available classes:

    Retrieves a list of all environment classes with their specifications.

    {}

buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE

Query ParametersExpand Collapse
token: optional string
pageSize: optional number
maximum100
minimum0
Body ParametersJSONExpand Collapse
filter: optional object { canCreateEnvironments, enabled, runnerIds, 2 more }
canCreateEnvironments: optional boolean

can_create_environments filters the response to only environment classes that can be used to create new environments by the caller. Unlike enabled, which indicates general availability, this ensures the caller only sees environment classes they are allowed to use.

enabled: optional boolean

enabled filters the response to only enabled or disabled environment classes. If not set, all environment classes are returned.

runnerIds: optional array of string

runner_ids filters the response to only EnvironmentClasses of these Runner IDs

runnerKinds: optional array of RunnerKind

runner_kind filters the response to only environment classes from runners of these kinds.

One of the following:
"RUNNER_KIND_UNSPECIFIED"
"RUNNER_KIND_LOCAL"
"RUNNER_KIND_REMOTE"
"RUNNER_KIND_LOCAL_CONFIGURATION"
runnerProviders: optional array of RunnerProvider

runner_providers filters the response to only environment classes from runners of these providers.

One of the following:
"RUNNER_PROVIDER_UNSPECIFIED"
"RUNNER_PROVIDER_AWS_EC2"
"RUNNER_PROVIDER_LINUX_HOST"
"RUNNER_PROVIDER_DESKTOP_MAC"
"RUNNER_PROVIDER_MANAGED"
"RUNNER_PROVIDER_GCP"
"RUNNER_PROVIDER_DEV_AGENT"
ReturnsExpand Collapse
environmentClasses: optional array of EnvironmentClass { id, runnerId, configuration, 3 more }
id: string

id is the unique identifier of the environment class

runnerId: string

runner_id is the unique identifier of the runner the environment class belongs to

configuration: optional array of FieldValue { key, value }

configuration describes the configuration of the environment class

key: optional string
value: optional string
description: optional string

description is a human readable description of the environment class

maxLength200
minLength3
displayName: optional string

display_name is the human readable name of the environment class

maxLength127
minLength3
enabled: optional boolean

enabled indicates whether the environment class can be used to create new environments.

ListEnvironmentClasses

curl https://app.gitpod.io/api/gitpod.v1.EnvironmentService/ListEnvironmentClasses \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $GITPOD_API_KEY" \
    -d '{}'
{
  "environmentClasses": [
    {
      "id": "id",
      "runnerId": "runnerId",
      "configuration": [
        {
          "key": "key",
          "value": "value"
        }
      ],
      "description": "xxx",
      "displayName": "xxx",
      "enabled": true
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}
Returns Examples
{
  "environmentClasses": [
    {
      "id": "id",
      "runnerId": "runnerId",
      "configuration": [
        {
          "key": "key",
          "value": "value"
        }
      ],
      "description": "xxx",
      "displayName": "xxx",
      "enabled": true
    }
  ],
  "pagination": {
    "nextToken": "nextToken"
  }
}