Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Get connection

GET/v1/connections/{id}Get connection

Returns the connection with the given ID.

Parameters

idstringpathrequired

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

Responses

200Returned the connection.application/json
object
dataobjectrequired
Show child attributes
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
Example response
{
  "data": {
    "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"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Connection with the given ID was not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu