Project

Retrieve connection URI

Retrieves a connection URI for the specified database. The URI uses the standard PostgreSQL connection string format. Set pooled=true to include the -pooler suffix for a connection pooler URI.

get/projects/{project_id}/connection_uri

Request

  • Base URL: https://console.neon.tech/api/v2
  • URL: https://console.neon.tech/api/v2/projects/{project_id}/connection_uri
  • Auth: one of:
    • HTTP bearer
    • API key in cookie zenith
    • API key in cookie keycloak_token

Path parameters

project_idstring required

The Neon project ID

Query parameters

branch_idstring

The branch ID. Defaults to your project's default branch_id if not specified.

endpoint_idstring

The endpoint ID. Defaults to the read-write endpoint_id associated with the branch_id if not specified.

database_namestring required

The database name

role_namestring required

The role name

pooledboolean

Adds the -pooler option to the connection URI when set to true, creating a pooled connection URI.

Response

Returned the connection URI

uristring required

The connection URI.

Changes

No recorded changes to this operation across all 15 revisions of this API.