Databases

Create database

Creates a new database in the specified project. logicalId cannot be combined with branchGitName; pass branchId instead.

post/v1/databases

Request

  • Base URL: https://api.prisma.io
  • URL: https://api.prisma.io/v1/databases
  • Auth: one of:
    • OAuth 2 (authorization code, authorization URL https://auth.prisma.io/authorize, token URL https://auth.prisma.io/token, scopes: workspace:admin, offline_access)
    • HTTP bearer

Request body

projectIdstring required

ID of the project to create the database in

region'us-east-1' | 'us-west-1' | 'eu-west-3' | 'eu-central-1' | 'ap-northeast-1' | 'ap-southeast-1' | 'inherit'

Use "inherit" to use the project's default region (falls back to the default database's region for projects without one).

namestring

Display name for the database

isDefaultboolean

Whether this is the default database

branchIdstring nullable

ID of the Branch to attach the database to. Omit to attach the database to the project's default Branch. Every database belongs to a Branch, so null is rejected.

branchGitNamestring nullable

Git name of the Branch to attach the database to; the Branch is created when it does not exist. Mutually exclusive with branchId. Omit to attach to the project's default Branch. Every database belongs to a Branch, so null is rejected.

logicalIdstring

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

Response

Created a new database.

Changes

No recorded changes to this operation across all 1 revision of this API.