> ## Documentation Index
> Fetch the complete documentation index at: https://ona.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Environment Class

> Gets details about a specific environment class.

`Unary` · [`Runner Configurations`](https://ona.com/docs/api-reference/generated/runner-configuration/overview)

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.

  ```yaml theme={null}
  environmentClassId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
  ```

## Endpoint

```text theme={null}
POST /api/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass
```

Send a Bearer token as described in [Authentication](https://ona.com/docs/api-reference.md#authenticate-requests). If your organization uses a custom management-plane domain, replace `https://app.ona.com` with that domain.

## Request example

```bash cURL theme={null}
export ONA_HOST=https://app.ona.com
export ONA_API_KEY=<your-token>

curl --request POST \
  --url "$ONA_HOST/api/gitpod.v1.RunnerConfigurationService/GetEnvironmentClass" \
  --header "Authorization: Bearer $ONA_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
  "environmentClassId": "<environment-class-id>"
}'
```

```python Python theme={null}
import gitpod.v1.runner_configuration_pb2 as runner_configuration_pb2
from ona_sdk import create_client_from_env

ona = create_client_from_env()
request = runner_configuration_pb2.GetEnvironmentClassRequest(
    environment_class_id="<environment-class-id>",
)
response = ona.services.runner_configuration.get_environment_class(request)
print(response)
```

```typescript TypeScript theme={null}
import { create } from "@bufbuild/protobuf";
import { createClientFromEnv } from "@gitpod/sdk";
import { GetEnvironmentClassRequestSchema } from "@gitpod/sdk/gitpod/v1/runner_configuration_pb";

async function main() {
  const ona = createClientFromEnv();
  const request = create(GetEnvironmentClassRequestSchema, {
    environmentClassId: "<environment-class-id>",
  });
  const response = await ona.services.runnerConfiguration.getEnvironmentClass(request);
  console.log(response);
}

main().catch(console.error);
```

```go Go theme={null}
package main

import (
	"context"
	"fmt"
	"log"

	"connectrpc.com/connect"
	"github.com/gitpod-io/gitpod-sdk-go/sdk"
	gitpodpb "github.com/gitpod-io/gitpod-sdk-go/v1"
)

func main() {
	ona, err := sdk.NewFromEnv()
	if err != nil {
		log.Fatal(err)
	}

	request := connect.NewRequest(&gitpodpb.GetEnvironmentClassRequest{
		EnvironmentClassId: "<environment-class-id>",
	})
	response, err := ona.Services.RunnerConfiguration.GetEnvironmentClass(context.Background(), request)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(response.Msg)
}
```

```json Request body theme={null}
{
  "environmentClassId": "<environment-class-id>"
}
```

## Request

`gitpod.v1.GetEnvironmentClassRequest`

| Field | Type | Required | Description |
| - | - | - | - |
| `environmentClassId` | string | No | Constraints: `string.uuid=true`. |

## Response

`gitpod.v1.GetEnvironmentClassResponse`

| Field | Type | Required | Description |
| - | - | - | - |
| `environmentClass` | [EnvironmentClass](#type-gitpod-v1-environment-class) | No | |

## Related types

> [accordion] EnvironmentClass
>
> `gitpod.v1.EnvironmentClass`
>
> | Field | Type | Required | Description |
> | - | - | - | - |
> | `id` | string | No | id is the unique identifier of the environment class |
> | `displayName` | string | No | display\_name is the human readable name of the environment class Constraints: `string.max_len=127, string.min_len=3`. |
> | `description` | string | No | description is a human readable description of the environment class Constraints: `string.max_len=200, string.min_len=3`. |
> | `configuration` | array of [FieldValue](#type-gitpod-v1-field-value) | No | configuration describes the configuration of the environment class |
> | `runnerId` | string | No | runner\_id is the unique identifier of the runner the environment class belongs to |
> | `enabled` | boolean | No | enabled indicates whether the environment class can be used to create new environments. |

> [accordion] FieldValue
>
> `gitpod.v1.FieldValue`
>
> | Field | Type | Required | Description |
> | - | - | - | - |
> | `key` | string | No | |
> | `value` | string | No | |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.