palbaseDocs

Palbase Machines · API

GET/databases/{name}/credentials

How to connect to a database

Answers how to connect to the database without its passwords — they are shown once, when they are made: ready-made URLs (direct and pooled), a psql command, a JDBC URL and the lines of a Prisma schema's env, for its owner and for the application's login, with [YOUR-PASSWORD] where the password goes.

Called by your server, with the project's secret key.

Path

namestring · requiredThe database's name: lowercase letters, digits and dashes, starting with a letter and not ending with a dash, 32 at most.
curl
curl -X GET "https://<your-ref>.palbase.studio/databases/<name>/credentials" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200How to connect

400Validation failed or a required field is missing

401Missing or invalid API key

403Not the project's secret key; or the request requires elevated owner authentication (`owner_only`, `insufficient_user_authentication`).

404The project has no database of this name

429Over the project's request limit, or its machine time for this period is used up

503Temporarily unavailable; retrying is safe after Retry-After

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation GetDatabaseCredentials of machines's contract.