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

# List branches

> List a connector's branches with their connection URLs

Returns a JSON array of branch rows. Each row includes the branch's metadata (`id`, `name`, `status`, `created_at`, and more) plus `branch_url` and the pooled URL fields when available.

Use this to populate internal dashboards or cleanup tools. For shell scripts that only need a URL, the CLI is simpler:

```bash theme={null}
DATABASE_URL="$(ardent branch create pr-123 --print-url)"
```


## OpenAPI

````yaml openapi.public.json GET /v1/branches/{connector_id}
openapi: 3.1.0
info:
  description: >-
    Public Ardent API. Generated by scripts/export_public_openapi.py — do not
    edit by hand.
  title: Ardent API
  version: v1
servers:
  - url: https://api.tryardent.com
security: []
paths:
  /v1/branches/{connector_id}:
    get:
      tags:
        - v1-branching
      summary: Get Branches
      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: []
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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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
  securitySchemes:
    bearerAuth:
      description: >-
        Ardent API key (sk-ard_live_… / sk-ard_test_…) or a dashboard session
        token.
      scheme: bearer
      type: http

````