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

# Retrieve a connection

> Use this endpoint to retrieve the details of a specific connection by its unique identifier.



## OpenAPI

````yaml /en/openapi/v3-current/connections.yaml get /v1/management/connections/{id}
openapi: 3.1.0
info:
  title: Database Connections
  description: >-
    The database connections API provides endpoints for managing the database
    connections used by Reporter. It allows you to create, list, update, delete,
    and test database connections, as well as validate schemas against
    configured data sources.
  version: 1.0.0
servers:
  - url: https://reporter.sandbox.lerian.net
security: []
tags:
  - name: Database Connections
    description: Endpoints for managing database connections used by Reporter.
paths:
  /v1/management/connections/{id}:
    get:
      tags:
        - Database Connections
      summary: Retrieve a connection
      description: >-
        Use this endpoint to retrieve the details of a specific connection by
        its unique identifier.
      parameters:
        - $ref: '#/components/parameters/ConnectionId'
        - $ref: '#/components/parameters/Authorization'
      responses:
        '200':
          description: The details of the requested connection.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionResponse'
              example:
                id: 019996b2-b6b1-7401-8c0b-f1ad397080eb
                configName: Midaz - Banco Transacional
                productName: my-product
                type: POSTGRESQL
                host: postgres.cliente.com.br
                port: 5432
                databaseName: transaction
                userName: user_midaz_read
                schema: public
                ssl:
                  mode: require
                metadata:
                  environment: production
                createdAt: '2024-01-15T10:30:00Z'
                updatedAt: '2024-01-15T10:30:00Z'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Error0404:
                  $ref: '#/components/examples/Error0404'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Error1001:
                  $ref: '#/components/examples/Error1001'
      security: []
components:
  parameters:
    ConnectionId:
      name: id
      in: path
      description: Unique identifier of the connection (UUID format).
      required: true
      schema:
        type: string
        format: uuid
        example: 019996b8-f3d1-7d2b-a192-6e91464d82fc
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token in the `Bearer <token>` format.


        **Important:** This header is required if your environment has Access
        Manager enabled. For more information, refer to the [Access
        Manager](/en/platform/access-manager/access-manager) documentation.
      required: false
      schema:
        type: string
        example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
  schemas:
    ConnectionResponse:
      type: object
      description: Response object containing connection details.
      required:
        - id
        - configName
        - type
        - host
        - port
        - databaseName
        - userName
        - createdAt
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the connection (UUID format).
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        productName:
          type: string
          description: >-
            The product name associated with this connection. May be empty if
            the connection has not been assigned to a product.
          example: my-product
        configName:
          type: string
          description: Unique identifier name for this connection configuration.
          example: production-db
        type:
          type: string
          description: >-
            Database engine type. Supported values: `ORACLE`, `SQL_SERVER`,
            `POSTGRESQL`, `MONGODB`, `MYSQL`. Note that the data source `type`
            field in the [List Data
            Sources](/en/reference/reporter/list-data-sources) endpoint returns
            lowercase identifiers (`postgresql`, `mongodb`).
          enum:
            - ORACLE
            - SQL_SERVER
            - POSTGRESQL
            - MONGODB
            - MYSQL
          example: POSTGRESQL
        host:
          type: string
          description: Hostname or IP address of the database server.
          example: db.example.com
        port:
          type: integer
          description: Network port number for the database connection.
          example: 5432
        databaseName:
          type: string
          description: Name of the database to connect to on the target server.
          example: mydatabase
        userName:
          type: string
          description: Username credential for database authentication.
          example: dbuser
        schema:
          type: string
          description: Database schema name, when set.
          example: public
        ssl:
          $ref: '#/components/schemas/SSL'
        metadata:
          $ref: '#/components/schemas/Metadata'
        createdAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp indicating when the connection was created.
          example: '2024-01-15T10:30:00Z'
        updatedAt:
          type: string
          format: date-time
          description: ISO 8601 timestamp indicating when the connection was last updated.
          example: '2024-01-15T10:30:00Z'
    Error:
      type: object
      description: >-
        Response message error. Error codes use the `FET` prefix to identify
        issues related to the database connections API.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error (prefixed with `FET`).
          example: FET-0001
        title:
          type: string
          description: A brief summary of the issue.
          example: Missing required fields
        message:
          type: string
          description: Detailed guidance for resolving the error.
          example: >-
            One or more required fields are missing. Please ensure all required
            fields like configName, host, port, userName, and password are
            included.
    SSL:
      type: object
      description: SSL configuration object containing certificate and security options.
      required:
        - mode
      properties:
        mode:
          type: string
          description: >-
            SSL connection mode. Supported values: - `disable`: No SSL
            connection - `require`: SSL required but no certificate verification
            - `verify-ca`: SSL with CA certificate verification - `verify-full`:
            SSL with full certificate verification
          enum:
            - disable
            - require
            - verify-ca
            - verify-full
          example: require
        ca:
          type: string
          description: >-
            Certificate Authority (CA) certificate for server verification (PEM
            format).
          example: |
            -----BEGIN CERTIFICATE-----
            MIIDdzCCAl+gAwIBAgIEbV...
            -----END CERTIFICATE-----
        cert:
          type: string
          description: Client certificate for SSL mutual authentication (PEM format).
        key:
          type: string
          description: Private key for the client certificate (PEM format).
    Metadata:
      type: object
      additionalProperties:
        type: string
        maxLength: 2000
      description: >-
        An object containing key-value pairs for storing additional
        connection-related information. Keys (max 100 characters) and values
        (max 2000 characters) must be strings. Nested objects are not allowed.
      example:
        environment: production
        team: data-engineering
  examples:
    Error0404:
      summary: Invalid Path Parameter
      value:
        code: FET-0404
        title: Invalid Path Parameter
        message: >-
          Path parameters is in an incorrect format. Please check the following
          parameter 'id' and ensure they meet the required format before trying
          again.
    Error1001:
      summary: Entity Not Found
      value:
        code: FET-1001
        title: Entity Not Found
        message: >-
          It was not possible to find the connection entity during the requested
          flow. Please review the data provided in the request.

````