Create database
POST/v1/databases
Creates a new database in the specified project. logicalId cannot be combined with branchGitName; pass branchId instead.
AuthorizationBearer <token>
OAuth2 authentication
In: header
Scope: workspace:admin, offline_access
application/json
TypeScript Definitions
Use the request body type in TypeScript.
application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”application/json
Section titled “application/json”curl -X POST "https://example.com/v1/databases" \
-H "Content-Type: application/json" \
-d '{
"projectId": "string"
}'{
"data": {
"id": "string",
"type": "database",
"url": "http://example.com",
"name": "string",
"status": "failure",
"createdAt": "2019-08-24T14:15:22Z",
"isDefault": true,
"defaultConnectionId": "string",
"connections": [
{
"id": "string",
"type": "connection",
"url": "http://example.com",
"name": "string",
"createdAt": "2019-08-24T14:15:22Z",
"kind": "postgres",
"endpoints": {
"direct": {
"host": "string",
"port": 0,
"connectionString": "string"
},
"pooled": {
"host": "string",
"port": 0,
"connectionString": "string"
},
"accelerate": {
"host": "string",
"port": 0,
"connectionString": "string"
}
},
"directConnection": {
"host": "string",
"pass": "string",
"user": "string"
},
"database": {
"id": "string",
"url": "http://example.com",
"name": "string"
}
}
],
"project": {
"id": "string",
"url": "http://example.com",
"name": "string"
},
"region": {
"id": "string",
"name": "string"
},
"source": {
"type": "empty"
},
"branchId": "string",
"logicalId": "string"
}
}