Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: Add deterministic UUIDs to development seeders

Andras Bacsai2f721c6166c1
diff --git a/database/seeders/ApplicationSeeder.php b/database/seeders/ApplicationSeeder.php
index ef5b4869d5..f5a00fe157 100644
--- a/database/seeders/ApplicationSeeder.php
+++ b/database/seeders/ApplicationSeeder.php
@@ -15,6 +15,7 @@ class ApplicationSeeder extends Seeder
public function run(): void
{
Application::create([
+ 'uuid' => 'docker-compose',
'name' => 'Docker Compose Example',
'repository_project_id' => 603035348,
'git_repository' => 'coollabsio/coolify-examples',
@@ -30,6 +31,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
+ 'uuid' => 'nodejs',
'name' => 'NodeJS Fastify Example',
'fqdn' => 'http://nodejs.127.0.0.1.sslip.io',
'repository_project_id' => 603035348,
@@ -45,6 +47,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
+ 'uuid' => 'dockerfile',
'name' => 'Dockerfile Example',
'fqdn' => 'http://dockerfile.127.0.0.1.sslip.io',
'repository_project_id' => 603035348,
@@ -60,6 +63,7 @@ class ApplicationSeeder extends Seeder
'source_type' => GithubApp::class,
]);
Application::create([
+ 'uuid' => 'dockerfile-pure',
'name' => 'Pure Dockerfile Example',
'fqdn' => 'http://pure-dockerfile.127.0.0.1.sslip.io',
'git_repository' => 'coollabsio/coolify',
@@ -78,6 +82,7 @@ CMD ["nginx", "-g", "daemon off;"]
',
]);
Application::create([
+ 'uuid' => 'crashloop',
'name' => 'Crash Loop Example',
'git_repository' => 'coollabsio/coolify',
'git_branch' => 'v4.x',
diff --git a/database/seeders/GithubAppSeeder.php b/database/seeders/GithubAppSeeder.php
index b34c004736..10e23c36a5 100644
--- a/database/seeders/GithubAppSeeder.php
+++ b/database/seeders/GithubAppSeeder.php
@@ -14,6 +14,7 @@ class GithubAppSeeder extends Seeder
{
GithubApp::create([
'id' => 0,
+ 'uuid' => 'github-public',
'name' => 'Public GitHub',
'api_url' => 'https://api.github.com',
'html_url' => 'https://github.com',
@@ -22,7 +23,7 @@ class GithubAppSeeder extends Seeder
]);
GithubApp::create([
'name' => 'coolify-laravel-dev-public',
- 'uuid' => '69420',
+ 'uuid' => 'github-app',
'organization' => 'coollabsio',
'api_url' => 'https://api.github.com',
'html_url' => 'https://github.com',
diff --git a/database/seeders/GitlabAppSeeder.php b/database/seeders/GitlabAppSeeder.php
index ec2b7ec5e1..5dfb599024 100644
--- a/database/seeders/GitlabAppSeeder.php
+++ b/database/seeders/GitlabAppSeeder.php
@@ -14,6 +14,7 @@ class GitlabAppSeeder extends Seeder
{
GitlabApp::create([
'id' => 1,
+ 'uuid' => 'gitlab-public',
'name' => 'Public GitLab',
'api_url' => 'https://gitlab.com/api/v4',
'html_url' => 'https://gitlab.com',
diff --git a/database/seeders/PrivateKeySeeder.php b/database/seeders/PrivateKeySeeder.php
index 6b44d0867d..0aa4153b30 100644
--- a/database/seeders/PrivateKeySeeder.php
+++ b/database/seeders/PrivateKeySeeder.php
@@ -13,6 +13,7 @@ class PrivateKeySeeder extends Seeder
public function run(): void
{
PrivateKey::create([
+ 'uuid' => 'ssh',
'team_id' => 0,
'name' => 'Testing Host Key',
'description' => 'This is a test docker container',
@@ -27,6 +28,7 @@ uZx9iFkCELtxrh31QJ68AAAAEXNhaWxANzZmZjY2ZDJlMmRkAQIDBA==
]);
PrivateKey::create([
+ 'uuid' => 'github-key',
'team_id' => 0,
'name' => 'development-github-app',
'description' => 'This is the key for using the development GitHub app',
diff --git a/database/seeders/ProjectSeeder.php b/database/seeders/ProjectSeeder.php
index 33cd8cd06f..ab8e540519 100644
--- a/database/seeders/ProjectSeeder.php
+++ b/database/seeders/ProjectSeeder.php
@@ -9,10 +9,14 @@ class ProjectSeeder extends Seeder
{
public function run(): void
{
- Project::create([
+ $project = Project::create([
+ 'uuid' => 'project',
'name' => 'My first project',
'description' => 'This is a test project in development',
'team_id' => 0,
]);
+
+ // Update the auto-created environment with a deterministic UUID
+ $project->environments()->first()->update(['uuid' => 'production']);
}
}
diff --git a/database/seeders/S3StorageSeeder.php b/database/seeders/S3StorageSeeder.php
index 9fa5314472..b38df6ad59 100644
--- a/database/seeders/S3StorageSeeder.php
+++ b/database/seeders/S3StorageSeeder.php
@@ -13,6 +13,7 @@ class S3StorageSeeder extends Seeder
public function run(): void
{
S3Storage::create([
+ 'uuid' => 'minio',
'name' => 'Local MinIO',
'description' => 'Local MinIO S3 Storage',
'key' => 'minioadmin',
diff --git a/database/seeders/ServerSeeder.php b/database/seeders/ServerSeeder.php
index d328431071..2d87466915 100644
--- a/database/seeders/ServerSeeder.php
+++ b/database/seeders/ServerSeeder.php
@@ -13,6 +13,7 @@ class ServerSeeder extends Seeder
{
Server::create([
'id' => 0,
+ 'uuid' => 'localhost',
'name' => 'localhost',
'description' => 'This is a test docker container in development mode',
'ip' => 'coolify-testing-host',
diff --git a/database/seeders/StandaloneDockerSeeder.php b/database/seeders/StandaloneDockerSeeder.php
index a466de56bb..e31c62d9f4 100644
--- a/database/seeders/StandaloneDockerSeeder.php
+++ b/database/seeders/StandaloneDockerSeeder.php
@@ -15,6 +15,7 @@ class StandaloneDockerSeeder extends Seeder
if (StandaloneDocker::find(0) == null) {
StandaloneDocker::create([
'id' => 0,
+ 'uuid' => 'docker',
'name' => 'Standalone Docker 1',
'network' => 'coolify',
'server_id' => 0,
diff --git a/database/seeders/StandalonePostgresqlSeeder.php b/database/seeders/StandalonePostgresqlSeeder.php
index 1fc96a610a..59ee6fd421 100644
--- a/database/seeders/StandalonePostgresqlSeeder.php
+++ b/database/seeders/StandalonePostgresqlSeeder.php
@@ -11,6 +11,7 @@ class StandalonePostgresqlSeeder extends Seeder
public function run(): void
{
StandalonePostgresql::create([
+ 'uuid' => 'postgresql',
'name' => 'Local PostgreSQL',
'description' => 'Local PostgreSQL for testing',
'postgres_password' => 'postgres',
diff --git a/openapi.json b/openapi.json
index 2d87ed51be..fdeb8853bb 100644
--- a/openapi.json
+++ b/openapi.json
@@ -3295,69 +3295,52 @@
]
}
},
- "\/databases": {
- "get": {
- "tags": [
- "Databases"
- ],
- "summary": "List",
- "description": "List all databases.",
- "operationId": "list-databases",
- "responses": {
- "200": {
- "description": "Get all databases",
- "content": {
- "application\/json": {
- "schema": {
- "type": "string"
- },
- "example": "Content is very complex. Will be implemented later."
- }
- }
- },
- "401": {
- "$ref": "#\/components\/responses\/401"
- },
- "400": {
- "$ref": "#\/components\/responses\/400"
- }
- },
- "security": [
- {
- "bearerAuth": []
- }
- ]
- }
- },
- "\/databases\/{uuid}\/backups": {
+ "\/cloud-tokens": {
"get": {
"tags": [
- "Databases"
- ],
- "summary": "Get",
- "description": "Get backups details by database UUID.",
- "operationId": "get-database-backups-by-uuid",
- "parameters": [
- {
- "name": "uuid",
- "in": "path",
- "description": "UUID of the database.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
+ "Cloud Tokens"
],
+ "summary": "List Cloud Provider Tokens",
+ "description": "List all cloud provider tokens for the authenticated team.",
+ "operationId": "list-cloud-tokens",
"responses": {
"200": {
- "description": "Get all backups for a database",
+ "description": "Get all cloud provider tokens.",
"content": {
"application\/json": {
"schema": {
- "type": "string"
- },
- "example": "Content is very complex. Will be implemented later."
+ "type": "array",
+ "items": {
+ "properties": {
+ "uuid": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string",
+ "enum": [
+ "hetzner",
+ "digitalocean"
+ ]
+ },
+ "team_id": {
+ "type": "integer"
+ },
+ "servers_count": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
}
}
},
@@ -3366,9 +3349,6 @@
},
"400": {
"$ref": "#\/components\/responses\/400"
- },
- "404": {
- "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -3379,87 +3359,41 @@
},
"post": {
"tags": [
- "Databases"
- ],
- "summary": "Create Backup",
- "description": "Create a new scheduled backup configuration for a database",
- "operationId": "create-database-backup",
- "parameters": [
- {
- "name": "uuid",
- "in": "path",
- "description": "UUID of the database.",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- }
+ "Cloud Tokens"
],
+ "summary": "Create Cloud Provider Token",
+ "description": "Create a new cloud provider token. The token will be validated before being stored.",
+ "operationId": "create-cloud-token",
"requestBody": {
- "description": "Backup configuration data",
+ "description": "Cloud provider token details",
"required": true,
"content": {
"application\/json": {
"schema": {
"required": [
- "frequency"
+ "provider",
+ "token",
+ "name"
],
"properties": {
- "frequency": {
+ "provider": {
"type": "string",
- "description": "Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)"
- },
- "enabled": {
- "type": "boolean",
- "description": "Whether the backup is enabled",
- "default": true
- },
- "save_s3": {
- "type": "boolean",
- "description": "Whether to save backups to S3",
- "default": false
+ "enum": [
+ "hetzner",
+ "digitalocean"
+ ],
+ "example": "hetzner",
+ "description": "The cloud provider."
},
- "s3_storage_uuid": {
+ "token": {
"type": "string",
- "description": "S3 storage UUID (required if save_s3 is true)"
+ "example": "your-api-token-here",
+ "description": "The API token for the cloud provider."
},
- "databases_to_backup": {
+ "name": {
"type": "string",
- "description": "Comma separated list of databases to backup"
- },
- "dump_all": {
- "type": "boolean",
- "description": "Whether to dump all databases",
- "default": false
- },
- "backup_now": {
- "type": "boolean",
- "description": "Whether to trigger backup immediately after creation"
- },
- "database_backup_retention_amount_locally": {
- "type": "integer",
- "description": "Number of backups to retain locally"
- },
- "database_backup_retention_days_locally": {
- "type": "integer",
- "description": "Number of days to retain backups locally"
- },
- "database_backup_retention_max_storage_locally": {
- "type": "integer",
- "description": "Max storage (MB) for local backups"
- },
- "database_backup_retention_amount_s3": {
- "type": "integer",
- "description": "Number of backups to retain in S3"
- },
- "database_backup_retention_days_s3": {
- "type": "integer",
- "description": "Number of days to retain backups in S3"
- },
- "database_backup_retention_max_storage_s3": {
- "type": "integer",
- "description": "Max storage (MB) for S3 backups"
+ "example": "My Hetzner Token",
+ "description": "A friendly name for the token."
}
},
"type": "object"
@@ -3469,19 +3403,15 @@
},
"responses": {
"201": {
- "description": "Backup configuration created successfully",
+ "description": "Cloud provider token created.",
"content": {
"application\/json": {
"schema": {
"properties": {
"uuid": {
"type": "string",
- "format": "uuid",
- "example": "550e8400-e29b-41d4-a716-446655440000"
- },
- "message": {
- "type": "string",
- "example": "Backup configuration created successfully."
+ "example": "og888os",
+ "description": "The UUID of the token."
}
},
"type": "object"
@@ -3495,9 +3425,6 @@
"400": {
"$ref": "#\/components\/responses\/400"
},
- "404": {
- "$ref": "#\/components\/responses\/404"
- },
"422": {
"$ref": "#\/components\/responses\/422"
}
@@ -3509,44 +3436,62 @@
]
}
},
- "\/databases\/{uuid}": {
+ "\/cloud-tokens\/{uuid}": {
"get": {
"tags": [
- "Databases"
+ "Cloud Tokens"
],
- "summary": "Get",
- "description": "Get database by UUID.",
- "operationId": "get-database-by-uuid",
+ "summary": "Get Cloud Provider Token",
+ "description": "Get cloud provider token by UUID.",
+ "operationId": "get-cloud-token-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database.",
+ "description": "Token UUID",
"required": true,
"schema": {
- "type": "string",
- "format": "uuid"
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Get all databases",
+ "description": "Get cloud provider token by UUID",
"content": {
"application\/json": {
"schema": {
- "type": "string"
- },
- "example": "Content is very complex. Will be implemented later."
+ "properties": {
+ "uuid": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "provider": {
+ "type": "string"
+ },
+ "team_id": {
+ "type": "integer"
+ },
+ "servers_count": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "updated_at": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
}
},
"401": {
"$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
"404": {
"$ref": "#\/components\/responses\/404"
}
@@ -3559,73 +3504,33 @@
},
"delete": {
"tags": [
- "Databases"
+ "Cloud Tokens"
],
- "summary": "Delete",
- "description": "Delete database by UUID.",
- "operationId": "delete-database-by-uuid",
+ "summary": "Delete Cloud Provider Token",
+ "description": "Delete cloud provider token by UUID. Cannot delete if token is used by any servers.",
+ "operationId": "delete-cloud-token-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database.",
+ "description": "UUID of the cloud provider token.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
- },
- {
- "name": "delete_configurations",
- "in": "query",
- "description": "Delete configurations.",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": true
- }
- },
- {
- "name": "delete_volumes",
- "in": "query",
- "description": "Delete volumes.",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": true
- }
- },
- {
- "name": "docker_cleanup",
- "in": "query",
- "description": "Run docker cleanup.",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": true
- }
- },
- {
- "name": "delete_connected_networks",
- "in": "query",
- "description": "Delete connected networks.",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": true
- }
}
],
"responses": {
"200": {
- "description": "Database deleted.",
+ "description": "Cloud provider token deleted.",
"content": {
"application\/json": {
"schema": {
"properties": {
"message": {
"type": "string",
- "example": "Database deleted."
+ "example": "Cloud provider token deleted."
}
},
"type": "object"
@@ -3651,25 +3556,24 @@
},
"patch": {
"tags": [
- "Databases"
+ "Cloud Tokens"
],
- "summary": "Update",
- "description": "Update database by UUID.",
- "operationId": "update-database-by-uuid",
+ "summary": "Update Cloud Provider Token",
+ "description": "Update cloud provider token name.",
+ "operationId": "update-cloud-token-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database.",
+ "description": "Token UUID",
"required": true,
"schema": {
- "type": "string",
- "format": "uuid"
+ "type": "string"
}
}
],
"requestBody": {
- "description": "Database data",
+ "description": "Cloud provider token updated.",
"required": true,
"content": {
"application\/json": {
@@ -3677,159 +3581,7 @@
"properties": {
"name": {
"type": "string",
- "description": "Name of the database"
- },
- "description": {
- "type": "string",
- "description": "Description of the database"
- },
- "image": {
- "type": "string",
- "description": "Docker Image of the database"
- },
- "is_public": {
- "type": "boolean",
- "description": "Is the database public?"
- },
- "public_port": {
- "type": "integer",
- "description": "Public port of the database"
- },
- "limits_memory": {
- "type": "string",
- "description": "Memory limit of the database"
- },
- "limits_memory_swap": {
- "type": "string",
- "description": "Memory swap limit of the database"
- },
- "limits_memory_swappiness": {
- "type": "integer",
- "description": "Memory swappiness of the database"
- },
- "limits_memory_reservation": {
- "type": "string",
- "description": "Memory reservation of the database"
- },
- "limits_cpus": {
- "type": "string",
- "description": "CPU limit of the database"
- },
- "limits_cpuset": {
- "type": "string",
- "description": "CPU set of the database"
- },
- "limits_cpu_shares": {
- "type": "integer",
- "description": "CPU shares of the database"
- },
- "postgres_user": {
- "type": "string",
- "description": "PostgreSQL user"
- },
- "postgres_password": {
- "type": "string",
- "description": "PostgreSQL password"
- },
- "postgres_db": {
- "type": "string",
- "description": "PostgreSQL database"
- },
- "postgres_initdb_args": {
- "type": "string",
- "description": "PostgreSQL initdb args"
- },
- "postgres_host_auth_method": {
- "type": "string",
- "description": "PostgreSQL host auth method"
- },
- "postgres_conf": {
- "type": "string",
- "description": "PostgreSQL conf"
- },
- "clickhouse_admin_user": {
- "type": "string",
- "description": "Clickhouse admin user"
- },
- "clickhouse_admin_password": {
- "type": "string",
- "description": "Clickhouse admin password"
- },
- "dragonfly_password": {
- "type": "string",
- "description": "DragonFly password"
- },
- "redis_password": {
- "type": "string",
- "description": "Redis password"
- },
- "redis_conf": {
- "type": "string",
- "description": "Redis conf"
- },
- "keydb_password": {
- "type": "string",
- "description": "KeyDB password"
- },
- "keydb_conf": {
- "type": "string",
- "description": "KeyDB conf"
- },
- "mariadb_conf": {
- "type": "string",
- "description": "MariaDB conf"
- },
- "mariadb_root_password": {
- "type": "string",
- "description": "MariaDB root password"
- },
- "mariadb_user": {
- "type": "string",
- "description": "MariaDB user"
- },
- "mariadb_password": {
- "type": "string",
- "description": "MariaDB password"
- },
- "mariadb_database": {
- "type": "string",
- "description": "MariaDB database"
- },
- "mongo_conf": {
- "type": "string",
- "description": "Mongo conf"
- },
- "mongo_initdb_root_username": {
- "type": "string",
- "description": "Mongo initdb root username"
- },
- "mongo_initdb_root_password": {
- "type": "string",
- "description": "Mongo initdb root password"
- },
- "mongo_initdb_database": {
- "type": "string",
- "description": "Mongo initdb init database"
- },
- "mysql_root_password": {
- "type": "string",
- "description": "MySQL root password"
- },
- "mysql_password": {
- "type": "string",
- "description": "MySQL password"
- },
- "mysql_user": {
- "type": "string",
- "description": "MySQL user"
- },
- "mysql_database": {
- "type": "string",
- "description": "MySQL database"
- },
- "mysql_conf": {
- "type": "string",
- "description": "MySQL conf"
+ "description": "The friendly name for the token."
}
},
"type": "object"
@@ -3839,14 +3591,23 @@
},
"responses": {
"200": {
- "description": "Database updated"
+ "description": "Cloud provider token updated.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "uuid": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
},
"401": {
"$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
"404": {
"$ref": "#\/components\/responses\/404"
},
@@ -3861,55 +3622,39 @@
]
}
},
- "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}": {
- "delete": {
+ "\/cloud-tokens\/{uuid}\/validate": {
+ "post": {
"tags": [
- "Databases"
+ "Cloud Tokens"
],
- "summary": "Delete backup configuration",
- "description": "Deletes a backup configuration and all its executions.",
- "operationId": "delete-backup-configuration-by-uuid",
+ "summary": "Validate Cloud Provider Token",
+ "description": "Validate a cloud provider token against the provider API.",
+ "operationId": "validate-cloud-token-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database",
+ "description": "Token UUID",
"required": true,
"schema": {
"type": "string"
}
- },
- {
- "name": "scheduled_backup_uuid",
- "in": "path",
- "description": "UUID of the backup configuration to delete",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- },
- {
- "name": "delete_s3",
- "in": "query",
- "description": "Whether to delete all backup files from S3",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": false
- }
}
],
"responses": {
"200": {
- "description": "Backup configuration deleted.",
+ "description": "Token validation result.",
"content": {
"application\/json": {
"schema": {
"properties": {
+ "valid": {
+ "type": "boolean",
+ "example": true
+ },
"message": {
"type": "string",
- "example": "Backup configuration and all executions deleted."
+ "example": "Token is valid."
}
},
"type": "object"
@@ -3917,21 +3662,45 @@
}
}
},
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
"404": {
- "description": "Backup configuration not found.",
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases": {
+ "get": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "List",
+ "description": "List all databases.",
+ "operationId": "list-databases",
+ "responses": {
+ "200": {
+ "description": "Get all databases",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "Backup configuration not found."
- }
- },
- "type": "object"
- }
+ "type": "string"
+ },
+ "example": "Content is very complex. Will be implemented later."
}
}
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
}
},
"security": [
@@ -3939,14 +3708,16 @@
"bearerAuth": []
}
]
- },
- "patch": {
+ }
+ },
+ "\/databases\/{uuid}\/backups": {
+ "get": {
"tags": [
"Databases"
],
- "summary": "Update",
- "description": "Update a specific backup configuration for a given database, identified by its UUID and the backup ID",
- "operationId": "update-database-backup",
+ "summary": "Get",
+ "description": "Get backups details by database UUID.",
+ "operationId": "get-database-backups-by-uuid",
"parameters": [
{
"name": "uuid",
@@ -3957,11 +3728,48 @@
"type": "string",
"format": "uuid"
}
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Get all backups for a database",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "string"
+ },
+ "example": "Content is very complex. Will be implemented later."
+ }
+ }
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
},
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
{
- "name": "scheduled_backup_uuid",
+ "bearerAuth": []
+ }
+ ]
+ },
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create Backup",
+ "description": "Create a new scheduled backup configuration for a database",
+ "operationId": "create-database-backup",
+ "parameters": [
+ {
+ "name": "uuid",
"in": "path",
- "description": "UUID of the backup configuration.",
+ "description": "UUID of the database.",
"required": true,
"schema": {
"type": "string",
@@ -3970,27 +3778,32 @@
}
],
"requestBody": {
- "description": "Database backup configuration data",
+ "description": "Backup configuration data",
"required": true,
"content": {
"application\/json": {
"schema": {
+ "required": [
+ "frequency"
+ ],
"properties": {
- "save_s3": {
- "type": "boolean",
- "description": "Whether data is saved in s3 or not"
- },
- "s3_storage_uuid": {
+ "frequency": {
"type": "string",
- "description": "S3 storage UUID"
+ "description": "Backup frequency (cron expression or: every_minute, hourly, daily, weekly, monthly, yearly)"
},
- "backup_now": {
+ "enabled": {
"type": "boolean",
- "description": "Whether to take a backup now or not"
+ "description": "Whether the backup is enabled",
+ "default": true
},
- "enabled": {
+ "save_s3": {
"type": "boolean",
- "description": "Whether the backup is enabled or not"
+ "description": "Whether to save backups to S3",
+ "default": false
+ },
+ "s3_storage_uuid": {
+ "type": "string",
+ "description": "S3 storage UUID (required if save_s3 is true)"
},
"databases_to_backup": {
"type": "string",
@@ -3998,35 +3811,36 @@
},
"dump_all": {
"type": "boolean",
- "description": "Whether all databases are dumped or not"
+ "description": "Whether to dump all databases",
+ "default": false
},
- "frequency": {
- "type": "string",
- "description": "Frequency of the backup"
+ "backup_now": {
+ "type": "boolean",
+ "description": "Whether to trigger backup immediately after creation"
},
"database_backup_retention_amount_locally": {
"type": "integer",
- "description": "Retention amount of the backup locally"
+ "description": "Number of backups to retain locally"
},
"database_backup_retention_days_locally": {
"type": "integer",
- "description": "Retention days of the backup locally"
+ "description": "Number of days to retain backups locally"
},
"database_backup_retention_max_storage_locally": {
"type": "integer",
- "description": "Max storage of the backup locally"
+ "description": "Max storage (MB) for local backups"
},
"database_backup_retention_amount_s3": {
"type": "integer",
- "description": "Retention amount of the backup in s3"
+ "description": "Number of backups to retain in S3"
},
"database_backup_retention_days_s3": {
"type": "integer",
- "description": "Retention days of the backup in s3"
+ "description": "Number of days to retain backups in S3"
},
"database_backup_retention_max_storage_s3": {
"type": "integer",
- "description": "Max storage of the backup in S3"
+ "description": "Max storage (MB) for S3 backups"
}
},
"type": "object"
@@ -4035,8 +3849,26 @@
}
},
"responses": {
- "200": {
- "description": "Database backup configuration updated"
+ "201": {
+ "description": "Backup configuration created successfully",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "format": "uuid",
+ "example": "550e8400-e29b-41d4-a716-446655440000"
+ },
+ "message": {
+ "type": "string",
+ "example": "Backup configuration created successfully."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -4058,132 +3890,37 @@
]
}
},
- "\/databases\/postgresql": {
- "post": {
+ "\/databases\/{uuid}": {
+ "get": {
"tags": [
"Databases"
],
- "summary": "Create (PostgreSQL)",
- "description": "Create a new PostgreSQL database.",
- "operationId": "create-database-postgresql",
- "requestBody": {
- "description": "Database data",
- "required": true,
- "content": {
- "application\/json": {
- "schema": {
- "required": [
- "server_uuid",
- "project_uuid",
- "environment_name",
- "environment_uuid"
- ],
- "properties": {
- "server_uuid": {
- "type": "string",
- "description": "UUID of the server"
- },
- "project_uuid": {
- "type": "string",
- "description": "UUID of the project"
- },
- "environment_name": {
- "type": "string",
- "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
- },
- "environment_uuid": {
- "type": "string",
- "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
- },
- "postgres_user": {
- "type": "string",
- "description": "PostgreSQL user"
- },
- "postgres_password": {
- "type": "string",
- "description": "PostgreSQL password"
- },
- "postgres_db": {
- "type": "string",
- "description": "PostgreSQL database"
- },
- "postgres_initdb_args": {
- "type": "string",
- "description": "PostgreSQL initdb args"
- },
- "postgres_host_auth_method": {
- "type": "string",
- "description": "PostgreSQL host auth method"
- },
- "postgres_conf": {
- "type": "string",
- "description": "PostgreSQL conf"
- },
- "destination_uuid": {
- "type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
- },
- "name": {
- "type": "string",
- "description": "Name of the database"
- },
- "description": {
- "type": "string",
- "description": "Description of the database"
- },
- "image": {
- "type": "string",
- "description": "Docker Image of the database"
- },
- "is_public": {
- "type": "boolean",
- "description": "Is the database public?"
- },
- "public_port": {
- "type": "integer",
- "description": "Public port of the database"
- },
- "limits_memory": {
- "type": "string",
- "description": "Memory limit of the database"
- },
- "limits_memory_swap": {
- "type": "string",
- "description": "Memory swap limit of the database"
- },
- "limits_memory_swappiness": {
- "type": "integer",
- "description": "Memory swappiness of the database"
- },
- "limits_memory_reservation": {
- "type": "string",
- "description": "Memory reservation of the database"
- },
- "limits_cpus": {
- "type": "string",
- "description": "CPU limit of the database"
- },
- "limits_cpuset": {
- "type": "string",
- "description": "CPU set of the database"
- },
- "limits_cpu_shares": {
- "type": "integer",
- "description": "CPU shares of the database"
- },
- "instant_deploy": {
- "type": "boolean",
- "description": "Instant deploy the database"
- }
- },
- "type": "object"
- }
+ "summary": "Get",
+ "description": "Get database by UUID.",
+ "operationId": "get-database-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
}
}
- },
+ ],
"responses": {
"200": {
- "description": "Database updated"
+ "description": "Get all databases",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "string"
+ },
+ "example": "Content is very complex. Will be implemented later."
+ }
+ }
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -4191,8 +3928,8 @@
"400": {
"$ref": "#\/components\/responses\/400"
},
- "422": {
- "$ref": "#\/components\/responses\/422"
+ "404": {
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -4200,57 +3937,125 @@
"bearerAuth": []
}
]
- }
- },
- "\/databases\/clickhouse": {
- "post": {
+ },
+ "delete": {
"tags": [
"Databases"
],
- "summary": "Create (Clickhouse)",
- "description": "Create a new Clickhouse database.",
- "operationId": "create-database-clickhouse",
+ "summary": "Delete",
+ "description": "Delete database by UUID.",
+ "operationId": "delete-database-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ {
+ "name": "delete_configurations",
+ "in": "query",
+ "description": "Delete configurations.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ },
+ {
+ "name": "delete_volumes",
+ "in": "query",
+ "description": "Delete volumes.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ },
+ {
+ "name": "docker_cleanup",
+ "in": "query",
+ "description": "Run docker cleanup.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ },
+ {
+ "name": "delete_connected_networks",
+ "in": "query",
+ "description": "Delete connected networks.",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Database deleted.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Database deleted."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ },
+ "patch": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Update",
+ "description": "Update database by UUID.",
+ "operationId": "update-database-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
"requestBody": {
"description": "Database data",
"required": true,
"content": {
"application\/json": {
"schema": {
- "required": [
- "server_uuid",
- "project_uuid",
- "environment_name",
- "environment_uuid"
- ],
"properties": {
- "server_uuid": {
- "type": "string",
- "description": "UUID of the server"
- },
- "project_uuid": {
- "type": "string",
- "description": "UUID of the project"
- },
- "environment_name": {
- "type": "string",
- "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
- },
- "environment_uuid": {
- "type": "string",
- "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
- },
- "destination_uuid": {
- "type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
- },
- "clickhouse_admin_user": {
- "type": "string",
- "description": "Clickhouse admin user"
- },
- "clickhouse_admin_password": {
- "type": "string",
- "description": "Clickhouse admin password"
- },
"name": {
"type": "string",
"description": "Name of the database"
@@ -4299,261 +4104,113 @@
"type": "integer",
"description": "CPU shares of the database"
},
- "instant_deploy": {
- "type": "boolean",
- "description": "Instant deploy the database"
- }
- },
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Database updated"
- },
- "401": {
- "$ref": "#\/components\/responses\/401"
- },
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
- "422": {
- "$ref": "#\/components\/responses\/422"
- }
- },
- "security": [
- {
- "bearerAuth": []
- }
- ]
- }
- },
- "\/databases\/dragonfly": {
- "post": {
- "tags": [
- "Databases"
- ],
- "summary": "Create (DragonFly)",
- "description": "Create a new DragonFly database.",
- "operationId": "create-database-dragonfly",
- "requestBody": {
- "description": "Database data",
- "required": true,
- "content": {
- "application\/json": {
- "schema": {
- "required": [
- "server_uuid",
- "project_uuid",
- "environment_name",
- "environment_uuid"
- ],
- "properties": {
- "server_uuid": {
+ "postgres_user": {
"type": "string",
- "description": "UUID of the server"
+ "description": "PostgreSQL user"
},
- "project_uuid": {
+ "postgres_password": {
"type": "string",
- "description": "UUID of the project"
+ "description": "PostgreSQL password"
},
- "environment_name": {
+ "postgres_db": {
"type": "string",
- "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ "description": "PostgreSQL database"
},
- "environment_uuid": {
+ "postgres_initdb_args": {
"type": "string",
- "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ "description": "PostgreSQL initdb args"
},
- "destination_uuid": {
+ "postgres_host_auth_method": {
"type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
+ "description": "PostgreSQL host auth method"
},
- "dragonfly_password": {
+ "postgres_conf": {
"type": "string",
- "description": "DragonFly password"
+ "description": "PostgreSQL conf"
},
- "name": {
+ "clickhouse_admin_user": {
"type": "string",
- "description": "Name of the database"
+ "description": "Clickhouse admin user"
},
- "description": {
+ "clickhouse_admin_password": {
"type": "string",
- "description": "Description of the database"
+ "description": "Clickhouse admin password"
},
- "image": {
+ "dragonfly_password": {
"type": "string",
- "description": "Docker Image of the database"
- },
- "is_public": {
- "type": "boolean",
- "description": "Is the database public?"
- },
- "public_port": {
- "type": "integer",
- "description": "Public port of the database"
+ "description": "DragonFly password"
},
- "limits_memory": {
+ "redis_password": {
"type": "string",
- "description": "Memory limit of the database"
+ "description": "Redis password"
},
- "limits_memory_swap": {
+ "redis_conf": {
"type": "string",
- "description": "Memory swap limit of the database"
+ "description": "Redis conf"
},
- "limits_memory_swappiness": {
- "type": "integer",
- "description": "Memory swappiness of the database"
- },
- "limits_memory_reservation": {
- "type": "string",
- "description": "Memory reservation of the database"
- },
- "limits_cpus": {
- "type": "string",
- "description": "CPU limit of the database"
- },
- "limits_cpuset": {
+ "keydb_password": {
"type": "string",
- "description": "CPU set of the database"
- },
- "limits_cpu_shares": {
- "type": "integer",
- "description": "CPU shares of the database"
+ "description": "KeyDB password"
},
- "instant_deploy": {
- "type": "boolean",
- "description": "Instant deploy the database"
- }
- },
- "type": "object"
- }
- }
- }
- },
- "responses": {
- "200": {
- "description": "Database updated"
- },
- "401": {
- "$ref": "#\/components\/responses\/401"
- },
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
- "422": {
- "$ref": "#\/components\/responses\/422"
- }
- },
- "security": [
- {
- "bearerAuth": []
- }
- ]
- }
- },
- "\/databases\/redis": {
- "post": {
- "tags": [
- "Databases"
- ],
- "summary": "Create (Redis)",
- "description": "Create a new Redis database.",
- "operationId": "create-database-redis",
- "requestBody": {
- "description": "Database data",
- "required": true,
- "content": {
- "application\/json": {
- "schema": {
- "required": [
- "server_uuid",
- "project_uuid",
- "environment_name",
- "environment_uuid"
- ],
- "properties": {
- "server_uuid": {
+ "keydb_conf": {
"type": "string",
- "description": "UUID of the server"
+ "description": "KeyDB conf"
},
- "project_uuid": {
+ "mariadb_conf": {
"type": "string",
- "description": "UUID of the project"
+ "description": "MariaDB conf"
},
- "environment_name": {
+ "mariadb_root_password": {
"type": "string",
- "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ "description": "MariaDB root password"
},
- "environment_uuid": {
+ "mariadb_user": {
"type": "string",
- "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ "description": "MariaDB user"
},
- "destination_uuid": {
+ "mariadb_password": {
"type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
+ "description": "MariaDB password"
},
- "redis_password": {
+ "mariadb_database": {
"type": "string",
- "description": "Redis password"
+ "description": "MariaDB database"
},
- "redis_conf": {
+ "mongo_conf": {
"type": "string",
- "description": "Redis conf"
+ "description": "Mongo conf"
},
- "name": {
+ "mongo_initdb_root_username": {
"type": "string",
- "description": "Name of the database"
+ "description": "Mongo initdb root username"
},
- "description": {
+ "mongo_initdb_root_password": {
"type": "string",
- "description": "Description of the database"
+ "description": "Mongo initdb root password"
},
- "image": {
+ "mongo_initdb_database": {
"type": "string",
- "description": "Docker Image of the database"
- },
- "is_public": {
- "type": "boolean",
- "description": "Is the database public?"
- },
- "public_port": {
- "type": "integer",
- "description": "Public port of the database"
+ "description": "Mongo initdb init database"
},
- "limits_memory": {
+ "mysql_root_password": {
"type": "string",
- "description": "Memory limit of the database"
+ "description": "MySQL root password"
},
- "limits_memory_swap": {
+ "mysql_password": {
"type": "string",
- "description": "Memory swap limit of the database"
- },
- "limits_memory_swappiness": {
- "type": "integer",
- "description": "Memory swappiness of the database"
+ "description": "MySQL password"
},
- "limits_memory_reservation": {
+ "mysql_user": {
"type": "string",
- "description": "Memory reservation of the database"
+ "description": "MySQL user"
},
- "limits_cpus": {
+ "mysql_database": {
"type": "string",
- "description": "CPU limit of the database"
+ "description": "MySQL database"
},
- "limits_cpuset": {
+ "mysql_conf": {
"type": "string",
- "description": "CPU set of the database"
- },
- "limits_cpu_shares": {
- "type": "integer",
- "description": "CPU shares of the database"
- },
- "instant_deploy": {
- "type": "boolean",
- "description": "Instant deploy the database"
+ "description": "MySQL conf"
}
},
"type": "object"
@@ -4571,6 +4228,9 @@
"400": {
"$ref": "#\/components\/responses\/400"
},
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ },
"422": {
"$ref": "#\/components\/responses\/422"
}
@@ -4582,106 +4242,172 @@
]
}
},
- "\/databases\/keydb": {
- "post": {
+ "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}": {
+ "delete": {
"tags": [
"Databases"
],
- "summary": "Create (KeyDB)",
- "description": "Create a new KeyDB database.",
- "operationId": "create-database-keydb",
- "requestBody": {
- "description": "Database data",
- "required": true,
- "content": {
- "application\/json": {
- "schema": {
- "required": [
- "server_uuid",
- "project_uuid",
- "environment_name",
- "environment_uuid"
- ],
- "properties": {
- "server_uuid": {
- "type": "string",
- "description": "UUID of the server"
- },
- "project_uuid": {
- "type": "string",
- "description": "UUID of the project"
- },
- "environment_name": {
- "type": "string",
- "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
- },
- "environment_uuid": {
- "type": "string",
- "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ "summary": "Delete backup configuration",
+ "description": "Deletes a backup configuration and all its executions.",
+ "operationId": "delete-backup-configuration-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "scheduled_backup_uuid",
+ "in": "path",
+ "description": "UUID of the backup configuration to delete",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ {
+ "name": "delete_s3",
+ "in": "query",
+ "description": "Whether to delete all backup files from S3",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": false
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Backup configuration deleted.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Backup configuration and all executions deleted."
+ }
},
- "destination_uuid": {
- "type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
+ "type": "object"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Backup configuration not found.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Backup configuration not found."
+ }
},
- "keydb_password": {
- "type": "string",
- "description": "KeyDB password"
+ "type": "object"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ },
+ "patch": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Update",
+ "description": "Update a specific backup configuration for a given database, identified by its UUID and the backup ID",
+ "operationId": "update-database-backup",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ {
+ "name": "scheduled_backup_uuid",
+ "in": "path",
+ "description": "UUID of the backup configuration.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "requestBody": {
+ "description": "Database backup configuration data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "save_s3": {
+ "type": "boolean",
+ "description": "Whether data is saved in s3 or not"
},
- "keydb_conf": {
+ "s3_storage_uuid": {
"type": "string",
- "description": "KeyDB conf"
+ "description": "S3 storage UUID"
},
- "name": {
- "type": "string",
- "description": "Name of the database"
+ "backup_now": {
+ "type": "boolean",
+ "description": "Whether to take a backup now or not"
},
- "description": {
- "type": "string",
- "description": "Description of the database"
+ "enabled": {
+ "type": "boolean",
+ "description": "Whether the backup is enabled or not"
},
- "image": {
+ "databases_to_backup": {
"type": "string",
- "description": "Docker Image of the database"
+ "description": "Comma separated list of databases to backup"
},
- "is_public": {
+ "dump_all": {
"type": "boolean",
- "description": "Is the database public?"
- },
- "public_port": {
- "type": "integer",
- "description": "Public port of the database"
- },
- "limits_memory": {
- "type": "string",
- "description": "Memory limit of the database"
+ "description": "Whether all databases are dumped or not"
},
- "limits_memory_swap": {
+ "frequency": {
"type": "string",
- "description": "Memory swap limit of the database"
+ "description": "Frequency of the backup"
},
- "limits_memory_swappiness": {
+ "database_backup_retention_amount_locally": {
"type": "integer",
- "description": "Memory swappiness of the database"
+ "description": "Retention amount of the backup locally"
},
- "limits_memory_reservation": {
- "type": "string",
- "description": "Memory reservation of the database"
+ "database_backup_retention_days_locally": {
+ "type": "integer",
+ "description": "Retention days of the backup locally"
},
- "limits_cpus": {
- "type": "string",
- "description": "CPU limit of the database"
+ "database_backup_retention_max_storage_locally": {
+ "type": "integer",
+ "description": "Max storage of the backup locally"
},
- "limits_cpuset": {
- "type": "string",
- "description": "CPU set of the database"
+ "database_backup_retention_amount_s3": {
+ "type": "integer",
+ "description": "Retention amount of the backup in s3"
},
- "limits_cpu_shares": {
+ "database_backup_retention_days_s3": {
"type": "integer",
- "description": "CPU shares of the database"
+ "description": "Retention days of the backup in s3"
},
- "instant_deploy": {
- "type": "boolean",
- "description": "Instant deploy the database"
+ "database_backup_retention_max_storage_s3": {
+ "type": "integer",
+ "description": "Max storage of the backup in S3"
}
},
"type": "object"
@@ -4691,7 +4417,7 @@
},
"responses": {
"200": {
- "description": "Database updated"
+ "description": "Database backup configuration updated"
},
"401": {
"$ref": "#\/components\/responses\/401"
@@ -4699,6 +4425,9 @@
"400": {
"$ref": "#\/components\/responses\/400"
},
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ },
"422": {
"$ref": "#\/components\/responses\/422"
}
@@ -4710,14 +4439,14 @@
]
}
},
- "\/databases\/mariadb": {
+ "\/databases\/postgresql": {
"post": {
"tags": [
"Databases"
],
- "summary": "Create (MariaDB)",
- "description": "Create a new MariaDB database.",
- "operationId": "create-database-mariadb",
+ "summary": "Create (PostgreSQL)",
+ "description": "Create a new PostgreSQL database.",
+ "operationId": "create-database-postgresql",
"requestBody": {
"description": "Database data",
"required": true,
@@ -4747,29 +4476,33 @@
"type": "string",
"description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
},
- "destination_uuid": {
+ "postgres_user": {
"type": "string",
- "description": "UUID of the destination if the server has multiple destinations"
+ "description": "PostgreSQL user"
},
- "mariadb_conf": {
+ "postgres_password": {
"type": "string",
- "description": "MariaDB conf"
+ "description": "PostgreSQL password"
},
- "mariadb_root_password": {
+ "postgres_db": {
"type": "string",
- "description": "MariaDB root password"
+ "description": "PostgreSQL database"
},
- "mariadb_user": {
+ "postgres_initdb_args": {
"type": "string",
- "description": "MariaDB user"
+ "description": "PostgreSQL initdb args"
},
- "mariadb_password": {
+ "postgres_host_auth_method": {
"type": "string",
- "description": "MariaDB password"
+ "description": "PostgreSQL host auth method"
},
- "mariadb_database": {
+ "postgres_conf": {
"type": "string",
- "description": "MariaDB database"
+ "description": "PostgreSQL conf"
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
},
"name": {
"type": "string",
@@ -4850,14 +4583,14 @@
]
}
},
- "\/databases\/mysql": {
+ "\/databases\/clickhouse": {
"post": {
"tags": [
"Databases"
],
- "summary": "Create (MySQL)",
- "description": "Create a new MySQL database.",
- "operationId": "create-database-mysql",
+ "summary": "Create (Clickhouse)",
+ "description": "Create a new Clickhouse database.",
+ "operationId": "create-database-clickhouse",
"requestBody": {
"description": "Database data",
"required": true,
@@ -4891,25 +4624,13 @@
"type": "string",
"description": "UUID of the destination if the server has multiple destinations"
},
- "mysql_root_password": {
- "type": "string",
- "description": "MySQL root password"
- },
- "mysql_password": {
- "type": "string",
- "description": "MySQL password"
- },
- "mysql_user": {
- "type": "string",
- "description": "MySQL user"
- },
- "mysql_database": {
+ "clickhouse_admin_user": {
"type": "string",
- "description": "MySQL database"
+ "description": "Clickhouse admin user"
},
- "mysql_conf": {
+ "clickhouse_admin_password": {
"type": "string",
- "description": "MySQL conf"
+ "description": "Clickhouse admin password"
},
"name": {
"type": "string",
@@ -4990,14 +4711,14 @@
]
}
},
- "\/databases\/mongodb": {
+ "\/databases\/dragonfly": {
"post": {
"tags": [
"Databases"
],
- "summary": "Create (MongoDB)",
- "description": "Create a new MongoDB database.",
- "operationId": "create-database-mongodb",
+ "summary": "Create (DragonFly)",
+ "description": "Create a new DragonFly database.",
+ "operationId": "create-database-dragonfly",
"requestBody": {
"description": "Database data",
"required": true,
@@ -5031,13 +4752,9 @@
"type": "string",
"description": "UUID of the destination if the server has multiple destinations"
},
- "mongo_conf": {
- "type": "string",
- "description": "MongoDB conf"
- },
- "mongo_initdb_root_username": {
+ "dragonfly_password": {
"type": "string",
- "description": "MongoDB initdb root username"
+ "description": "DragonFly password"
},
"name": {
"type": "string",
@@ -5107,8 +4824,949 @@
"400": {
"$ref": "#\/components\/responses\/400"
},
- "422": {
- "$ref": "#\/components\/responses\/422"
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/redis": {
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create (Redis)",
+ "description": "Create a new Redis database.",
+ "operationId": "create-database-redis",
+ "requestBody": {
+ "description": "Database data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "server_uuid",
+ "project_uuid",
+ "environment_name",
+ "environment_uuid"
+ ],
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "description": "UUID of the server"
+ },
+ "project_uuid": {
+ "type": "string",
+ "description": "UUID of the project"
+ },
+ "environment_name": {
+ "type": "string",
+ "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "environment_uuid": {
+ "type": "string",
+ "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
+ },
+ "redis_password": {
+ "type": "string",
+ "description": "Redis password"
+ },
+ "redis_conf": {
+ "type": "string",
+ "description": "Redis conf"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the database"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the database"
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker Image of the database"
+ },
+ "is_public": {
+ "type": "boolean",
+ "description": "Is the database public?"
+ },
+ "public_port": {
+ "type": "integer",
+ "description": "Public port of the database"
+ },
+ "limits_memory": {
+ "type": "string",
+ "description": "Memory limit of the database"
+ },
+ "limits_memory_swap": {
+ "type": "string",
+ "description": "Memory swap limit of the database"
+ },
+ "limits_memory_swappiness": {
+ "type": "integer",
+ "description": "Memory swappiness of the database"
+ },
+ "limits_memory_reservation": {
+ "type": "string",
+ "description": "Memory reservation of the database"
+ },
+ "limits_cpus": {
+ "type": "string",
+ "description": "CPU limit of the database"
+ },
+ "limits_cpuset": {
+ "type": "string",
+ "description": "CPU set of the database"
+ },
+ "limits_cpu_shares": {
+ "type": "integer",
+ "description": "CPU shares of the database"
+ },
+ "instant_deploy": {
+ "type": "boolean",
+ "description": "Instant deploy the database"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Database updated"
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/keydb": {
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create (KeyDB)",
+ "description": "Create a new KeyDB database.",
+ "operationId": "create-database-keydb",
+ "requestBody": {
+ "description": "Database data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "server_uuid",
+ "project_uuid",
+ "environment_name",
+ "environment_uuid"
+ ],
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "description": "UUID of the server"
+ },
+ "project_uuid": {
+ "type": "string",
+ "description": "UUID of the project"
+ },
+ "environment_name": {
+ "type": "string",
+ "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "environment_uuid": {
+ "type": "string",
+ "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
+ },
+ "keydb_password": {
+ "type": "string",
+ "description": "KeyDB password"
+ },
+ "keydb_conf": {
+ "type": "string",
+ "description": "KeyDB conf"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the database"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the database"
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker Image of the database"
+ },
+ "is_public": {
+ "type": "boolean",
+ "description": "Is the database public?"
+ },
+ "public_port": {
+ "type": "integer",
+ "description": "Public port of the database"
+ },
+ "limits_memory": {
+ "type": "string",
+ "description": "Memory limit of the database"
+ },
+ "limits_memory_swap": {
+ "type": "string",
+ "description": "Memory swap limit of the database"
+ },
+ "limits_memory_swappiness": {
+ "type": "integer",
+ "description": "Memory swappiness of the database"
+ },
+ "limits_memory_reservation": {
+ "type": "string",
+ "description": "Memory reservation of the database"
+ },
+ "limits_cpus": {
+ "type": "string",
+ "description": "CPU limit of the database"
+ },
+ "limits_cpuset": {
+ "type": "string",
+ "description": "CPU set of the database"
+ },
+ "limits_cpu_shares": {
+ "type": "integer",
+ "description": "CPU shares of the database"
+ },
+ "instant_deploy": {
+ "type": "boolean",
+ "description": "Instant deploy the database"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Database updated"
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/mariadb": {
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create (MariaDB)",
+ "description": "Create a new MariaDB database.",
+ "operationId": "create-database-mariadb",
+ "requestBody": {
+ "description": "Database data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "server_uuid",
+ "project_uuid",
+ "environment_name",
+ "environment_uuid"
+ ],
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "description": "UUID of the server"
+ },
+ "project_uuid": {
+ "type": "string",
+ "description": "UUID of the project"
+ },
+ "environment_name": {
+ "type": "string",
+ "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "environment_uuid": {
+ "type": "string",
+ "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
+ },
+ "mariadb_conf": {
+ "type": "string",
+ "description": "MariaDB conf"
+ },
+ "mariadb_root_password": {
+ "type": "string",
+ "description": "MariaDB root password"
+ },
+ "mariadb_user": {
+ "type": "string",
+ "description": "MariaDB user"
+ },
+ "mariadb_password": {
+ "type": "string",
+ "description": "MariaDB password"
+ },
+ "mariadb_database": {
+ "type": "string",
+ "description": "MariaDB database"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the database"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the database"
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker Image of the database"
+ },
+ "is_public": {
+ "type": "boolean",
+ "description": "Is the database public?"
+ },
+ "public_port": {
+ "type": "integer",
+ "description": "Public port of the database"
+ },
+ "limits_memory": {
+ "type": "string",
+ "description": "Memory limit of the database"
+ },
+ "limits_memory_swap": {
+ "type": "string",
+ "description": "Memory swap limit of the database"
+ },
+ "limits_memory_swappiness": {
+ "type": "integer",
+ "description": "Memory swappiness of the database"
+ },
+ "limits_memory_reservation": {
+ "type": "string",
+ "description": "Memory reservation of the database"
+ },
+ "limits_cpus": {
+ "type": "string",
+ "description": "CPU limit of the database"
+ },
+ "limits_cpuset": {
+ "type": "string",
+ "description": "CPU set of the database"
+ },
+ "limits_cpu_shares": {
+ "type": "integer",
+ "description": "CPU shares of the database"
+ },
+ "instant_deploy": {
+ "type": "boolean",
+ "description": "Instant deploy the database"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Database updated"
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/mysql": {
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create (MySQL)",
+ "description": "Create a new MySQL database.",
+ "operationId": "create-database-mysql",
+ "requestBody": {
+ "description": "Database data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "server_uuid",
+ "project_uuid",
+ "environment_name",
+ "environment_uuid"
+ ],
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "description": "UUID of the server"
+ },
+ "project_uuid": {
+ "type": "string",
+ "description": "UUID of the project"
+ },
+ "environment_name": {
+ "type": "string",
+ "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "environment_uuid": {
+ "type": "string",
+ "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
+ },
+ "mysql_root_password": {
+ "type": "string",
+ "description": "MySQL root password"
+ },
+ "mysql_password": {
+ "type": "string",
+ "description": "MySQL password"
+ },
+ "mysql_user": {
+ "type": "string",
+ "description": "MySQL user"
+ },
+ "mysql_database": {
+ "type": "string",
+ "description": "MySQL database"
+ },
+ "mysql_conf": {
+ "type": "string",
+ "description": "MySQL conf"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the database"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the database"
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker Image of the database"
+ },
+ "is_public": {
+ "type": "boolean",
+ "description": "Is the database public?"
+ },
+ "public_port": {
+ "type": "integer",
+ "description": "Public port of the database"
+ },
+ "limits_memory": {
+ "type": "string",
+ "description": "Memory limit of the database"
+ },
+ "limits_memory_swap": {
+ "type": "string",
+ "description": "Memory swap limit of the database"
+ },
+ "limits_memory_swappiness": {
+ "type": "integer",
+ "description": "Memory swappiness of the database"
+ },
+ "limits_memory_reservation": {
+ "type": "string",
+ "description": "Memory reservation of the database"
+ },
+ "limits_cpus": {
+ "type": "string",
+ "description": "CPU limit of the database"
+ },
+ "limits_cpuset": {
+ "type": "string",
+ "description": "CPU set of the database"
+ },
+ "limits_cpu_shares": {
+ "type": "integer",
+ "description": "CPU shares of the database"
+ },
+ "instant_deploy": {
+ "type": "boolean",
+ "description": "Instant deploy the database"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Database updated"
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/mongodb": {
+ "post": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Create (MongoDB)",
+ "description": "Create a new MongoDB database.",
+ "operationId": "create-database-mongodb",
+ "requestBody": {
+ "description": "Database data",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "server_uuid",
+ "project_uuid",
+ "environment_name",
+ "environment_uuid"
+ ],
+ "properties": {
+ "server_uuid": {
+ "type": "string",
+ "description": "UUID of the server"
+ },
+ "project_uuid": {
+ "type": "string",
+ "description": "UUID of the project"
+ },
+ "environment_name": {
+ "type": "string",
+ "description": "Name of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "environment_uuid": {
+ "type": "string",
+ "description": "UUID of the environment. You need to provide at least one of environment_name or environment_uuid."
+ },
+ "destination_uuid": {
+ "type": "string",
+ "description": "UUID of the destination if the server has multiple destinations"
+ },
+ "mongo_conf": {
+ "type": "string",
+ "description": "MongoDB conf"
+ },
+ "mongo_initdb_root_username": {
+ "type": "string",
+ "description": "MongoDB initdb root username"
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the database"
+ },
+ "description": {
+ "type": "string",
+ "description": "Description of the database"
+ },
+ "image": {
+ "type": "string",
+ "description": "Docker Image of the database"
+ },
+ "is_public": {
+ "type": "boolean",
+ "description": "Is the database public?"
+ },
+ "public_port": {
+ "type": "integer",
+ "description": "Public port of the database"
+ },
+ "limits_memory": {
+ "type": "string",
+ "description": "Memory limit of the database"
+ },
+ "limits_memory_swap": {
+ "type": "string",
+ "description": "Memory swap limit of the database"
+ },
+ "limits_memory_swappiness": {
+ "type": "integer",
+ "description": "Memory swappiness of the database"
+ },
+ "limits_memory_reservation": {
+ "type": "string",
+ "description": "Memory reservation of the database"
+ },
+ "limits_cpus": {
+ "type": "string",
+ "description": "CPU limit of the database"
+ },
+ "limits_cpuset": {
+ "type": "string",
+ "description": "CPU set of the database"
+ },
+ "limits_cpu_shares": {
+ "type": "integer",
+ "description": "CPU shares of the database"
+ },
+ "instant_deploy": {
+ "type": "boolean",
+ "description": "Instant deploy the database"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Database updated"
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "422": {
+ "$ref": "#\/components\/responses\/422"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}\/executions\/{execution_uuid}": {
+ "delete": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Delete backup execution",
+ "description": "Deletes a specific backup execution.",
+ "operationId": "delete-backup-execution-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "scheduled_backup_uuid",
+ "in": "path",
+ "description": "UUID of the backup configuration",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ {
+ "name": "execution_uuid",
+ "in": "path",
+ "description": "UUID of the backup execution to delete",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ },
+ {
+ "name": "delete_s3",
+ "in": "query",
+ "description": "Whether to delete the backup from S3",
+ "required": false,
+ "schema": {
+ "type": "boolean",
+ "default": false
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Backup execution deleted.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Backup execution deleted."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Backup execution not found.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Backup execution not found."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}\/executions": {
+ "get": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "List backup executions",
+ "description": "Get all executions for a specific backup configuration.",
+ "operationId": "list-backup-executions",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "scheduled_backup_uuid",
+ "in": "path",
+ "description": "UUID of the backup configuration",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of backup executions",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "executions": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "uuid": {
+ "type": "string"
+ },
+ "filename": {
+ "type": "string"
+ },
+ "size": {
+ "type": "integer"
+ },
+ "created_at": {
+ "type": "string"
+ },
+ "message": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Backup configuration not found."
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/{uuid}\/start": {
+ "get": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Start",
+ "description": "Start database. `Post` request is also accepted.",
+ "operationId": "start-database-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Start database.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Database starting request queued."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/databases\/{uuid}\/stop": {
+ "get": {
+ "tags": [
+ "Databases"
+ ],
+ "summary": "Stop",
+ "description": "Stop database. `Post` request is also accepted.",
+ "operationId": "stop-database-by-uuid",
+ "parameters": [
+ {
+ "name": "uuid",
+ "in": "path",
+ "description": "UUID of the database.",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "format": "uuid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Stop database.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Database stopping request queued."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
+ "404": {
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5118,65 +5776,36 @@
]
}
},
- "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}\/executions\/{execution_uuid}": {
- "delete": {
+ "\/databases\/{uuid}\/restart": {
+ "get": {
"tags": [
"Databases"
],
- "summary": "Delete backup execution",
- "description": "Deletes a specific backup execution.",
- "operationId": "delete-backup-execution-by-uuid",
+ "summary": "Restart",
+ "description": "Restart database. `Post` request is also accepted.",
+ "operationId": "restart-database-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "scheduled_backup_uuid",
- "in": "path",
- "description": "UUID of the backup configuration",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
- },
- {
- "name": "execution_uuid",
- "in": "path",
- "description": "UUID of the backup execution to delete",
+ "description": "UUID of the database.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
- },
- {
- "name": "delete_s3",
- "in": "query",
- "description": "Whether to delete the backup from S3",
- "required": false,
- "schema": {
- "type": "boolean",
- "default": false
- }
}
],
"responses": {
"200": {
- "description": "Backup execution deleted.",
+ "description": "Restart database.",
"content": {
"application\/json": {
"schema": {
"properties": {
"message": {
"type": "string",
- "example": "Backup execution deleted."
+ "example": "Database restaring request queued."
}
},
"type": "object"
@@ -5184,21 +5813,50 @@
}
}
},
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
"404": {
- "description": "Backup execution not found.",
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/deployments": {
+ "get": {
+ "tags": [
+ "Deployments"
+ ],
+ "summary": "List",
+ "description": "List currently running deployments",
+ "operationId": "list-deployments",
+ "responses": {
+ "200": {
+ "description": "Get all currently running deployments.",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "Backup execution not found."
- }
- },
- "type": "object"
+ "type": "array",
+ "items": {
+ "$ref": "#\/components\/schemas\/ApplicationDeploymentQueue"
+ }
}
}
}
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
}
},
"security": [
@@ -5208,76 +5866,44 @@
]
}
},
- "\/databases\/{uuid}\/backups\/{scheduled_backup_uuid}\/executions": {
+ "\/deployments\/{uuid}": {
"get": {
"tags": [
- "Databases"
+ "Deployments"
],
- "summary": "List backup executions",
- "description": "Get all executions for a specific backup configuration.",
- "operationId": "list-backup-executions",
+ "summary": "Get",
+ "description": "Get deployment by UUID.",
+ "operationId": "get-deployment-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database",
+ "description": "Deployment UUID",
"required": true,
"schema": {
"type": "string"
}
- },
- {
- "name": "scheduled_backup_uuid",
- "in": "path",
- "description": "UUID of the backup configuration",
- "required": true,
- "schema": {
- "type": "string",
- "format": "uuid"
- }
}
],
"responses": {
"200": {
- "description": "List of backup executions",
+ "description": "Get deployment by UUID.",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "executions": {
- "type": "array",
- "items": {
- "properties": {
- "uuid": {
- "type": "string"
- },
- "filename": {
- "type": "string"
- },
- "size": {
- "type": "integer"
- },
- "created_at": {
- "type": "string"
- },
- "message": {
- "type": "string"
- },
- "status": {
- "type": "string"
- }
- },
- "type": "object"
- }
- }
- },
- "type": "object"
+ "$ref": "#\/components\/schemas\/ApplicationDeploymentQueue"
}
}
}
},
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
"404": {
- "description": "Backup configuration not found."
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5287,36 +5913,59 @@
]
}
},
- "\/databases\/{uuid}\/start": {
- "get": {
+ "\/deployments\/{uuid}\/cancel": {
+ "post": {
"tags": [
- "Databases"
+ "Deployments"
],
- "summary": "Start",
- "description": "Start database. `Post` request is also accepted.",
- "operationId": "start-database-by-uuid",
+ "summary": "Cancel",
+ "description": "Cancel a deployment by UUID.",
+ "operationId": "cancel-deployment-by-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database.",
+ "description": "Deployment UUID",
"required": true,
"schema": {
- "type": "string",
- "format": "uuid"
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Start database.",
+ "description": "Deployment cancelled successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
"message": {
"type": "string",
- "example": "Database starting request queued."
+ "example": "Deployment cancelled successfully."
+ },
+ "deployment_uuid": {
+ "type": "string",
+ "example": "cm37r6cqj000008jm0veg5tkm"
+ },
+ "status": {
+ "type": "string",
+ "example": "cancelled-by-user"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Deployment cannot be cancelled (already finished\/failed\/cancelled).",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "Deployment cannot be cancelled. Current status: finished"
}
},
"type": "object"
@@ -5327,8 +5976,21 @@
"401": {
"$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
+ "403": {
+ "description": "User doesn't have permission to cancel this deployment.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "You do not have permission to cancel this deployment."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
},
"404": {
"$ref": "#\/components\/responses\/404"
@@ -5341,36 +6003,71 @@
]
}
},
- "\/databases\/{uuid}\/stop": {
+ "\/deploy": {
"get": {
"tags": [
- "Databases"
+ "Deployments"
],
- "summary": "Stop",
- "description": "Stop database. `Post` request is also accepted.",
- "operationId": "stop-database-by-uuid",
+ "summary": "Deploy",
+ "description": "Deploy by tag or uuid. `Post` request also accepted with `uuid` and `tag` json body.",
+ "operationId": "deploy-by-tag-or-uuid",
"parameters": [
+ {
+ "name": "tag",
+ "in": "query",
+ "description": "Tag name(s). Comma separated list is also accepted.",
+ "schema": {
+ "type": "string"
+ }
+ },
{
"name": "uuid",
- "in": "path",
- "description": "UUID of the database.",
- "required": true,
+ "in": "query",
+ "description": "Resource UUID(s). Comma separated list is also accepted.",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "force",
+ "in": "query",
+ "description": "Force rebuild (without cache)",
+ "schema": {
+ "type": "boolean"
+ }
+ },
+ {
+ "name": "pr",
+ "in": "query",
+ "description": "Pull Request Id for deploying specific PR builds. Cannot be used with tag parameter.",
"schema": {
- "type": "string",
- "format": "uuid"
+ "type": "integer"
}
}
],
"responses": {
"200": {
- "description": "Stop database.",
+ "description": "Get deployment(s) UUID's",
"content": {
"application\/json": {
"schema": {
"properties": {
- "message": {
- "type": "string",
- "example": "Database stopping request queued."
+ "deployments": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "resource_uuid": {
+ "type": "string"
+ },
+ "deployment_uuid": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
},
"type": "object"
@@ -5383,9 +6080,6 @@
},
"400": {
"$ref": "#\/components\/responses\/400"
- },
- "404": {
- "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5395,77 +6089,57 @@
]
}
},
- "\/databases\/{uuid}\/restart": {
+ "\/deployments\/applications\/{uuid}": {
"get": {
"tags": [
- "Databases"
+ "Deployments"
],
- "summary": "Restart",
- "description": "Restart database. `Post` request is also accepted.",
- "operationId": "restart-database-by-uuid",
+ "summary": "List application deployments",
+ "description": "List application deployments by using the app uuid",
+ "operationId": "list-deployments-by-app-uuid",
"parameters": [
{
"name": "uuid",
"in": "path",
- "description": "UUID of the database.",
+ "description": "UUID of the application.",
"required": true,
"schema": {
"type": "string",
"format": "uuid"
}
- }
- ],
- "responses": {
- "200": {
- "description": "Restart database.",
- "content": {
- "application\/json": {
- "schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "Database restaring request queued."
- }
- },
- "type": "object"
- }
- }
- }
- },
- "401": {
- "$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
+ {
+ "name": "skip",
+ "in": "query",
+ "description": "Number of records to skip.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "default": 0,
+ "minimum": 0
+ }
},
- "404": {
- "$ref": "#\/components\/responses\/404"
- }
- },
- "security": [
{
- "bearerAuth": []
+ "name": "take",
+ "in": "query",
+ "description": "Number of records to take.",
+ "required": false,
+ "schema": {
+ "type": "integer",
+ "default": 10,
+ "minimum": 1
+ }
}
- ]
- }
- },
- "\/deployments": {
- "get": {
- "tags": [
- "Deployments"
],
- "summary": "List",
- "description": "List currently running deployments",
- "operationId": "list-deployments",
"responses": {
"200": {
- "description": "Get all currently running deployments.",
+ "description": "List application deployments by using the app uuid.",
"content": {
"application\/json": {
"schema": {
"type": "array",
"items": {
- "$ref": "#\/components\/schemas\/ApplicationDeploymentQueue"
+ "$ref": "#\/components\/schemas\/Application"
}
}
}
@@ -5485,32 +6159,75 @@
]
}
},
- "\/deployments\/{uuid}": {
+ "\/github-apps": {
"get": {
"tags": [
- "Deployments"
- ],
- "summary": "Get",
- "description": "Get deployment by UUID.",
- "operationId": "get-deployment-by-uuid",
- "parameters": [
- {
- "name": "uuid",
- "in": "path",
- "description": "Deployment UUID",
- "required": true,
- "schema": {
- "type": "string"
- }
- }
+ "GitHub Apps"
],
+ "summary": "List",
+ "description": "List all GitHub apps.",
+ "operationId": "list-github-apps",
"responses": {
"200": {
- "description": "Get deployment by UUID.",
+ "description": "List of GitHub apps.",
"content": {
"application\/json": {
"schema": {
- "$ref": "#\/components\/schemas\/ApplicationDeploymentQueue"
+ "type": "array",
+ "items": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "uuid": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "organization": {
+ "type": "string",
+ "nullable": true
+ },
+ "api_url": {
+ "type": "string"
+ },
+ "html_url": {
+ "type": "string"
+ },
+ "custom_user": {
+ "type": "string"
+ },
+ "custom_port": {
+ "type": "integer"
+ },
+ "app_id": {
+ "type": "integer"
+ },
+ "installation_id": {
+ "type": "integer"
+ },
+ "client_id": {
+ "type": "string"
+ },
+ "private_key_id": {
+ "type": "integer"
+ },
+ "is_system_wide": {
+ "type": "boolean"
+ },
+ "is_public": {
+ "type": "boolean"
+ },
+ "team_id": {
+ "type": "integer"
+ },
+ "type": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
}
}
@@ -5520,9 +6237,6 @@
},
"400": {
"$ref": "#\/components\/responses\/400"
- },
- "404": {
- "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5530,45 +6244,139 @@
"bearerAuth": []
}
]
- }
- },
- "\/deployments\/{uuid}\/cancel": {
+ },
"post": {
"tags": [
- "Deployments"
+ "GitHub Apps"
],
- "summary": "Cancel",
- "description": "Cancel a deployment by UUID.",
- "operationId": "cancel-deployment-by-uuid",
- "parameters": [
- {
- "name": "uuid",
- "in": "path",
- "description": "Deployment UUID",
- "required": true,
- "schema": {
- "type": "string"
+ "summary": "Create GitHub App",
+ "description": "Create a new GitHub app.",
+ "operationId": "create-github-app",
+ "requestBody": {
+ "description": "GitHub app creation payload.",
+ "required": true,
+ "content": {
+ "application\/json": {
+ "schema": {
+ "required": [
+ "name",
+ "api_url",
+ "html_url",
+ "app_id",
+ "installation_id",
+ "client_id",
+ "client_secret",
+ "private_key_uuid"
+ ],
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "Name of the GitHub app."
+ },
+ "organization": {
+ "type": "string",
+ "nullable": true,
+ "description": "Organization to associate the app with."
+ },
+ "api_url": {
+ "type": "string",
+ "description": "API URL for the GitHub app (e.g., https:\/\/api.github.com)."
+ },
+ "html_url": {
+ "type": "string",
+ "description": "HTML URL for the GitHub app (e.g., https:\/\/github.com)."
+ },
+ "custom_user": {
+ "type": "string",
+ "description": "Custom user for SSH access (default: git)."
+ },
+ "custom_port": {
+ "type": "integer",
+ "description": "Custom port for SSH access (default: 22)."
+ },
+ "app_id": {
+ "type": "integer",
+ "description": "GitHub App ID from GitHub."
+ },
+ "installation_id": {
+ "type": "integer",
+ "description": "GitHub Installation ID."
+ },
+ "client_id": {
+ "type": "string",
+ "description": "GitHub OAuth App Client ID."
+ },
+ "client_secret": {
+ "type": "string",
+ "description": "GitHub OAuth App Client Secret."
+ },
+ "webhook_secret": {
+ "type": "string",
+ "description": "Webhook secret for GitHub webhooks."
+ },
+ "private_key_uuid": {
+ "type": "string",
+ "description": "UUID of an existing private key for GitHub App authentication."
+ },
+ "is_system_wide": {
+ "type": "boolean",
+ "description": "Is this app system-wide (cloud only)."
+ }
+ },
+ "type": "object"
+ }
}
}
- ],
+ },
"responses": {
- "200": {
- "description": "Deployment cancelled successfully.",
+ "201": {
+ "description": "GitHub app created successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
- "message": {
- "type": "string",
- "example": "Deployment cancelled successfully."
+ "id": {
+ "type": "integer"
},
- "deployment_uuid": {
- "type": "string",
- "example": "cm37r6cqj000008jm0veg5tkm"
+ "uuid": {
+ "type": "string"
},
- "status": {
+ "name": {
+ "type": "string"
+ },
+ "organization": {
"type": "string",
- "example": "cancelled-by-user"
+ "nullable": true
+ },
+ "api_url": {
+ "type": "string"
+ },
+ "html_url": {
+ "type": "string"
+ },
+ "custom_user": {
+ "type": "string"
+ },
+ "custom_port": {
+ "type": "integer"
+ },
+ "app_id": {
+ "type": "integer"
+ },
+ "installation_id": {
+ "type": "integer"
+ },
+ "client_id": {
+ "type": "string"
+ },
+ "private_key_id": {
+ "type": "integer"
+ },
+ "is_system_wide": {
+ "type": "boolean"
+ },
+ "team_id": {
+ "type": "integer"
}
},
"type": "object"
@@ -5577,42 +6385,13 @@
}
},
"400": {
- "description": "Deployment cannot be cancelled (already finished\/failed\/cancelled).",
- "content": {
- "application\/json": {
- "schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "Deployment cannot be cancelled. Current status: finished"
- }
- },
- "type": "object"
- }
- }
- }
+ "$ref": "#\/components\/responses\/400"
},
"401": {
"$ref": "#\/components\/responses\/401"
},
- "403": {
- "description": "User doesn't have permission to cancel this deployment.",
- "content": {
- "application\/json": {
- "schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "You do not have permission to cancel this deployment."
- }
- },
- "type": "object"
- }
- }
- }
- },
- "404": {
- "$ref": "#\/components\/responses\/404"
+ "422": {
+ "$ref": "#\/components\/responses\/422"
}
},
"security": [
@@ -5622,43 +6401,20 @@
]
}
},
- "\/deploy": {
+ "\/github-apps\/{github_app_id}\/repositories": {
"get": {
"tags": [
- "Deployments"
+ "GitHub Apps"
],
- "summary": "Deploy",
- "description": "Deploy by tag or uuid. `Post` request also accepted with `uuid` and `tag` json body.",
- "operationId": "deploy-by-tag-or-uuid",
+ "summary": "Load Repositories for a GitHub App",
+ "description": "Fetch repositories from GitHub for a given GitHub app.",
+ "operationId": "load-repositories",
"parameters": [
{
- "name": "tag",
- "in": "query",
- "description": "Tag name(s). Comma separated list is also accepted.",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "uuid",
- "in": "query",
- "description": "Resource UUID(s). Comma separated list is also accepted.",
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "force",
- "in": "query",
- "description": "Force rebuild (without cache)",
- "schema": {
- "type": "boolean"
- }
- },
- {
- "name": "pr",
- "in": "query",
- "description": "Pull Request Id for deploying specific PR builds. Cannot be used with tag parameter.",
+ "name": "github_app_id",
+ "in": "path",
+ "description": "GitHub App ID",
+ "required": true,
"schema": {
"type": "integer"
}
@@ -5666,25 +6422,14 @@
],
"responses": {
"200": {
- "description": "Get deployment(s) UUID's",
+ "description": "Repositories loaded successfully.",
"content": {
"application\/json": {
"schema": {
"properties": {
- "deployments": {
+ "repositories": {
"type": "array",
"items": {
- "properties": {
- "message": {
- "type": "string"
- },
- "resource_uuid": {
- "type": "string"
- },
- "deployment_uuid": {
- "type": "string"
- }
- },
"type": "object"
}
}
@@ -5694,11 +6439,14 @@
}
}
},
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
"401": {
"$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
+ "404": {
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5708,67 +6456,70 @@
]
}
},
- "\/deployments\/applications\/{uuid}": {
+ "\/github-apps\/{github_app_id}\/repositories\/{owner}\/{repo}\/branches": {
"get": {
"tags": [
- "Deployments"
+ "GitHub Apps"
],
- "summary": "List application deployments",
- "description": "List application deployments by using the app uuid",
- "operationId": "list-deployments-by-app-uuid",
+ "summary": "Load Branches for a GitHub Repository",
+ "description": "Fetch branches from GitHub for a given repository.",
+ "operationId": "load-branches",
"parameters": [
{
- "name": "uuid",
+ "name": "github_app_id",
"in": "path",
- "description": "UUID of the application.",
+ "description": "GitHub App ID",
"required": true,
"schema": {
- "type": "string",
- "format": "uuid"
+ "type": "integer"
}
},
{
- "name": "skip",
- "in": "query",
- "description": "Number of records to skip.",
- "required": false,
+ "name": "owner",
+ "in": "path",
+ "description": "Repository owner",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 0,
- "minimum": 0
+ "type": "string"
}
},
{
- "name": "take",
- "in": "query",
- "description": "Number of records to take.",
- "required": false,
+ "name": "repo",
+ "in": "path",
+ "description": "Repository name",
+ "required": true,
"schema": {
- "type": "integer",
- "default": 10,
- "minimum": 1
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "List application deployments by using the app uuid.",
+ "description": "Branches loaded successfully.",
"content": {
"application\/json": {
"schema": {
- "type": "array",
- "items": {
- "$ref": "#\/components\/schemas\/Application"
- }
+ "properties": {
+ "branches": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ }
+ }
+ },
+ "type": "object"
}
}
}
},
+ "400": {
+ "$ref": "#\/components\/responses\/400"
+ },
"401": {
"$ref": "#\/components\/responses\/401"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
+ "404": {
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -5778,84 +6529,63 @@
]
}
},
- "\/github-apps": {
- "get": {
+ "\/github-apps\/{github_app_id}": {
+ "delete": {
"tags": [
"GitHub Apps"
],
- "summary": "List",
- "description": "List all GitHub apps.",
- "operationId": "list-github-apps",
+ "summary": "Delete GitHub App",
+ "description": "Delete a GitHub app if it's not being used by any applications.",
+ "operationId": "deleteGithubApp",
+ "parameters": [
+ {
+ "name": "github_app_id",
+ "in": "path",
+ "description": "GitHub App ID",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "List of GitHub apps.",
+ "description": "GitHub app deleted successfully",
"content": {
"application\/json": {
"schema": {
- "type": "array",
- "items": {
- "properties": {
- "id": {
- "type": "integer"
- },
- "uuid": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "organization": {
- "type": "string",
- "nullable": true
- },
- "api_url": {
- "type": "string"
- },
- "html_url": {
- "type": "string"
- },
- "custom_user": {
- "type": "string"
- },
- "custom_port": {
- "type": "integer"
- },
- "app_id": {
- "type": "integer"
- },
- "installation_id": {
- "type": "integer"
- },
- "client_id": {
- "type": "string"
- },
- "private_key_id": {
- "type": "integer"
- },
- "is_system_wide": {
- "type": "boolean"
- },
- "is_public": {
- "type": "boolean"
- },
- "team_id": {
- "type": "integer"
- },
- "type": {
- "type": "string"
- }
- },
- "type": "object"
- }
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "GitHub app deleted successfully"
+ }
+ },
+ "type": "object"
}
}
}
},
"401": {
- "$ref": "#\/components\/responses\/401"
+ "description": "Unauthorized"
},
- "400": {
- "$ref": "#\/components\/responses\/400"
+ "404": {
+ "description": "GitHub app not found"
+ },
+ "409": {
+ "description": "Conflict - GitHub app is in use",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "properties": {
+ "message": {
+ "type": "string",
+ "example": "This GitHub app is being used by 5 application(s). Please delete all applications first."
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
}
},
"security": [
@@ -5864,82 +6594,82 @@
}
]
},
- "post": {
+ "patch": {
"tags": [
"GitHub Apps"
],
- "summary": "Create GitHub App",
- "description": "Create a new GitHub app.",
- "operationId": "create-github-app",
+ "summary": "Update GitHub App",
+ "description": "Update an existing GitHub app.",
+ "operationId": "updateGithubApp",
+ "parameters": [
+ {
+ "name": "github_app_id",
+ "in": "path",
+ "description": "GitHub App ID",
+ "required": true,
+ "schema": {
+ "type": "integer"
+ }
+ }
+ ],
"requestBody": {
- "description": "GitHub app creation payload.",
"required": true,
"content": {
"application\/json": {
"schema": {
- "required": [
- "name",
- "api_url",
- "html_url",
- "app_id",
- "installation_id",
- "client_id",
- "client_secret",
- "private_key_uuid"
- ],
"properties": {
"name": {
"type": "string",
- "description": "Name of the GitHub app."
+ "description": "GitHub App name"
},
"organization": {
"type": "string",
"nullable": true,
- "description": "Organization to associate the app with."
+ "description": "GitHub organization"
},
"api_url": {
"type": "string",
- "description": "API URL for the GitHub app (e.g., https:\/\/api.github.com)."
+ "description": "GitHub API URL"
},
"html_url": {
"type": "string",
- "description": "HTML URL for the GitHub app (e.g., https:\/\/github.com)."
+ "description": "GitHub HTML URL"
},
"custom_user": {
"type": "string",
- "description": "Custom user for SSH access (default: git)."
+ "description": "Custom user for SSH"
},
"custom_port": {
"type": "integer",
- "description": "Custom port for SSH access (default: 22)."
+ "description": "Custom port for SSH"
},
"app_id": {
"type": "integer",
- "description": "GitHub App ID from GitHub."
+ "description": "GitHub App ID"
},
"installation_id": {
"type": "integer",
- "description": "GitHub Installation ID."
+ "description": "GitHub Installation ID"
},
"client_id": {
"type": "string",
- "description": "GitHub OAuth App Client ID."
+ "description": "GitHub Client ID"
},
"client_secret": {
"type": "string",
- "description": "GitHub OAuth App Client Secret."
+ "description": "GitHub Client Secret"
},
"webhook_secret": {
"type": "string",
- "description": "Webhook secret for GitHub webhooks."
+ "description": "GitHub Webhook Secret"
},
"private_key_uuid": {
"type": "string",
- "description": "UUID of an existing private key for GitHub App authentication."
+ "description": "Private key UUID"
},
"is_system_wide": {
"type": "boolean",
- "description": "Is this app system-wide (cloud only)."
+ "description": "Is system wide (non-cloud instances only)"
}
},
"type": "object"
@@ -5948,54 +6678,19 @@
}
},
"responses": {
- "201": {
- "description": "GitHub app created successfully.",
+ "200": {
+ "description": "GitHub app updated successfully",
"content": {
"application\/json": {
"schema": {
"properties": {
- "id": {
- "type": "integer"
- },
- "uuid": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "organization": {
+ "message": {
"type": "string",
- "nullable": true
- },
- "api_url": {
- "type": "string"
- },
- "html_url": {
- "type": "string"
- },
- "custom_user": {
- "type": "string"
- },
- "custom_port": {
- "type": "integer"
- },
- "app_id": {
- "type": "integer"
- },
- "installation_id": {
- "type": "integer"
- },
- "client_id": {
- "type": "string"
- },
- "private_key_id": {
- "type": "integer"
- },
- "is_system_wide": {
- "type": "boolean"
+ "example": "GitHub app updated successfully"
},
- "team_id": {
- "type": "integer"
+ "data": {
+ "type": "object",
+ "description": "Updated GitHub app data"
}
},
"type": "object"
@@ -6003,11 +6698,11 @@
}
}
},
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
"401": {
- "$ref": "#\/components\/responses\/401"
+ "description": "Unauthorized"
+ },
+ "404": {
+ "description": "GitHub app not found"
},
"422": {
"$ref": "#\/components\/responses\/422"
@@ -6020,47 +6715,132 @@
]
}
},
- "\/github-apps\/{github_app_id}\/repositories": {
+ "\/hetzner\/locations": {
+ "get": {
+ "tags": [
+ "Hetzner"
+ ],
+ "summary": "Get Hetzner Locations",
+ "description": "Get all available Hetzner datacenter locations.",
+ "operationId": "get-hetzner-locations",
+ "parameters": [
+ {
+ "name": "cloud_provider_token_id",
+ "in": "query",
+ "description": "Cloud provider token UUID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "List of Hetzner locations.",
+ "content": {
+ "application\/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "country": {
+ "type": "string"
+ },
+ "city": {
+ "type": "string"
+ },
+ "latitude": {
+ "type": "number"
+ },
+ "longitude": {
+ "type": "number"
+ }
+ },
+ "type": "object"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#\/components\/responses\/401"
+ },
+ "404": {
+ "$ref": "#\/components\/responses\/404"
+ }
+ },
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ]
+ }
+ },
+ "\/hetzner\/server-types": {
"get": {
"tags": [
- "GitHub Apps"
+ "Hetzner"
],
- "summary": "Load Repositories for a GitHub App",
- "description": "Fetch repositories from GitHub for a given GitHub app.",
- "operationId": "load-repositories",
+ "summary": "Get Hetzner Server Types",
+ "description": "Get all available Hetzner server types (instance sizes).",
+ "operationId": "get-hetzner-server-types",
"parameters": [
{
- "name": "github_app_id",
- "in": "path",
- "description": "GitHub App ID",
+ "name": "cloud_provider_token_id",
+ "in": "query",
+ "description": "Cloud provider token UUID",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Repositories loaded successfully.",
+ "description": "List of Hetzner server types.",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "repositories": {
- "type": "array",
- "items": {
- "type": "object"
+ "type": "array",
+ "items": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "cores": {
+ "type": "integer"
+ },
+ "memory": {
+ "type": "number"
+ },
+ "disk": {
+ "type": "integer"
+ },
+ "prices": {
+ "type": "array"
}
- }
- },
- "type": "object"
+ },
+ "type": "object"
+ }
}
}
}
},
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
"401": {
"$ref": "#\/components\/responses\/401"
},
@@ -6075,37 +6855,19 @@
]
}
},
- "\/github-apps\/{github_app_id}\/repositories\/{owner}\/{repo}\/branches": {
+ "\/hetzner\/images": {
"get": {
"tags": [
- "GitHub Apps"
+ "Hetzner"
],
- "summary": "Load Branches for a GitHub Repository",
- "description": "Fetch branches from GitHub for a given repository.",
- "operationId": "load-branches",
+ "summary": "Get Hetzner Images",
+ "description": "Get all available Hetzner system images (operating systems).",
+ "operationId": "get-hetzner-images",
"parameters": [
{
- "name": "github_app_id",
- "in": "path",
- "description": "GitHub App ID",
- "required": true,
- "schema": {
- "type": "integer"
- }
- },
- {
- "name": "owner",
- "in": "path",
- "description": "Repository owner",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "repo",
- "in": "path",
- "description": "Repository name",
+ "name": "cloud_provider_token_id",
+ "in": "query",
+ "description": "Cloud provider token UUID",
"required": true,
"schema": {
"type": "string"
@@ -6114,26 +6876,41 @@
],
"responses": {
"200": {
- "description": "Branches loaded successfully.",
+ "description": "List of Hetzner images.",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "branches": {
- "type": "array",
- "items": {
- "type": "object"
+ "type": "array",
+ "items": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "os_flavor": {
+ "type": "string"
+ },
+ "os_version": {
+ "type": "string"
+ },
+ "architecture": {
+ "type": "string"
}
- }
- },
- "type": "object"
+ },
+ "type": "object"
+ }
}
}
}
},
- "400": {
- "$ref": "#\/components\/responses\/400"
- },
"401": {
"$ref": "#\/components\/responses\/401"
},
@@ -6148,63 +6925,58 @@
]
}
},
- "\/github-apps\/{github_app_id}": {
- "delete": {
+ "\/hetzner\/ssh-keys": {
+ "get": {
"tags": [
- "GitHub Apps"
+ "Hetzner"
],
- "summary": "Delete GitHub App",
- "description": "Delete a GitHub app if it's not being used by any applications.",
- "operationId": "deleteGithubApp",
+ "summary": "Get Hetzner SSH Keys",
+ "description": "Get all SSH keys stored in the Hetzner account.",
+ "operationId": "get-hetzner-ssh-keys",
"parameters": [
{
- "name": "github_app_id",
- "in": "path",
- "description": "GitHub App ID",
+ "name": "cloud_provider_token_id",
+ "in": "query",
+ "description": "Cloud provider token UUID",
"required": true,
"schema": {
- "type": "integer"
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "GitHub app deleted successfully",
+ "description": "List of Hetzner SSH keys.",
"content": {
"application\/json": {
"schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "GitHub app deleted successfully"
- }
- },
- "type": "object"
+ "type": "array",
+ "items": {
+ "properties": {
+ "id": {
+ "type": "integer"
+ },
+ "name": {
+ "type": "string"
+ },
+ "fingerprint": {
+ "type": "string"
+ },
+ "public_key": {
+ "type": "string"
+ }
+ },
+ "type": "object"
+ }
}
}
}
},
"401": {
- "description": "Unauthorized"
+ "$ref": "#\/components\/responses\/401"
},
"404": {
- "description": "GitHub app not found"
- },
- "409": {
- "description": "Conflict - GitHub app is in use",
- "content": {
- "application\/json": {
- "schema": {
- "properties": {
- "message": {
- "type": "string",
- "example": "This GitHub app is being used by 5 application(s). Please delete all applications first."
- }
- },
- "type": "object"
- }
- }
- }
+ "$ref": "#\/components\/responses\/404"
}
},
"security": [
@@ -6212,83 +6984,85 @@
"bearerAuth": []
}
]
- },
- "patch": {
+ }
+ },
+ "\/servers\/hetzner": {
+ "post": {
"tags": [
- "GitHub Apps"
- ],
- "summary": "Update GitHub App",
- "description": "Update an existing GitHub app.",
- "operationId": "updateGithubApp",
- "parameters": [
- {
- "name": "github_app_id",
- "in": "path",
- "description": "GitHub App ID",
- "required": true,
- "schema": {
- "type": "integer"
- }
- }
+ "Hetzner"
],
+ "summary": "Create Hetzner Server",
+ "description": "Create a new server on Hetzner and register it in Coolify.",
+ "operationId": "create-hetzner-server",
"requestBody": {
+ "description": "Hetzner server creation parameters",
"required": true,
"content": {
"application\/json": {
"schema": {
+ "required": [
+ "cloud_provider_token_id",
+ "location",
+ "server_type",
+ "image",
+ "private_key_uuid"
+ ],
"properties": {
- "name": {
- "type": "string",
- "description": "GitHub App name"
- },
- "organization": {
- "type": "string",
- "nullable": true,
- "description": "GitHub organization"
- },
- "api_url": {
+ "cloud_provider_token_id": {
"type": "string",
- "description": "GitHub API URL"
+ "example": "abc123",
+ "description": "Cloud provider token UUID"
},
- "html_url": {
+ "location": {
"type": "string",
- "description": "GitHub HTML URL"
+ "example": "nbg1",
+ "description": "Hetzner location name"
},
- "custom_user": {
+ "server_type": {
"type": "string",
- "description": "Custom user for SSH"
- },
- "custom_port": {
- "type": "integer",
- "description": "Custom port for SSH"
- },
- "app_id": {
- "type": "integer",
- "description": "GitHub App ID"
+ "example": "cx11",
+ "description": "Hetzner server type name"
},
- "installation_id": {
+ "image": {
"type": "integer",
- "description": "GitHub Installation ID"
+ "example": 15512617,
+ "description": "Hetzner image ID"
},
- "client_id": {
+ "name": {
"type": "string",
- "description": "GitHub Client ID"
+ "example": "my-server",
+ "description": "Server name (auto-generated if not provided)"
},
- "client_secret": {
+ "private_key_uuid": {
"type": "string",
- "description": "GitHub Client Secret"
+ "example": "xyz789",
+ "description": "Private key UUID"
},
- "webhook_secret": {
- "type": "string",
- "description": "GitHub Webhook Secret"
+ "enable_ipv4": {
+ "type": "boolean",
+ "example": true,
+ "description": "Enable IPv4 (default: true)"
},
- "private_key_uuid": {
+ "enable_ipv6": {
+ "type": "boolean",
+ "example": true,
+ "description": "Enable IPv6 (default: true)"
+ },
+ "hetzner_ssh_key_ids": {
+ "type": "array",
+ "items": {
+ "type": "integer"
+ },
+ "description": "Additional Hetzner SSH key IDs"
+ },
+ "cloud_init_script": {
"type": "string",
- "description": "Private key UUID"
+ "description": "Cloud-init YAML script (optional)"
},
- "is_system_wide": {
+ "instant_validate": {
"type": "boolean",
- "description": "Is system wide (non-cloud instances only)"
+ "example": false,
+ "description": "Validate server immediately after creation"
}
},
"type": "object"
@@ -6297,19 +7071,24 @@
}
},
"responses": {
- "200": {
- "description": "GitHub app updated successfully",
+ "201": {
+ "description": "Hetzner server created.",
"content": {
"application\/json": {
"schema": {
"properties": {
- "message": {
+ "uuid": {
"type": "string",
- "example": "GitHub app updated successfully"
+ "example": "og888os",
+ "description": "The UUID of the server."
},
- "data": {
- "type": "object",
- "description": "Updated GitHub app data"
+ "hetzner_server_id": {
+ "type": "integer",
+ "description": "The Hetzner server ID."
+ },
+ "ip": {
+ "type": "string",
+ "description": "The server IP address."
}
},
"type": "object"
@@ -6318,10 +7097,13 @@
}
},
"401": {
- "description": "Unauthorized"
+ "$ref": "#\/components\/responses\/401"
+ },
+ "400": {
+ "$ref": "#\/components\/responses\/400"
},
"404": {
- "description": "GitHub app not found"
+ "$ref": "#\/components\/responses\/404"
},
"422": {
"$ref": "#\/components\/responses\/422"
@@ -10209,6 +10991,10 @@
"name": "Applications",
"description": "Applications"
},
+ {
+ "name": "Cloud Tokens",
+ "description": "Cloud Tokens"
+ },
{
"name": "Databases",
"description": "Databases"
@@ -10221,6 +11007,10 @@
"name": "GitHub Apps",
"description": "GitHub Apps"
},
+ {
+ "name": "Hetzner",
+ "description": "Hetzner"
+ },
{
"name": "Projects",
"description": "Projects"
diff --git a/openapi.yaml b/openapi.yaml
index b42d5ab753..854da07ece 100644
--- a/openapi.yaml
+++ b/openapi.yaml
@@ -2090,6 +2090,224 @@ paths:
security:
-
bearerAuth: []
+ /cloud-tokens:
+ get:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'List Cloud Provider Tokens'
+ description: 'List all cloud provider tokens for the authenticated team.'
+ operationId: list-cloud-tokens
+ responses:
+ '200':
+ description: 'Get all cloud provider tokens.'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ properties: { uuid: { type: string }, name: { type: string }, provider: { type: string, enum: [hetzner, digitalocean] }, team_id: { type: integer }, servers_count: { type: integer }, created_at: { type: string }, updated_at: { type: string } }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '400':
+ $ref: '#/components/responses/400'
+ security:
+ -
+ bearerAuth: []
+ post:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'Create Cloud Provider Token'
+ description: 'Create a new cloud provider token. The token will be validated before being stored.'
+ operationId: create-cloud-token
+ requestBody:
+ description: 'Cloud provider token details'
+ required: true
+ content:
+ application/json:
+ schema:
+ required:
+ - provider
+ - token
+ - name
+ properties:
+ provider:
+ type: string
+ enum: [hetzner, digitalocean]
+ example: hetzner
+ description: 'The cloud provider.'
+ token:
+ type: string
+ example: your-api-token-here
+ description: 'The API token for the cloud provider.'
+ name:
+ type: string
+ example: 'My Hetzner Token'
+ description: 'A friendly name for the token.'
+ type: object
+ responses:
+ '201':
+ description: 'Cloud provider token created.'
+ content:
+ application/json:
+ schema:
+ properties:
+ uuid: { type: string, example: og888os, description: 'The UUID of the token.' }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '400':
+ $ref: '#/components/responses/400'
+ '422':
+ $ref: '#/components/responses/422'
+ security:
+ -
+ bearerAuth: []
+ '/cloud-tokens/{uuid}':
+ get:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'Get Cloud Provider Token'
+ description: 'Get cloud provider token by UUID.'
+ operationId: get-cloud-token-by-uuid
+ parameters:
+ -
+ name: uuid
+ in: path
+ description: 'Token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'Get cloud provider token by UUID'
+ content:
+ application/json:
+ schema:
+ properties:
+ uuid: { type: string }
+ name: { type: string }
+ provider: { type: string }
+ team_id: { type: integer }
+ servers_count: { type: integer }
+ created_at: { type: string }
+ updated_at: { type: string }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ delete:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'Delete Cloud Provider Token'
+ description: 'Delete cloud provider token by UUID. Cannot delete if token is used by any servers.'
+ operationId: delete-cloud-token-by-uuid
+ parameters:
+ -
+ name: uuid
+ in: path
+ description: 'UUID of the cloud provider token.'
+ required: true
+ schema:
+ type: string
+ format: uuid
+ responses:
+ '200':
+ description: 'Cloud provider token deleted.'
+ content:
+ application/json:
+ schema:
+ properties:
+ message: { type: string, example: 'Cloud provider token deleted.' }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '400':
+ $ref: '#/components/responses/400'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ patch:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'Update Cloud Provider Token'
+ description: 'Update cloud provider token name.'
+ operationId: update-cloud-token-by-uuid
+ parameters:
+ -
+ name: uuid
+ in: path
+ description: 'Token UUID'
+ required: true
+ schema:
+ type: string
+ requestBody:
+ description: 'Cloud provider token updated.'
+ required: true
+ content:
+ application/json:
+ schema:
+ properties:
+ name:
+ type: string
+ description: 'The friendly name for the token.'
+ type: object
+ responses:
+ '200':
+ description: 'Cloud provider token updated.'
+ content:
+ application/json:
+ schema:
+ properties:
+ uuid: { type: string }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ '422':
+ $ref: '#/components/responses/422'
+ security:
+ -
+ bearerAuth: []
+ '/cloud-tokens/{uuid}/validate':
+ post:
+ tags:
+ - 'Cloud Tokens'
+ summary: 'Validate Cloud Provider Token'
+ description: 'Validate a cloud provider token against the provider API.'
+ operationId: validate-cloud-token-by-uuid
+ parameters:
+ -
+ name: uuid
+ in: path
+ description: 'Token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'Token validation result.'
+ content:
+ application/json:
+ schema:
+ properties:
+ valid: { type: boolean, example: true }
+ message: { type: string, example: 'Token is valid.' }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
/databases:
get:
tags:
@@ -4099,6 +4317,220 @@ paths:
security:
-
bearerAuth: []
+ /hetzner/locations:
+ get:
+ tags:
+ - Hetzner
+ summary: 'Get Hetzner Locations'
+ description: 'Get all available Hetzner datacenter locations.'
+ operationId: get-hetzner-locations
+ parameters:
+ -
+ name: cloud_provider_token_id
+ in: query
+ description: 'Cloud provider token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'List of Hetzner locations.'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ properties: { id: { type: integer }, name: { type: string }, description: { type: string }, country: { type: string }, city: { type: string }, latitude: { type: number }, longitude: { type: number } }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ /hetzner/server-types:
+ get:
+ tags:
+ - Hetzner
+ summary: 'Get Hetzner Server Types'
+ description: 'Get all available Hetzner server types (instance sizes).'
+ operationId: get-hetzner-server-types
+ parameters:
+ -
+ name: cloud_provider_token_id
+ in: query
+ description: 'Cloud provider token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'List of Hetzner server types.'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ properties: { id: { type: integer }, name: { type: string }, description: { type: string }, cores: { type: integer }, memory: { type: number }, disk: { type: integer }, prices: { type: array } }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ /hetzner/images:
+ get:
+ tags:
+ - Hetzner
+ summary: 'Get Hetzner Images'
+ description: 'Get all available Hetzner system images (operating systems).'
+ operationId: get-hetzner-images
+ parameters:
+ -
+ name: cloud_provider_token_id
+ in: query
+ description: 'Cloud provider token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'List of Hetzner images.'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ properties: { id: { type: integer }, name: { type: string }, description: { type: string }, type: { type: string }, os_flavor: { type: string }, os_version: { type: string }, architecture: { type: string } }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ /hetzner/ssh-keys:
+ get:
+ tags:
+ - Hetzner
+ summary: 'Get Hetzner SSH Keys'
+ description: 'Get all SSH keys stored in the Hetzner account.'
+ operationId: get-hetzner-ssh-keys
+ parameters:
+ -
+ name: cloud_provider_token_id
+ in: query
+ description: 'Cloud provider token UUID'
+ required: true
+ schema:
+ type: string
+ responses:
+ '200':
+ description: 'List of Hetzner SSH keys.'
+ content:
+ application/json:
+ schema:
+ type: array
+ items:
+ properties: { id: { type: integer }, name: { type: string }, fingerprint: { type: string }, public_key: { type: string } }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '404':
+ $ref: '#/components/responses/404'
+ security:
+ -
+ bearerAuth: []
+ /servers/hetzner:
+ post:
+ tags:
+ - Hetzner
+ summary: 'Create Hetzner Server'
+ description: 'Create a new server on Hetzner and register it in Coolify.'
+ operationId: create-hetzner-server
+ requestBody:
+ description: 'Hetzner server creation parameters'
+ required: true
+ content:
+ application/json:
+ schema:
+ required:
+ - cloud_provider_token_id
+ - location
+ - server_type
+ - image
+ - private_key_uuid
+ properties:
+ cloud_provider_token_id:
+ type: string
+ example: abc123
+ description: 'Cloud provider token UUID'
+ location:
+ type: string
+ example: nbg1
+ description: 'Hetzner location name'
+ server_type:
+ type: string
+ example: cx11
+ description: 'Hetzner server type name'
+ image:
+ type: integer
+ example: 15512617
+ description: 'Hetzner image ID'
+ name:
+ type: string
+ example: my-server
+ description: 'Server name (auto-generated if not provided)'
+ private_key_uuid:
+ type: string
+ example: xyz789
+ description: 'Private key UUID'
+ enable_ipv4:
+ type: boolean
+ example: true
+ description: 'Enable IPv4 (default: true)'
+ enable_ipv6:
+ type: boolean
+ example: true
+ description: 'Enable IPv6 (default: true)'
+ hetzner_ssh_key_ids:
+ type: array
+ items: { type: integer }
+ description: 'Additional Hetzner SSH key IDs'
+ cloud_init_script:
+ type: string
+ description: 'Cloud-init YAML script (optional)'
+ instant_validate:
+ type: boolean
+ example: false
+ description: 'Validate server immediately after creation'
+ type: object
+ responses:
+ '201':
+ description: 'Hetzner server created.'
+ content:
+ application/json:
+ schema:
+ properties:
+ uuid: { type: string, example: og888os, description: 'The UUID of the server.' }
+ hetzner_server_id: { type: integer, description: 'The Hetzner server ID.' }
+ ip: { type: string, description: 'The server IP address.' }
+ type: object
+ '401':
+ $ref: '#/components/responses/401'
+ '400':
+ $ref: '#/components/responses/400'
+ '404':
+ $ref: '#/components/responses/404'
+ '422':
+ $ref: '#/components/responses/422'
+ security:
+ -
+ bearerAuth: []
/version:
get:
summary: Version
@@ -6580,6 +7012,9 @@ tags:
-
name: Applications
description: Applications
+ -
+ name: 'Cloud Tokens'
+ description: 'Cloud Tokens'
-
name: Databases
description: Databases
@@ -6589,6 +7024,9 @@ tags:
-
name: 'GitHub Apps'
description: 'GitHub Apps'
+ -
+ name: Hetzner
+ description: Hetzner
-
name: Projects
description: Projects