curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/addons \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"public_access": true,
"external_host": "<string>",
"external_port": 123,
"replication_username": "<string>",
"replication_password": "<string>",
"ca_crt": "<string>",
"tls_crt": "<string>",
"tls_key": "<string>",
"s3_enabled": true,
"s3_endpoint": "<string>",
"s3_bucket": "<string>",
"s3_path": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_server_name": "<string>",
"service_id": 123,
"sub_path": "<string>",
"mount_point": "<string>"
}
'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/addons"
payload = {
"label": "<string>",
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"public_access": True,
"external_host": "<string>",
"external_port": 123,
"replication_username": "<string>",
"replication_password": "<string>",
"ca_crt": "<string>",
"tls_crt": "<string>",
"tls_key": "<string>",
"s3_enabled": True,
"s3_endpoint": "<string>",
"s3_bucket": "<string>",
"s3_path": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_server_name": "<string>",
"service_id": 123,
"sub_path": "<string>",
"mount_point": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
ram_size: 123,
disk_size: 123,
cpu_size: 123,
public_access: true,
external_host: '<string>',
external_port: 123,
replication_username: '<string>',
replication_password: '<string>',
ca_crt: '<string>',
tls_crt: '<string>',
tls_key: '<string>',
s3_enabled: true,
s3_endpoint: '<string>',
s3_bucket: '<string>',
s3_path: '<string>',
s3_access_key: '<string>',
s3_secret_key: '<string>',
s3_server_name: '<string>',
service_id: 123,
sub_path: '<string>',
mount_point: '<string>'
})
};
fetch('https://app.miget.com/api/v1/apps/{uuid}/addons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/apps/{uuid}/addons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'ram_size' => 123,
'disk_size' => 123,
'cpu_size' => 123,
'public_access' => true,
'external_host' => '<string>',
'external_port' => 123,
'replication_username' => '<string>',
'replication_password' => '<string>',
'ca_crt' => '<string>',
'tls_crt' => '<string>',
'tls_key' => '<string>',
's3_enabled' => true,
's3_endpoint' => '<string>',
's3_bucket' => '<string>',
's3_path' => '<string>',
's3_access_key' => '<string>',
's3_secret_key' => '<string>',
's3_server_name' => '<string>',
'service_id' => 123,
'sub_path' => '<string>',
'mount_point' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/apps/{uuid}/addons"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.miget.com/api/v1/apps/{uuid}/addons")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/addons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"type": "<string>",
"label": "<string>",
"state": "<string>",
"quota": {},
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"service_id": 123,
"backup_enabled": true,
"scheduled_backup": "<string>",
"role": "<string>",
"primary_addon_uuid": "<string>",
"replicas": [
{}
],
"settings": {},
"var": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connection_details": {
"internal": {
"hostname": "my-addon-xxx.internal",
"database": "db_name",
"port": 5432,
"username": "db_user",
"password": "db_password",
"connection_url": "postgres://db_user:db_password@my-addon-xxx.internal:5432/db_name"
},
"external": {
"external_connection_url": "postgres://db_user:db_password@my-addon-xxx.external:5432/db_name",
"psql_command": "PGPASSWORD=db_password psql -h my-addon-xxx.external -U db_user db_name"
}
}
}Create a new add-on
Provisions a new add-on (database, cache, or storage) for the application. Connection credentials are automatically injected as environment variables.
curl --request POST \
--url https://app.miget.com/api/v1/apps/{uuid}/addons \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"label": "<string>",
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"public_access": true,
"external_host": "<string>",
"external_port": 123,
"replication_username": "<string>",
"replication_password": "<string>",
"ca_crt": "<string>",
"tls_crt": "<string>",
"tls_key": "<string>",
"s3_enabled": true,
"s3_endpoint": "<string>",
"s3_bucket": "<string>",
"s3_path": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_server_name": "<string>",
"service_id": 123,
"sub_path": "<string>",
"mount_point": "<string>"
}
'import requests
url = "https://app.miget.com/api/v1/apps/{uuid}/addons"
payload = {
"label": "<string>",
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"public_access": True,
"external_host": "<string>",
"external_port": 123,
"replication_username": "<string>",
"replication_password": "<string>",
"ca_crt": "<string>",
"tls_crt": "<string>",
"tls_key": "<string>",
"s3_enabled": True,
"s3_endpoint": "<string>",
"s3_bucket": "<string>",
"s3_path": "<string>",
"s3_access_key": "<string>",
"s3_secret_key": "<string>",
"s3_server_name": "<string>",
"service_id": 123,
"sub_path": "<string>",
"mount_point": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
label: '<string>',
ram_size: 123,
disk_size: 123,
cpu_size: 123,
public_access: true,
external_host: '<string>',
external_port: 123,
replication_username: '<string>',
replication_password: '<string>',
ca_crt: '<string>',
tls_crt: '<string>',
tls_key: '<string>',
s3_enabled: true,
s3_endpoint: '<string>',
s3_bucket: '<string>',
s3_path: '<string>',
s3_access_key: '<string>',
s3_secret_key: '<string>',
s3_server_name: '<string>',
service_id: 123,
sub_path: '<string>',
mount_point: '<string>'
})
};
fetch('https://app.miget.com/api/v1/apps/{uuid}/addons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.miget.com/api/v1/apps/{uuid}/addons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'label' => '<string>',
'ram_size' => 123,
'disk_size' => 123,
'cpu_size' => 123,
'public_access' => true,
'external_host' => '<string>',
'external_port' => 123,
'replication_username' => '<string>',
'replication_password' => '<string>',
'ca_crt' => '<string>',
'tls_crt' => '<string>',
'tls_key' => '<string>',
's3_enabled' => true,
's3_endpoint' => '<string>',
's3_bucket' => '<string>',
's3_path' => '<string>',
's3_access_key' => '<string>',
's3_secret_key' => '<string>',
's3_server_name' => '<string>',
'service_id' => 123,
'sub_path' => '<string>',
'mount_point' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.miget.com/api/v1/apps/{uuid}/addons"
payload := strings.NewReader("{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.miget.com/api/v1/apps/{uuid}/addons")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.miget.com/api/v1/apps/{uuid}/addons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"label\": \"<string>\",\n \"ram_size\": 123,\n \"disk_size\": 123,\n \"cpu_size\": 123,\n \"public_access\": true,\n \"external_host\": \"<string>\",\n \"external_port\": 123,\n \"replication_username\": \"<string>\",\n \"replication_password\": \"<string>\",\n \"ca_crt\": \"<string>\",\n \"tls_crt\": \"<string>\",\n \"tls_key\": \"<string>\",\n \"s3_enabled\": true,\n \"s3_endpoint\": \"<string>\",\n \"s3_bucket\": \"<string>\",\n \"s3_path\": \"<string>\",\n \"s3_access_key\": \"<string>\",\n \"s3_secret_key\": \"<string>\",\n \"s3_server_name\": \"<string>\",\n \"service_id\": 123,\n \"sub_path\": \"<string>\",\n \"mount_point\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"uuid": "<string>",
"name": "<string>",
"type": "<string>",
"label": "<string>",
"state": "<string>",
"quota": {},
"ram_size": 123,
"disk_size": 123,
"cpu_size": 123,
"service_id": 123,
"backup_enabled": true,
"scheduled_backup": "<string>",
"role": "<string>",
"primary_addon_uuid": "<string>",
"replicas": [
{}
],
"settings": {},
"var": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connection_details": {
"internal": {
"hostname": "my-addon-xxx.internal",
"database": "db_name",
"port": 5432,
"username": "db_user",
"password": "db_password",
"connection_url": "postgres://db_user:db_password@my-addon-xxx.internal:5432/db_name"
},
"external": {
"external_connection_url": "postgres://db_user:db_password@my-addon-xxx.external:5432/db_name",
"psql_command": "PGPASSWORD=db_password psql -h my-addon-xxx.external -U db_user db_name"
}
}
}Authorizations
Bearer token for authentication. Format: 'Bearer {token}'
Headers
Workspace ID (uses default workspace if not provided)
Path Parameters
Application UUID
Body
Create a new add-on
Add-on type: 'postgres' (PostgreSQL), 'mysql' (MySQL), 'valkey' (Redis-compatible cache), 'storage' (persistent volume)
postgres, mysql, valkey, storage Human-readable display name for the add-on
RAM allocation in MiB (e.g., 64, 128, 256)
Disk storage in GiB (e.g., 1, 5, 10)
CPU allocation in cores (e.g., 0.1, 0.25, 0.5)
Enable public internet access. Accepts true/false or '1'/'0'. For postgres type.
Number of database instances (1 for standalone, 3/5/7 for HA cluster). For postgres type.
1, 3, 5, 7 Creation mode: 'fresh' (new database, default), 'external_replica' (replica of external PostgreSQL, always created with public access). For postgres type.
fresh, external_replica Hostname of the external PostgreSQL source database. Required for external_replica mode.
Port of the external PostgreSQL source database. Required for external_replica mode.
Authentication method for external replica: 'password' or 'tls'. Required for external_replica mode.
password, tls Username for replication connection to external database.
Password for replication connection (password auth). Required when auth_type is 'password'.
CA certificate for TLS authentication. Required when auth_type is 'tls'.
TLS client certificate. Required when auth_type is 'tls'.
TLS client key. Required when auth_type is 'tls'.
Enable S3 WAL archive fallback. Accepts true/false or '1'/'0'. For external_replica mode.
S3 endpoint URL. Required when s3_enabled is true.
S3 bucket name. Required when s3_enabled is true.
S3 path prefix. Required when s3_enabled is true.
S3 access key. Required when s3_enabled is true.
S3 secret key. Required when s3_enabled is true.
Archive server name from barman-cloud-wal-archive. Required when s3_enabled is true.
Associated service ID for shared storage add-ons
PostgreSQL major version. Required for postgres type.
18, 17, 16, 15, 14, 13 MySQL major version. Required for mysql type.
8.2, 8.0 Valkey version. Required for valkey type.
7, 7.2 Subdirectory of the volume to mount instead of its root (relative path, e.g. media/uploads). Shared storage and RWX only; created automatically if missing.
Container mount path (e.g., /data). Required for storage type unless service_id is given.
Access mode: 'RWO' (single node read-write), 'RWX' (multi-node read-write). Required for storage type unless service_id is given.
RWO, RWX Response
Create a new add-on
Api_V1_Entities_Addon model
Add-on UUID
Add-on name
Add-on type (postgres, mysql, valkey, storage, cronjob)
Display name
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
Raw resource quota row, with ram_size and disk_size in bytes. Use ram_size, disk_size and cpu_size for the values accepted by POST and PUT /apps/{uuid}/addons
RAM allocation in MiB, the unit POST and PUT /apps/{uuid}/addons accept, rounded to 6 decimal places. Null when the add-on has no quota
Disk allocation in GiB, the unit POST and PUT /apps/{uuid}/addons accept, rounded to 6 decimal places. Null when the add-on has no quota
CPU allocation in cores, the unit POST and PUT /apps/{uuid}/addons accept. On a free plan, creating a postgres, mysql or valkey add-on stores 0.1 whatever cpu_size was sent; PUT stores the value sent. Null when the add-on has no quota
Numeric ID of the service a storage add-on is mounted from, the value POST /apps/{uuid}/addons accepts as service_id. Null for add-ons not mounted from a service
Postgres only, null for other types. The effective value the platform applies: false on a free plan whatever was stored, otherwise the stored value, true when never set
Postgres only, null for other types. The effective backup schedule as a 6-field cron expression: the stored schedule, or 0 0 3 * * * when none was set
Postgres only: primary or replica. Null for other types
UUID of the primary add-on, for a replica. Null otherwise
Replicas of a primary Postgres add-on, each with uuid, name, label and state. Null for other add-ons
Add-on specific settings
Connection environment variables
Creation timestamp
Last update timestamp
Connection details for the addon
{
"internal": {
"hostname": "my-addon-xxx.internal",
"database": "db_name",
"port": 5432,
"username": "db_user",
"password": "db_password",
"connection_url": "postgres://db_user:db_password@my-addon-xxx.internal:5432/db_name"
},
"external": {
"external_connection_url": "postgres://db_user:db_password@my-addon-xxx.external:5432/db_name",
"psql_command": "PGPASSWORD=db_password psql -h my-addon-xxx.external -U db_user db_name"
}
}

