Docs
Referência

Criar banco de dados

PostgreSQL, MySQL, Redis ou MongoDB. Reserva vCPU e memória no plano e fica no mesmo servidor das apps do workspace, acessível só pela rede privada (<identificador>.internal).

POST
/v1/workspaces/{workspaceId}/databases

PostgreSQL, MySQL, Redis ou MongoDB. Reserva vCPU e memória no plano e fica no mesmo servidor das apps do workspace, acessível só pela rede privada (.internal).

Authorization

hydro_session<token>

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/v1/workspaces/{workspaceId}/databases" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "engine": "postgres",    "memoryMb": 16  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "workspaceId": "ef0efa32-d1c1-43d4-a5e2-fe7b4f00403c",  "name": "string",  "slug": "string",  "engine": "postgres",  "version": "string",  "cpuMillis": -9007199254740991,  "memoryMb": -9007199254740991,  "status": "provisioning",  "desiredState": "running",  "internalHost": "string",  "port": -9007199254740991,  "username": "string",  "databaseName": "string",  "public": {    "enabled": true,    "host": "string",    "port": -9007199254740991,    "allowedCidrs": [      "string"    ]  },  "statusMessage": [    "string"  ],  "runningSince": "2019-08-24T14:15:22Z",  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}