Ardent v1-branching API

The v1-branching API from Ardent — 2 operation(s) for v1-branching.

OpenAPI Specification

ardent-v1-branching-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  description: Public Ardent API. Generated by scripts/export_public_openapi.py — do not edit by hand.
  title: Ardent v1-api-keys v1-branching API
  version: v1
servers:
- url: https://api.tryardent.com
tags:
- name: v1-branching
paths:
  /v1/branch/create:
    post:
      operationId: create_service_branch_v1_branch_create_post
      parameters:
      - description: 'Makes retries safe: re-sending the same connector, service type, and name resumes the original request instead of creating a duplicate.'
        in: header
        name: X-Idempotency-Key
        required: false
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              description: 'Body of POST /v1/branch/create.


                Spec-only today: the handler parses the raw body by hand so a missing

                field keeps returning the documented 400, not Pydantic''s 422. Keep the

                fields in sync with the hand parsing below.'
              properties:
                connector_id:
                  description: Connector to branch from.
                  title: Connector Id
                  type: string
                name:
                  description: Branch name, unique per connector.
                  title: Name
                  type: string
                service_type:
                  description: Service to branch; `postgres`, not the connector type `postgresql`.
                  title: Service Type
                  type: string
              required:
              - connector_id
              - service_type
              - name
              title: BranchCreateRequest
              type: object
        required: true
      responses:
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationHandle'
          description: 'Create accepted. Poll `GET /v1/operations/{operation_id}` for the branch details. Idempotent replays carry an `X-Idempotency-Replay: true` response header.'
        '400':
          description: A required field is missing, or the branch name or idempotency key is invalid.
        '409':
          description: This create is already in flight, or the idempotency key was reused for a different request.
        '422':
          description: The connector's engine isn't ready to branch.
        '503':
          description: Ardent could not start the work — safe to retry.
      security:
      - bearerAuth: []
      summary: Create Service Branch
      tags:
      - v1-branching
  /v1/branches/{connector_id}:
    get:
      operationId: get_branches_v1_branches__connector_id__get
      parameters:
      - in: path
        name: connector_id
        required: true
        schema:
          title: Connector Id
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/BranchRow'
                title: Response 200 Get Branches V1 Branches  Connector Id  Get
                type: array
          description: Up to 100 branch rows for the connector. Rows may carry additional columns beyond the documented core.
        '404':
          description: Connector not found (or not visible to the caller).
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
      - bearerAuth: []
      summary: Get Branches
      tags:
      - v1-branching
components:
  schemas:
    BranchRow:
      additionalProperties: true
      properties:
        branch_url:
          anyOf:
          - type: string
          - type: 'null'
          description: Direct connection URL for the branch; sensitive — use exactly as returned.
          title: Branch Url
        connector_id:
          description: Connector this branch was created from.
          title: Connector Id
          type: string
        created_at:
          description: When the branch was created.
          title: Created At
          type: string
        id:
          description: Branch ID.
          title: Id
          type: string
        last_branch_activity:
          anyOf:
          - type: string
          - type: 'null'
          description: Most recent activity on the branch. Null when none has been recorded.
          title: Last Branch Activity
        masked_ready_at:
          anyOf:
          - type: string
          - type: 'null'
          description: When masked data became ready. Null until then.
          title: Masked Ready At
        name:
          description: Branch name, as given at create.
          title: Name
          type: string
        pooled_branch_prisma_url:
          anyOf:
          - type: string
          - type: 'null'
          description: Prisma-formatted pooled URL; null when the provider has no pooled endpoint.
          title: Pooled Branch Prisma Url
        pooled_branch_url:
          anyOf:
          - type: string
          - type: 'null'
          description: Pooled connection URL. Null when the provider has no pooled endpoint.
          title: Pooled Branch Url
        read_ready_at:
          anyOf:
          - type: string
          - type: 'null'
          description: When the branch became ready for reads. Null until then.
          title: Read Ready At
        service_type:
          description: Branched service. `postgres` for Postgres branches.
          title: Service Type
          type: string
        status:
          description: Current branch status.
          title: Status
          type: string
        write_ready_at:
          anyOf:
          - type: string
          - type: 'null'
          description: When the branch became ready for writes. Null until then.
          title: Write Ready At
      required:
      - id
      - name
      - connector_id
      - service_type
      - status
      - created_at
      title: BranchRow
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
      - loc
      - msg
      - type
      title: ValidationError
      type: object
    OperationStatus:
      enum:
      - pending
      - running
      - completed
      - failed
      title: OperationStatus
      type: string
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    OperationHandle:
      properties:
        operation_id:
          description: Operation to poll at `GET /v1/operations/{operation_id}`.
          title: Operation Id
          type: string
        resource_id:
          anyOf:
          - type: string
          - type: 'null'
          description: ID of the resource being created or acted on (the branch ID for branch create).
          title: Resource Id
        status:
          $ref: '#/components/schemas/OperationStatus'
          description: Status at acceptance time.
        type:
          $ref: '#/components/schemas/OperationType'
          description: The kind of work this operation tracks, for example `branch_create`.
      required:
      - operation_id
      - status
      - type
      - resource_id
      title: OperationHandle
      type: object
    OperationType:
      enum:
      - connector_engine_setup
      - connector_reset
      - connector_deep_reset
      - connector_discovery
      - connector_delete
      - connector_secret_purge
      - connector_rollout
      - connector_replication_rollback
      - connector_debezium_cutover
      - connector_debezium_shadow_cleanup
      - environment_deploy
      - environment_destroy
      - branch_create
      - branch_delete
      title: OperationType
      type: string
  securitySchemes:
    bearerAuth:
      description: Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session token.
      scheme: bearer
      type: http