## 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. ```yaml {} ``` buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE ### Query Parameters - `token: optional string` - `pageSize: optional number` ### Body Parameters - `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. - `"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. - `"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"` - `pagination: optional object { token, pageSize }` pagination contains the pagination options for listing environment classes - `token: optional string` Token for the next set of results that was returned as next_token of a PaginationResponse - `pageSize: optional number` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `environmentClasses: optional array of EnvironmentClass` - `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` 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 - `displayName: optional string` display_name is the human readable name of the environment class - `enabled: optional boolean` enabled indicates whether the environment class can be used to create new environments. - `pagination: optional object { nextToken }` pagination contains the pagination options for listing environment classes - `nextToken: optional string` Token passed for retrieving the next set of results. Empty if there are no more results ### Example ```http curl https://app.gitpod.io/api/gitpod.v1.EnvironmentService/ListEnvironmentClasses \ -H 'Content-Type: application/json' \ -H "Authorization: Bearer $GITPOD_API_KEY" \ -d '{}' ``` #### Response ```json { "environmentClasses": [ { "id": "id", "runnerId": "runnerId", "configuration": [ { "key": "key", "value": "value" } ], "description": "xxx", "displayName": "xxx", "enabled": true } ], "pagination": { "nextToken": "nextToken" } } ```