Databases
Create database
Creates a new database for the given project.
POST
/v1/projects/{projectId}/databasesAuthorizationBearer <token>
OAuth2 authentication
In: header
Scope: workspace:admin, offline_access
Path Parameters
projectId*string
Match
^(proj_)?([cC][^\s-]{8,}|[a-z0-9]+)$Request Body
application/json
region?string
Default
"us-east-1"Value in
"us-east-1" | "us-west-1" | "eu-west-3" | "eu-central-1" | "ap-northeast-1" | "ap-southeast-1"name?string
isDefault?boolean
Default
falsefromDatabase?
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://api.prisma.io/v1/projects/string/databases" \ -H "Content-Type: application/json" \ -d '{}'{
"data": {
"id": "string",
"type": "database",
"name": "string",
"status": "provisioning",
"createdAt": "2019-08-24T14:15:22Z",
"isDefault": true,
"project": {
"id": "string",
"name": "string"
},
"region": {
"id": "string",
"name": "string"
},
"apiKeys": [
{
"id": "string",
"type": "connection",
"name": "string",
"createdAt": "2019-08-24T14:15:22Z",
"connectionString": "string",
"directConnection": {
"host": "string",
"pass": "string",
"user": "string"
}
}
],
"connectionString": "string",
"directConnection": {
"host": "string",
"pass": "string",
"user": "string"
}
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}{
"error": {
"code": "string",
"message": "string"
}
}