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

# Get Postgres Cluster

> Get details of a specific Managed Postgres cluster.



## OpenAPI

````yaml /machines-api/openapi.json get /v1/postgres/{postgres_cluster_id}
openapi: 3.0.1
info:
  title: Machines API
  description: >-
    This site hosts documentation generated from the Fly.io Machines API OpenAPI
    specification. Visit our complete [Machines API
    docs](https://fly.io/docs/machines/api/) for how to get started, more
    information about each endpoint, parameter descriptions, and examples.
  contact: {}
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: https://api.machines.dev
security: []
tags:
  - name: Apps
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/apps-resource/) for details about
      using the Apps resource.
  - name: Machines
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/machines-resource/) for details
      about using the Machines resource.
  - name: TLS Certificates
    description: >
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/certificates-resource/) for details
      about using the TLS Certificates resource.
  - name: Volumes
    description: >-
      This site hosts documentation generated from the Fly.io Machines API
      OpenAPI specification. Visit our complete [Machines API
      docs](https://fly.io/docs/machines/api/volumes-resource/) for details
      about using the Volumes resource.
  - name: Postgres Clusters
    description: >-
      Create and manage Postgres clusters, including databases, users,
      extensions, backups, and app attachments.
externalDocs:
  url: https://fly.io/docs/machines/working-with-machines/
paths:
  /v1/postgres/{postgres_cluster_id}:
    get:
      tags:
        - Postgres Clusters
      summary: Get Postgres Cluster
      description: Get details of a specific Managed Postgres cluster.
      operationId: Postgres_show
      parameters:
        - name: postgres_cluster_id
          in: path
          description: Managed Postgres Cluster ID
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/showPostgresClusterResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostgresErrorResponse'
        '404':
          description: Cluster not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PostgresErrorResponse'
      security:
        - FlyBearerAuth: []
components:
  schemas:
    showPostgresClusterResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PostgresCluster'
    PostgresErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Human-readable error message.
    PostgresCluster:
      type: object
      properties:
        attached_apps:
          type: array
          description: Apps attached to the cluster.
          items:
            $ref: '#/components/schemas/PostgresAttachedApp'
        cpu_kind:
          type: string
          description: CPU class.
          example: shared
          enum:
            - shared
            - performance
        cpus:
          type: integer
          description: vCPUs per node.
          example: 2
        created_at:
          type: string
          description: RFC 3339 creation timestamp.
          format: date-time
        disk_size_gb:
          type: integer
          description: Disk size in gigabytes, for one replica.
          example: 10
        endpoints:
          type: object
          description: Connection endpoints. Populated once the cluster is ready.
          allOf:
            - $ref: '#/components/schemas/PostgresClusterEndpoints'
        id:
          type: string
          description: Cluster ID.
        memory_mb:
          type: integer
          description: Memory per node in megabytes.
          example: 1024
        name:
          type: string
          description: Cluster name.
        organization:
          $ref: '#/components/schemas/OrganizationRef'
        pg_major_version:
          type: string
          description: Postgres major version.
          example: '17'
          enum:
            - '16'
            - '17'
        plan:
          type: string
          description: Plan slug.
          example: basic
          enum:
            - basic
            - starter
            - launch
            - scale
            - Performance
        postgis_enabled:
          type: boolean
          description: Whether PostGIS support is enabled.
        region:
          type: string
          description: Fly region code.
          example: iad
        replicas:
          type: integer
          description: Number of replicas.
          example: 1
        status:
          type: string
          description: Current lifecycle status.
          example: ready
          enum:
            - creating
            - initializing
            - ready
            - deleting
            - deleted
            - failed
        storage_provisioned_bytes:
          type: integer
          description: >-
            Storage provisioned, summed across the cluster's volumes and
            measured hourly.

            Null until first measured.
          nullable: true
          example: 10737418240
        storage_used_bytes:
          type: integer
          description: >-
            Storage used, summed across the cluster's volumes and measured
            hourly. Null

            until first measured.
          nullable: true
          example: 5368709120
    PostgresAttachedApp:
      type: object
      properties:
        name:
          type: string
          description: Attached Fly app name.
    PostgresClusterEndpoints:
      type: object
      properties:
        primary:
          type: object
          description: Endpoints for connecting to the primary node.
          allOf:
            - $ref: '#/components/schemas/PostgresNodeEndpoints'
    OrganizationRef:
      type: object
      properties:
        name:
          type: string
          description: Organization name.
        slug:
          type: string
          description: Organization slug.
    PostgresNodeEndpoints:
      type: object
      properties:
        direct:
          type: object
          description: Unpooled connection to the cluster node.
          allOf:
            - $ref: '#/components/schemas/PostgresEndpoint'
        pooler:
          type: object
          description: Pooled connection to the cluster node (through PgBouncer).
          allOf:
            - $ref: '#/components/schemas/PostgresEndpoint'
    PostgresEndpoint:
      type: object
      properties:
        host:
          type: string
          description: Hostname to connect to.
        port:
          type: integer
          description: TCP port.
  securitySchemes:
    FlyBearerAuth:
      type: apiKey
      description: >-
        A Fly API token with access to the requested organization or resource.
        Send it as `Authorization: Bearer <Fly API token>`.
      name: Authorization
      in: header

````