Prisma Databases Connections API

The Databases Connections API from Prisma — 1 operation(s) for databases connections.

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /v1/databases/{databaseId}/connections List a database's connections · Get list of database connections #
Ask an LLM
“Which connections exist for one database?”
“Can I page through the connections of a database?”
Tell an agent
List the connections for database {databaseId}.
Show {limit} connections on {databaseId}.
POST /v1/databases/{databaseId}/connections Create a connection string for a database · Create database connection string #
Ask an LLM
“How do I create a new connection string for a database?”
“What name should I give a new database connection string?”
Tell an agent
Create a connection string named {name} for database {databaseId}.
Add connection string {name} to {databaseId}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/prisma:prisma-databases-connections-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

prisma-databases-connections-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Prisma Postgres Management Databases Connections API
  description: REST API for managing Prisma Postgres projects, databases, backups, and workspaces.
  version: v1
servers:
- url: https://api.prisma.io
security:
- OAuth2:
  - workspace:admin
  - offline_access
- Bearer: []
tags:
- name: Databases Connections
paths:
  /v1/databases/{databaseId}/connections:
    get:
      responses:
        '200':
          description: Returned all connections for the given database.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          pattern: ^(con_)([cC][^\s-]{8,}|[a-z0-9]+)$
                        type:
                          type: string
                          const: connection
                        url:
                          type: string
                          format: uri
                        name:
                          type: string
                        createdAt:
                          type: string
                          format: date-time
                        kind:
                          type: string
                          enum:
                          - postgres
                          - accelerate
                        endpoints:
                          type: object
                          properties:
                            direct:
                              type: object
                              properties:
                                host:
                                  type: string
                                port:
                                  type: number
                              required:
                              - host
                              - port
                            pooled:
                              type: object
                              properties:
                                host:
                                  type: string
                                port:
                                  type: number
                              required:
                              - host
                              - port
                            accelerate:
                              type: object
                              properties:
                                host:
                                  type: string
                                port:
                                  type: number
                              required:
                              - host
                              - port
                        directConnection:
                          type:
                          - object
                          - 'null'
                          properties:
                            host:
                              type: string
                            pass:
                              type: string
                            user:
                              type: string
                          required:
                          - host
                          - pass
                          - user
                          deprecated: true
                          description: 'Deprecated: use `endpoints.direct` instead.'
                        database:
                          type: object
                          properties:
                            id:
                              type: string
                            url:
                              type: string
                              format: uri
                            name:
                              type: string
                          required:
                          - id
                          - url
                          - name
                      required:
                      - id
                      - type
                      - url
                      - name
                      - createdAt
                      - kind
                      - endpoints
                      - database
                  pagination:
                    type: object
                    properties:
                      nextCursor:
                        type:
                        - string
                        - 'null'
                        description: Next cursor to continue pagination
                      hasMore:
                        type: boolean
                        description: Whether there are more items to paginate
                    required:
                    - nextCursor
                    - hasMore
                required:
                - data
                - pagination
        '401':
          description: Missing or invalid authorization token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      operationId: getV1DatabasesByDatabaseIdConnections
      tags:
      - Databases Connections
      parameters:
      - in: path
        name: databaseId
        schema:
          type: string
          pattern: ^(db_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      - in: query
        name: cursor
        schema:
          type:
          - string
          - 'null'
          description: Cursor for pagination
      - in: query
        name: limit
        schema:
          type: number
          default: 100
          description: Limit for pagination
      summary: Get list of database connections
      description: Returns all connections for the given database.
    post:
      responses:
        '200':
          description: Created a new connection string for the database.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        pattern: ^(con_)([cC][^\s-]{8,}|[a-z0-9]+)$
                      type:
                        type: string
                        const: connection
                      url:
                        type: string
                        format: uri
                      name:
                        type: string
                      createdAt:
                        type: string
                        format: date-time
                      kind:
                        type: string
                        enum:
                        - postgres
                        - accelerate
                      endpoints:
                        type: object
                        properties:
                          direct:
                            type: object
                            properties:
                              host:
                                type: string
                              port:
                                type: number
                              connectionString:
                                type: string
                            required:
                            - host
                            - port
                            - connectionString
                          pooled:
                            type: object
                            properties:
                              host:
                                type: string
                              port:
                                type: number
                              connectionString:
                                type: string
                            required:
                            - host
                            - port
                            - connectionString
                          accelerate:
                            type: object
                            properties:
                              host:
                                type: string
                              port:
                                type: number
                              connectionString:
                                type: string
                            required:
                            - host
                            - port
                            - connectionString
                      connectionString:
                        type: string
                        deprecated: true
                        description: 'Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.'
                      directConnection:
                        type:
                        - object
                        - 'null'
                        properties:
                          host:
                            type: string
                          pass:
                            type: string
                          user:
                            type: string
                        required:
                        - host
                        - pass
                        - user
                        deprecated: true
                        description: 'Deprecated: use `endpoints.direct` instead.'
                      database:
                        type: object
                        properties:
                          id:
                            type: string
                          url:
                            type: string
                            format: uri
                          name:
                            type: string
                        required:
                        - id
                        - url
                        - name
                      host:
                        type:
                        - string
                        - 'null'
                        deprecated: true
                        description: 'Deprecated: use `endpoints.direct` instead.'
                      pass:
                        type:
                        - string
                        - 'null'
                        deprecated: true
                        description: 'Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.'
                      user:
                        type:
                        - string
                        - 'null'
                        deprecated: true
                        description: 'Deprecated: use `endpoints.direct.connectionString` or `endpoints.pooled.connectionString` instead.'
                    required:
                    - id
                    - type
                    - url
                    - name
                    - createdAt
                    - kind
                    - endpoints
                    - connectionString
                    - database
                    - host
                    - pass
                    - user
                required:
                - data
        '401':
          description: Missing or invalid authorization token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
        '404':
          description: Database with the given ID was not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                      hint:
                        type: string
                    required:
                    - code
                    - message
                required:
                - error
      operationId: postV1DatabasesByDatabaseIdConnections
      tags:
      - Databases Connections
      parameters:
      - in: path
        name: databaseId
        schema:
          type: string
          pattern: ^(db_)?([cC][^\s-]{8,}|[a-z0-9]+)$
        required: true
      summary: Create database connection string
      description: Creates a new connection string for the given database.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 3
                  maxLength: 65
              required:
              - name
components:
  securitySchemes:
    OAuth2:
      type: oauth2
      description: OAuth2 authentication
      flows:
        authorizationCode:
          authorizationUrl: https://auth.prisma.io/authorize
          tokenUrl: https://auth.prisma.io/token
          refreshUrl: https://auth.prisma.io/token
          scopes:
            workspace:admin: Full access to workspace resources
            offline_access: Offline access
    Bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth2 token for API authentication