Create server database
Creates a database for a server on an automatically selected database host.
/api/client/servers/{server_uuid}/databasesAuthorization
default Application API requests require an application API token, or a client API token, that belongs to a root administrator. Admin API requests require a client API token that belongs to a root administrator, and reject application API tokens. Client API requests require a client API token.
In: header
Path Parameters
The server UUID.
Query Parameters
Comma-separated relationships to include. Supports "password" when the user can view database passwords.
Value in
- "password"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/client/servers/d3aac109-e5a0-4331-b03e-3454f7e02bbe/databases?include=password" \ -H "Content-Type: application/json" \ -d '{ "database": "example", "remote": "127.0.0.1" }'{ "object": "server_database", "attributes": { "id": "y7YRVKYq", "host": { "address": "116.159.58.249", "port": 3306 }, "name": "ORsU8T3D8G", "username": "XLygD0lH1D", "connections_from": "%", "max_connections": 0, "relationships": { "password": { "object": "database_password", "attributes": { "password": "test123" } } } }}