Postgres Provision a Project
A 4-step recipe with Prisma. We can help you get access.
Recipe · 4 steps
Postgres Provision a Project
with Prisma · Disaster Recovery & Resilience
Works with AI assistants
Provision a project with a Postgres database, back it up, and create a connection string.
- List the workspaces available to the token so the first one can be used as a fallback when no workspaceId input is supplied.
- Create the project in the target workspace. A Prisma Postgres database is automatically provisioned in the requested region and returned in the response.
- Kick off a first manual backup of the freshly provisioned database. The backup runs asynchronously and is accepted with a 202 status.
- Mint a new Prisma connection string for the database so the application can connect immediately.
What you'll need to have ready
- apiToken: Service token or OAuth access token for the Management API, sent as a Bearer token.
- workspaceId: Optional workspace id to create the project in. When omitted the first workspace is used.
- projectName: Display name for the new project.
- region: Region to provision the database in (e.g. us-east-1, eu-west-1).
- backupLabel: Optional label for the first manual backup.
For your developer
Arazzo workflow prisma:provision-postgres-project, 4 operations: listWorkspaces → createProject → createDatabaseBackup → createConnection. Specs on APIs.io.