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

# Update a connection

> Applies a partial update to an existing database connection.



## OpenAPI

````yaml en/openapi/v3-current/connections.yaml patch /v1/management/connections/{id}
openapi: 3.1.0
info:
  contact:
    email: contact@lerian.studio
    name: Lerian
    url: https://github.com/LerianStudio/fetcher/discussions
  description: API documentation for the Fetcher Manager component
  license:
    identifier: Elastic-2.0
    name: Elastic License 2.0 (Source Available)
  title: Fetcher Manager API
  version: 1.0.0
servers: []
security:
  - BearerAuth: []
tags:
  - description: Database connection lifecycle and schema operations.
    name: Connections
  - description: Legacy connection assignment and migration operations.
    name: Migration
  - description: Data extraction job creation and status operations.
    name: Fetcher
paths:
  /v1/management/connections/{id}:
    patch:
      tags:
        - Connections
      summary: Update a connection
      description: Applies a partial update to an existing database connection.
      operationId: update-connection
      parameters:
        - description: Connection identifier.
          in: path
          name: id
          required: true
          schema:
            description: Connection identifier.
            examples:
              - 2f1f35f4-4f50-44f3-a8ab-2772d395f0c2
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConnectionUpdateInput'
        description: Connection fields to update; omitted fields remain unchanged.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionResponse'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Bad Request
        '401':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unauthorized
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Not Found
        '409':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Conflict
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Detail'
          description: Internal Server Error
components:
  schemas:
    ConnectionUpdateInput:
      additionalProperties: false
      properties:
        configName:
          description: New configuration name for the connection.
          examples:
            - production-db
          type: string
        databaseName:
          description: New database name to connect to.
          examples:
            - mydatabase
          type: string
        host:
          description: New database server hostname or IP address.
          examples:
            - db.example.com
          type: string
        metadata:
          additionalProperties: {}
          description: Application-defined metadata that replaces the current metadata.
          examples:
            - environment: production
              region: us-east-1
          type: object
        password:
          description: New database authentication password.
          examples:
            - secretpassword
          type: string
        port:
          description: New database server TCP port.
          examples:
            - 5432
          format: int64
          type: integer
        schema:
          description: New default database schema.
          examples:
            - public
          type: string
        ssl:
          $ref: '#/components/schemas/SSLUpdateInput'
          description: SSL/TLS settings to update.
          examples:
            - mode: verify-full
        type:
          description: New database engine type.
          examples:
            - POSTGRESQL
          type: string
        userName:
          description: New database authentication username.
          examples:
            - dbuser
          type: string
      type: object
    ConnectionResponse:
      additionalProperties: false
      properties:
        configName:
          description: Configuration name used to reference the connection.
          examples:
            - production-db
          type: string
        createdAt:
          description: Timestamp when the connection was created.
          examples:
            - '2026-01-15T10:30:00Z'
          format: date-time
          type: string
        databaseName:
          description: Connected database name.
          examples:
            - mydatabase
          type: string
        host:
          description: Database server hostname or IP address.
          examples:
            - db.example.com
          type: string
        id:
          description: Unique connection identifier.
          examples:
            - 018f47a6-3e5f-7b9a-8c1d-2e3f4a5b6c7d
          type: string
        metadata:
          additionalProperties: {}
          description: Application-defined connection metadata.
          examples:
            - environment: production
              region: us-east-1
          type: object
        port:
          description: Database server TCP port.
          examples:
            - 5432
          format: int64
          type: integer
        productName:
          description: Product that owns the connection.
          examples:
            - midaz
          type: string
        schema:
          description: Default database schema, when configured.
          examples:
            - public
          type: string
        ssl:
          $ref: '#/components/schemas/SSLResponse'
          description: Configured SSL/TLS settings with secrets omitted.
          examples:
            - mode: require
        type:
          description: Database engine type.
          examples:
            - POSTGRESQL
          type: string
        updatedAt:
          description: Timestamp when the connection was last updated.
          examples:
            - '2026-01-16T14:45:00Z'
          format: date-time
          type: string
        userName:
          description: Database authentication username.
          examples:
            - dbuser
          type: string
      required:
        - id
        - configName
        - type
        - host
        - port
        - databaseName
        - userName
        - createdAt
        - updatedAt
      type: object
    Detail:
      additionalProperties: false
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          examples:
            - ERR-0001
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    SSLUpdateInput:
      additionalProperties: false
      properties:
        ca:
          description: New PEM-encoded certificate authority used to verify the server.
          examples:
            - |-
              -----BEGIN CERTIFICATE-----
              ...
          type: string
        cert:
          description: New PEM-encoded client certificate.
          examples:
            - |-
              -----BEGIN CERTIFICATE-----
              ...
          type: string
        key:
          description: New PEM-encoded private key for the client certificate.
          examples:
            - |-
              -----BEGIN PRIVATE KEY-----
              ...
          type: string
        mode:
          description: New driver-specific SSL/TLS mode.
          examples:
            - require
          type: string
      type: object
    SSLResponse:
      additionalProperties: false
      properties:
        mode:
          description: Configured driver-specific SSL/TLS mode.
          examples:
            - require
          type: string
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````