POST
Create a new service

Authorizations

Authorization
string
header
required

Bearer token for authentication. Format: 'Bearer {token}'

Headers

X-Workspace-Id
string

Workspace ID (uses default workspace if not provided)

Body

application/json

Create a new service

service_type
enum<string>
required

Service type: 'postgres' (PostgreSQL database), 'shared_storage' (shared persistent volume)

Available options:
postgres,
shared_storage
project_id
string
required

UUID of the project to create the service in

label
string
required

Human-readable display name for the service

resource_id
string

UUID of the compute resource to provision the service on

miget_id
string

DEPRECATED: use resource_id instead

ram_size
number<float>

RAM allocation in MiB (e.g., 64, 128, 256)

disk_size
number<float>

Disk storage in GiB (e.g., 1, 5, 10)

cpu_size
number<float>

CPU allocation in cores (e.g., 0.1, 0.25, 0.5)

public_access
enum<string>

Enable public internet access: '0' disabled, '1' enabled. For postgres type.

Available options:
0,
1
environment_variables
boolean

Automatically inject connection environment variables into parent application

instances
enum<integer>

Number of database instances (1 for standalone, 3/5/7 for HA cluster). For postgres type.

Available options:
1,
3,
5,
7
creation_mode
enum<string>

Creation mode: 'fresh' (new database, default), 'external_replica' (replica of external PostgreSQL). For postgres type.

Available options:
fresh,
external_replica
external_host
string

Hostname of the external PostgreSQL source database. Required for external_replica mode.

external_port
integer<int32>

Port of the external PostgreSQL source database. Required for external_replica mode.

auth_type
enum<string>

Authentication method for external replica: 'password' or 'tls'. Required for external_replica mode.

Available options:
password,
tls
replication_username
string

Username for replication connection to external database.

replication_password
string

Password for replication connection (password auth). Required when auth_type is 'password'.

ca_crt
string

CA certificate for TLS authentication. Required when auth_type is 'tls'.

tls_crt
string

TLS client certificate. Required when auth_type is 'tls'.

tls_key
string

TLS client key. Required when auth_type is 'tls'.

s3_enabled
enum<string>

Enable S3 WAL archive fallback: '0' disabled, '1' enabled. For external_replica mode.

Available options:
0,
1
s3_endpoint
string

S3 endpoint URL. Required when s3_enabled is '1'.

s3_bucket
string

S3 bucket name. Required when s3_enabled is '1'.

s3_path
string

S3 path prefix. Required when s3_enabled is '1'.

s3_access_key
string

S3 access key. Required when s3_enabled is '1'.

s3_secret_key
string

S3 secret key. Required when s3_enabled is '1'.

s3_server_name
string

Archive server name from barman-cloud-wal-archive. Required when s3_enabled is '1'.

storage_access
enum<string>

Access mode: 'RWO' (single node read-write), 'RWX' (multi-node read-write). For shared_storage type.

Available options:
RWO,
RWX
postgres_version
enum<string>

PostgreSQL major version. Required for postgres type.

Available options:
18,
17,
16,
15,
14,
13
mount_point
string

Container mount path (e.g., /data). Required for shared_storage type.

Response

Create a new service

Api_V1_Entities_Service model

uuid
string
required

Service UUID

name
string
required

Service name

label
string
required

Display name

service_type
string
required

Service type (postgres, shared_storage)

state
string
required

Current state. While provisioning: pending, processing, creating, stopped. Once running, the live Kubernetes status: healthy (postgres/mysql/valkey), bound (storage), or running when the status is unavailable. Unhealthy: degraded, degradated, failing, lost, crashloopbackoff, failed

project_id
string
required

Associated project UUID

resource_id
string
required

Assigned resource UUID

miget_id
string
required

DEPRECATED: use resource_id instead

created_at
string<date-time>
required

Creation timestamp

updated_at
string<date-time>
required

Last update timestamp

connection_details
object
required

Connection details for the service

Example: