Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

List databases

GET/v1/databasesList databases

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

Parameters

cursornull | stringquery

Cursor for pagination

limitnumberquery

Limit for pagination

default 100

projectIdstringquery

Filter databases by project ID

pattern ^(proj_)?([cC][^\s-]{8,}|[a-z0-9]+)$

logicalIdstringquery

Declared identity of the resource, unique within its branch. Set by the tool that declares the resource.

maxLength 255 · pattern ^[A-Za-z0-9][A-Za-z0-9._-]*$

branchIdvaluequery
anyOf · 2 options
Option 1string

const "unassigned"

Option 2string

pattern ^(br_)?([cC][^\s-]{8,}|[a-z0-9]+)$

branchGitNamestringquery

minLength 1

Responses

200Returns the list of databases.application/json
object
dataarray of objectrequired
Show child attributes
Show array items
branchIdnull | stringrequired
connectionsarray of objectrequired
Show child attributes
Show array items
createdAtstring · date-timerequired
databaseobjectrequired
Show child attributes
idstringrequired
namestringrequired
urlstring · urirequired
directConnectionnull | object

Deprecated: use `endpoints.direct` instead.

Show child attributes
hoststringrequired
passstringrequired
userstringrequired
endpointsobjectrequired
Show child attributes
accelerateobject
Show child attributes
hoststringrequired
portnumberrequired
directobject
Show child attributes
hoststringrequired
portnumberrequired
pooledobject
Show child attributes
hoststringrequired
portnumberrequired
idstringrequired

pattern ^(con_)([cC][^\s-]{8,}|[a-z0-9]+)$

kindstringrequired

one of "postgres", "accelerate"

namestringrequired
typestringrequired

const "connection"

urlstring · urirequired
createdAtstring · date-timerequired
defaultConnectionIdnull | stringrequired

pattern ^(con_)([cC][^\s-]{8,}|[a-z0-9]+)$

idstringrequired
isDefaultbooleanrequired
logicalIdnull | stringrequired
namestringrequired
projectobjectrequired
Show child attributes
idstringrequired
namestringrequired
urlstring · urirequired
regionnull | objectrequired
Show child attributes
idstringrequired
namestringrequired
sourcevaluerequired
Show child attributes
oneOf · 4 options
Option 1object
typestringrequired

const "empty"

Option 2object
backupIdstringrequired

ID of the backup to restore from

databaseIdstringrequired
typestringrequired

const "backup"

Option 3object
databaseIdstringrequired
typestringrequired

const "database"

Option 4nullnullable
statusstringrequired

one of "failure", "provisioning", "ready", "recovering"

typestringrequired

const "database"

urlstring · urirequired
paginationobjectrequired
Show child attributes
hasMorebooleanrequired

Whether there are more items to paginate

nextCursornull | stringrequired

Next cursor to continue pagination

Example response
{
  "data": [
    {
      "branchId": "string",
      "connections": [
        {
          "createdAt": "2026-06-09T00:00:00Z",
          "database": {
            "id": "string",
            "name": "string",
            "url": "https://example.com"
          },
          "directConnection": {
            "host": "string",
            "pass": "string",
            "user": "string"
          },
          "endpoints": {
            "accelerate": {
              "host": "string",
              "port": 0
            },
            "direct": {
              "host": "string",
              "port": 0
            },
            "pooled": {
              "host": "string",
              "port": 0
            }
          },
          "id": "string",
          "kind": "accelerate",
          "name": "string",
          "type": "connection",
          "url": "https://example.com"
        }
      ],
      "createdAt": "2026-06-09T00:00:00Z",
      "defaultConnectionId": "string",
      "id": "string",
      "isDefault": true,
      "logicalId": "string",
      "name": "string",
      "project": {
        "id": "string",
        "name": "string",
        "url": "https://example.com"
      },
      "region": {
        "id": "string",
        "name": "string"
      },
      "source": {
        "backupId": "string",
        "databaseId": "string",
        "type": "backup"
      },
      "status": "failure",
      "type": "database",
      "url": "https://example.com"
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "string"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
403Actor does not have access to the requested databases.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu