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

# Test a connection

> Tests a persisted connection against a specific environment. The platform resolves the connection credentials (merging project-level with any environment override) and dispatches the test to the agent. Returns SUCCESS if the connection is valid, or FAILURE with a message describing the problem.



## OpenAPI

````yaml /openapi/public-api-endpoint-reference.yaml post /v1/projects/{projectId}/connections/test
openapi: 3.1.0
info:
  title: Maia Public REST API
  version: '1.0'
servers:
  - description: EU1
    url: https://eu1.api.matillion.com/dpc
  - description: US1
    url: https://us1.api.matillion.com/dpc
security:
  - bearerAuth: []
tags:
  - description: Manage Schedules
    name: Schedules
  - description: Manage Connections
    name: Connections
  - description: Operations for managing Project Variables
    name: Project Variables
  - description: Manage Pipelines
    name: Pipelines
  - description: Review pipelines against quality rules
    name: Pipeline Quality Review
  - description: >-
      Describe how to configure a connection for a given auth provider, auth
      type and platform connection type.
    name: Connection Schema
  - description: Execute tests within a project
    name: Test Execution
  - description: Manage your AI agent tasks
    name: AI Agent Tasks
  - description: SCIM endpoints for user/group permission management
    name: Directory Integration
  - description: Publish shared pipeline artifacts
    name: Shared Pipeline Artifacts
  - description: Manage Repositories
    name: Repositories
  - description: Report on Credit Consumption
    name: Consumption
  - description: >-
      Start and track the migration of a Git repository into a project's working
      tree.
    name: Repository Migration
  - description: Manage Artifacts
    name: Artifacts
  - description: Operations for data lineage and governance
    name: Data Lineage
  - description: Manage Streaming Pipelines
    name: Streaming Pipelines
  - description: Execute a pipeline
    name: Pipeline Execution
  - description: ''
    name: Environments
  - description: ''
    name: Projects
  - description: Manage Agents
    name: Agents
  - description: Operations for managing Environment-level Overrides of Project Variables
    name: Project Variable Environment Overrides
  - description: Query audit events
    name: Audit Events
  - description: Connector Profiles
    name: Connectors
paths:
  /v1/projects/{projectId}/connections/test:
    post:
      tags:
        - Connections
      summary: Test a connection
      description: >-
        Tests a persisted connection against a specific environment. The
        platform resolves the connection credentials (merging project-level with
        any environment override) and dispatches the test to the agent. Returns
        SUCCESS if the connection is valid, or FAILURE with a message describing
        the problem.
      operationId: testConnection
      parameters:
        - description: The project ID
          in: path
          name: projectId
          required: true
          schema:
            type: string
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
        - description: The name of the environment to test in
          in: query
          name: environmentName
          required: true
          schema:
            type: string
            minLength: 1
        - description: The name of the connection to test
          in: query
          name: connectionName
          required: true
          schema:
            type: string
            minLength: 1
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionTestResponse'
          description: Connection test completed
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Invalid request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Connection or environment not found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Connection has no credentials configured
        '504':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Connection test timed out
components:
  schemas:
    ConnectionTestResponse:
      type: object
      properties:
        message:
          type:
            - string
            - 'null'
          description: A message describing the failure reason, absent on success.
          example: 'Authentication failed: invalid credentials'
        status:
          type: string
          description: The result of the connection test.
          example: SUCCESS
    ProblemDetail:
      type: object
      properties:
        detail:
          type: string
        instance:
          type: string
        status:
          type: integer
          format: int32
        title:
          type: string
        type:
          type: string
          format: uri
        violations:
          type: array
          items:
            type: string
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      description: a valid bearer token
      scheme: bearer
      type: http

````