Skip to Content
SeyloDocs
API referenceDatabases

Create a database

POST
/api/v1/databases.create

Creates a Postgres, MySQL, MariaDB, Mongo or Redis service in a project on one node, with generated credentials (or the ones given) and a data volume. Other services on the same node reach it at :; services on other nodes need exposure.

Needs services.create on the project. Available to MCP clients and the assistant.

Authorization

cookieseylo_session<token>

Request Body

application/json
  1. body
projectId*string

Panel-issued id.

Match^[a-z0-9]{16}$
name*string

DNS-safe; the service's host name on the project network. Unique in its project.

Match^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Length1 <= length <= 40
engine*string|string|string|string|string
version?string
Match^[0-9A-Za-z._-]+$
Lengthlength <= 20
nodeId*string

Panel-issued id.

Match^[a-z0-9]{16}$
database?string
Match^[A-Za-z_][A-Za-z0-9_]*$
Length1 <= length <= 63
user?string
Match^[A-Za-z_][A-Za-z0-9_]*$
Length1 <= length <= 63
password?string
Match^[A-Za-z0-9._~-]+$
Length12 <= length <= 128

Response Body

Success.

application/json
  1. response
serviceId*string

Panel-issued id.

Match^[a-z0-9]{16}$
projectId*string

Panel-issued id.

Match^[a-z0-9]{16}$
name*string

DNS-safe; the service's host name on the project network. Unique in its project.

Match^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
Length1 <= length <= 40
engine*string|string|string|string|string
version*string
nodeId*string

Panel-issued id.

Match^[a-z0-9]{16}$
nodeName*string
internal*
exposure*
webUi*
createdAt*string
Formatdate-time
Example Request
curl -X POST 'https://example.com/api/v1/databases.create' \  -H 'Content-Type: application/json' \  -d '{  "projectId": "string",  "name": "string",  "engine": "postgres",  "nodeId": "string"}'
Example Response
{  "serviceId": "string",  "projectId": "string",  "name": "string",  "engine": "postgres",  "version": "string",  "nodeId": "string",  "nodeName": "string",  "internal": {    "host": "string",    "port": 1,    "database": "string",    "user": "string"  },  "exposure": {    "enabled": true,    "host": "string",    "port": 1024,    "user": "string",    "allowedCidrs": [      "string"    ],    "tlsHostname": "string",    "certificate": "none",    "certificateIssuer": "string",    "certificateExpiresAt": "2019-08-24T14:15:22Z"  },  "webUi": {    "tool": "string",    "idleMinutes": 1,    "running": true,    "lastActiveAt": "2019-08-24T14:15:22Z"  },  "createdAt": "2019-08-24T14:15:22Z"}