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

# Test a BigQuery connection configuration



## OpenAPI

````yaml https://api.select.dev/v2/openapi.json post /bigquery-connections/actions/test
openapi: 3.1.0
info:
  title: SELECT API (v2)
  version: 0.1.0
servers:
  - url: https://api.select.dev/v2
    description: SELECT API v2
security: []
paths:
  /bigquery-connections/actions/test:
    post:
      tags:
        - bigquery-connections
      summary: Test a BigQuery connection configuration
      operationId: >-
        test_bigquery_connection_config_route_bigquery_connections_actions_test_post
      parameters:
        - name: x-tenant-id
          in: header
          required: true
          schema:
            type: string
            description: The organization ID the request is scoped to.
            title: X-Tenant-Id
          description: The organization ID the request is scoped to.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BigQueryConnectionCreate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BigQueryConnectionValidationReport'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '405':
          $ref: '#/components/responses/MethodNotAllowed'
        '408':
          $ref: '#/components/responses/RequestTimeout'
        '409':
          $ref: '#/components/responses/Conflict'
        '422':
          $ref: '#/components/responses/ValidationFailed'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/InternalError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
      security:
        - HTTPBearer: []
components:
  schemas:
    BigQueryConnectionCreate:
      properties:
        name:
          type: string
          title: Name
          description: Display name for the connection, as shown throughout SELECT.
        gcp_project_id:
          type: string
          pattern: ^[a-z][a-z0-9-]{4,28}[a-z0-9]$
          title: Gcp Project Id
          description: >-
            The GCP project to read BigQuery usage and spend from. 6-30
            characters, starting with a lowercase letter, made up of lowercase
            letters, digits and hyphens, and not ending in a hyphen.
        bigquery_dataset_id:
          anyOf:
            - type: string
              pattern: ^[a-zA-Z0-9_]{1,1024}$
            - type: 'null'
          title: Bigquery Dataset Id
          description: >-
            The BigQuery dataset holding the project's billing and pricing
            exports. Letters, digits and underscores only. Required when
            `is_doit` is false, and must be omitted when it is true.
        billing_account_id:
          anyOf:
            - type: string
              pattern: ^[0-9A-Fa-f]{6}-[0-9A-Fa-f]{6}-[0-9A-Fa-f]{6}$
            - type: 'null'
          title: Billing Account Id
          description: >-
            The Cloud Billing account the exports belong to, in
            `XXXXXX-XXXXXX-XXXXXX` form, case-insensitive. Required when
            `is_doit` is false, and must be omitted when it is true.
        service_account:
          type: string
          pattern: >-
            ^[a-z][a-z0-9-]{4,28}[a-z0-9]@[a-z][a-z0-9-]{4,28}[a-z0-9]\.iam\.gserviceaccount\.com$
          title: Service Account
          description: >-
            The GCP service account SELECT impersonates to reach the project, in
            `name@project-id.iam.gserviceaccount.com` form.
        is_doit:
          type: boolean
          title: Is Doit
          description: >-
            Set this when the project's GCP billing account is managed by DoiT
            as a resale customer, so SELECT reads its spend from DoiT's billing
            data. SELECT confirms access before spend can be read, so the
            connection is created with a `doit_billing_status` of `pending`;
            re-read it to see when it becomes `active`. Requires a user
            credential rather than an API key, and cannot be changed once the
            connection is added.
          default: false
        sync_enabled:
          type: boolean
          title: Sync Enabled
          description: Whether SELECT starts syncing data for this connection.
          default: true
        query_sanitization_enabled:
          type: boolean
          title: Query Sanitization Enabled
          description: Whether query text is sanitized before SELECT stores it.
          default: false
      type: object
      required:
        - name
        - gcp_project_id
        - service_account
      title: BigQueryConnectionCreate
      description: A BigQuery connection to add.
    BigQueryConnectionValidationReport:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether every applicable check passed.
        checks:
          items:
            $ref: '#/components/schemas/BigQueryConnectionValidationCheck'
          type: array
          title: Checks
          description: >-
            The checks that ran, in the order they ran. Read top-down to find
            where setup stopped working.
      type: object
      required:
        - success
        - checks
      title: BigQueryConnectionValidationReport
      description: The result of validating a connection's configuration against BigQuery.
    BigQueryConnectionValidationCheck:
      properties:
        id:
          type: string
          enum:
            - connectivity
            - project_access
            - regions
            - jobs
            - billing_export
            - pricing_export
            - bucket_write
            - organization
          title: Id
          description: Identifies which check this is.
        label:
          type: string
          title: Label
          description: Short human-readable name for the check.
        status:
          type: string
          enum:
            - passed
            - failed
            - skipped
          title: Status
          description: >-
            `passed`, `failed`, or `skipped`. A check is skipped when it does
            not apply, or when an earlier check failed and stopped the run.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: >-
            What to change when the check failed, or why it was skipped. Null
            when the check passed with nothing worth noting.
        docs_link:
          anyOf:
            - type: string
            - type: 'null'
          title: Docs Link
          description: >-
            Link to the setup documentation covering what the check found. Null
            when no page addresses it specifically.
      type: object
      required:
        - id
        - label
        - status
      title: BigQueryConnectionValidationCheck
      description: One check SELECT runs against a connection's configuration.
    ProblemDetail:
      additionalProperties: true
      description: >-
        RFC 9457-style error payload, served as ``application/problem+json``.


        ``code`` is the stable, machine-readable identifier — consumers branch
        on it,

        never on ``title``. ``type`` stays ``about:blank``: we keep no per-error

        documentation pages. There is no ``instance``/request-id member (we
        don't run

        access logs). See the flat error-code catalogue in §4 of the standards
        doc.
      properties:
        type:
          default: about:blank
          title: Type
          type: string
        title:
          type: string
          title: Title
        status:
          title: Status
          type: integer
        detail:
          title: Detail
          type: string
        code:
          title: Code
          type: string
        retryable:
          title: Retryable
          type: boolean
        details:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          default: null
          title: Details
      required:
        - title
        - status
        - detail
        - code
        - retryable
      title: ProblemDetail
      type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        WWW-Authenticate:
          description: Authentication challenge for the requested resource.
          required: true
          schema:
            type: string
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    NotFound:
      description: Not found
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    MethodNotAllowed:
      description: Method not allowed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Allow:
          description: HTTP methods supported by the requested resource.
          required: true
          schema:
            type: string
    RequestTimeout:
      description: Request Timeout
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    Conflict:
      description: Conflict
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ValidationFailed:
      description: Validation failed
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    RateLimited:
      description: Rate limited
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
    InternalError:
      description: Internal error
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
    ServiceUnavailable:
      description: Service unavailable
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ProblemDetail'
      headers:
        Retry-After:
          description: Number of seconds to wait before retrying the request.
          required: true
          schema:
            type: integer
            minimum: 0
  securitySchemes:
    HTTPBearer:
      type: http
      description: Organization API key (sl_…).
      scheme: bearer

````