> ## 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.

# Validate Integration

> Validates an integration's configuration and connectivity.

`Unary` · [`Integrations`](/docs/api-reference/generated/integration/overview)

Validates an integration's configuration and connectivity.

Runs a set of checks (e.g. app token validity) and returns results for each.
All checks are always returned; failing checks include a message and an optional action\_hint.

## Endpoint

```text theme={null}
POST /api/gitpod.v1.IntegrationService/ValidateIntegration
```

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

## Request example

<CodeGroup>
  ```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.IntegrationService/ValidateIntegration" \
    --header "Authorization: Bearer $ONA_API_KEY" \
    --header "Content-Type: application/json" \
    --data '{
    "integrationId": "<integration-id>"
  }'
  ```

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

  ona = create_client_from_env()
  request = integration_pb2.ValidateIntegrationRequest(
      integration_id="<integration-id>",
  )
  response = ona.services.integration.validate_integration(request)
  print(response)
  ```

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

  async function main() {
    const ona = createClientFromEnv();
    const request = create(ValidateIntegrationRequestSchema, {
      integrationId: "<integration-id>",
    });
    const response = await ona.services.integration.validateIntegration(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.ValidateIntegrationRequest{
  		IntegrationId: "<integration-id>",
  	})
  	response, err := ona.Services.Integration.ValidateIntegration(context.Background(), request)
  	if err != nil {
  		log.Fatal(err)
  	}
  	fmt.Println(response.Msg)
  }
  ```

  ```json Request body theme={null}
  {
    "integrationId": "<integration-id>"
  }
  ```
</CodeGroup>

## Request

`gitpod.v1.ValidateIntegrationRequest`

| Field           | Type   | Required | Description                      |
| --------------- | ------ | -------- | -------------------------------- |
| `integrationId` | string | No       | Constraints: `string.min_len=1`. |

## Response

`gitpod.v1.ValidateIntegrationResponse`

| Field    | Type                                                         | Required | Description                                                                                              |
| -------- | ------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------- |
| `valid`  | boolean                                                      | No       | valid is true when all checks pass (convenience field).                                                  |
| `checks` | array of [ValidationCheck](#type-gitpod-v1-validation-check) | No       | checks contains the result of every check performed. Passing checks have empty message and action\_hint. |

## Related types

<a id="type-gitpod-v1-validation-check" />

<Accordion title="ValidationCheck">
  `gitpod.v1.ValidationCheck`

  | Field              | Type                                            | Required | Description                                                                                                                                                   |
  | ------------------ | ----------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | `check`            | [Check](#enum-gitpod-v1-validation-check-check) | No       | Which check this result is for.                                                                                                                               |
  | `message`          | string                                          | No       | Human-readable description of the problem. Empty when the check passes.                                                                                       |
  | `actionHint`       | string                                          | No       | Machine-readable hint the frontend uses to resolve the issue (e.g. "app\_installation\_oauth"). Empty when the check passes or no automated fix is available. |
  | `documentationUrl` | string                                          | No       | URL to documentation explaining this check failure and resolution steps. Empty when the check passes or no docs exist for this check.                         |
</Accordion>

<a id="enum-gitpod-v1-validation-check-check" />

<Accordion title="Check">
  | Value                    | Number | Description |
  | ------------------------ | -----: | ----------- |
  | `CHECK_UNSPECIFIED`      |      0 |             |
  | `CHECK_APP_TOKEN`        |      1 |             |
  | `CHECK_APP_INSTALLATION` |      2 |             |
</Accordion>
