Prisma Next is in early access.Read the docs
Databases

List databases

Returns all databases the token has access to. Optionally filter by project ID.

Returns all databases the token has access to. Optionally filter by project ID.

GET/v1/databases
AuthorizationBearer <token>

OAuth2 authentication

In: header

Scope: workspace:admin, offline_access

Query Parameters

cursor?|

Cursor for pagination

limit?number

Limit for pagination

Default100
projectId?string

Filter databases by project ID

Match^(proj_)?([cC][^\s-]{8,}|[a-z0-9]+)$
branchId?|
branchGitName?string
Length1 <= length

Response Body

application/json

application/json

application/json

curl -X GET "https://api.prisma.io/v1/databases"
{
  "data": [
    {
      "id": "string",
      "type": "database",
      "url": "http://example.com",
      "name": "string",
      "status": "failure",
      "createdAt": "2019-08-24T14:15:22Z",
      "isDefault": true,
      "defaultConnectionId": "string",
      "connections": [
        {
          "id": "string",
          "type": "connection",
          "url": "http://example.com",
          "name": "string",
          "createdAt": "2019-08-24T14:15:22Z",
          "kind": "postgres",
          "endpoints": {
            "direct": {
              "host": "string",
              "port": 0
            },
            "pooled": {
              "host": "string",
              "port": 0
            },
            "accelerate": {
              "host": "string",
              "port": 0
            }
          },
          "directConnection": {
            "host": "string",
            "pass": "string",
            "user": "string"
          },
          "database": {
            "id": "string",
            "url": "http://example.com",
            "name": "string"
          }
        }
      ],
      "project": {
        "id": "string",
        "url": "http://example.com",
        "name": "string"
      },
      "region": {
        "id": "string",
        "name": "string"
      },
      "source": {
        "type": "empty"
      },
      "branchId": "string"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}