mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-06 13:10:37 -04:00
fix(api): document database and resource list responses in OpenAPI
Add a Database schema and use it for GET /databases and
GET /databases/{uuid}, type the GET /resources items, and stop
requiring both environment_name and environment_uuid on create
endpoints. KeyDB now returns database_type like the other engines.
Closes #10449
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
5a08c35e7d
commit
80df5431dc
+452
-51
@@ -534,8 +534,6 @@
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid",
|
||||
"git_repository",
|
||||
"git_branch",
|
||||
"build_pack"
|
||||
@@ -1187,8 +1185,6 @@
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid",
|
||||
"github_app_uuid",
|
||||
"git_repository",
|
||||
"git_branch",
|
||||
@@ -1845,8 +1841,6 @@
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid",
|
||||
"private_key_uuid",
|
||||
"git_repository",
|
||||
"git_branch",
|
||||
@@ -2503,8 +2497,6 @@
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid",
|
||||
"dockerfile"
|
||||
],
|
||||
"properties": {
|
||||
@@ -3046,8 +3038,6 @@
|
||||
"required": [
|
||||
"project_uuid",
|
||||
"server_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid",
|
||||
"docker_registry_image_name"
|
||||
],
|
||||
"properties": {
|
||||
@@ -7032,9 +7022,11 @@
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "Content is very complex. Will be implemented later."
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/Database"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7278,13 +7270,12 @@
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Get all databases",
|
||||
"description": "Get database by UUID",
|
||||
"content": {
|
||||
"application\/json": {
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"example": "Content is very complex. Will be implemented later."
|
||||
"$ref": "#\/components\/schemas\/Database"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7900,9 +7891,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8055,9 +8044,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8194,9 +8181,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8329,9 +8314,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8468,9 +8451,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8607,9 +8588,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8758,9 +8737,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -8909,9 +8886,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -9048,9 +9023,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"server_uuid": {
|
||||
@@ -14651,13 +14624,49 @@
|
||||
"operationId": "list-resources",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "Get all resources",
|
||||
"description": "Get all applications, services and standalone databases. The other fields of each resource are the fields of the Application, Service or Database schema.",
|
||||
"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"
|
||||
},
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"type": {
|
||||
"description": "application, service, or standalone-<engine> for databases (for example standalone-postgresql).",
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "For example running:healthy or exited:unhealthy.",
|
||||
"type": "string"
|
||||
},
|
||||
"environment_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -20227,9 +20236,7 @@
|
||||
"schema": {
|
||||
"required": [
|
||||
"server_uuid",
|
||||
"project_uuid",
|
||||
"environment_name",
|
||||
"environment_uuid"
|
||||
"project_uuid"
|
||||
],
|
||||
"properties": {
|
||||
"type": {
|
||||
@@ -24184,6 +24191,400 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Database": {
|
||||
"description": "Standalone database. The fields that start with an engine name (for example postgres_ or redis_) are only returned for that engine. Passwords, connection URLs and init_scripts are only returned for tokens with the read:sensitive or root ability.",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"database_type": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"standalone-postgresql",
|
||||
"standalone-redis",
|
||||
"standalone-mongodb",
|
||||
"standalone-mysql",
|
||||
"standalone-mariadb",
|
||||
"standalone-keydb",
|
||||
"standalone-dragonfly",
|
||||
"standalone-clickhouse",
|
||||
"standalone-sqlite"
|
||||
]
|
||||
},
|
||||
"image": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"description": "Container status and health, for example running:healthy or exited:unhealthy.",
|
||||
"type": "string"
|
||||
},
|
||||
"server_status": {
|
||||
"description": "True when the server of the database is reachable and usable.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"environment_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"environment": {
|
||||
"$ref": "#\/components\/schemas\/Environment",
|
||||
"description": "Only returned by GET \/databases\/{uuid}. Includes the project."
|
||||
},
|
||||
"destination_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"destination_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"destination": {
|
||||
"description": "Docker network destination of the database, with its server.",
|
||||
"properties": {
|
||||
"uuid": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"network": {
|
||||
"type": "string"
|
||||
},
|
||||
"server_id": {
|
||||
"type": "integer"
|
||||
},
|
||||
"server": {
|
||||
"$ref": "#\/components\/schemas\/Server"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"is_public": {
|
||||
"description": "Not returned for SQLite.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"public_port": {
|
||||
"description": "Not returned for SQLite.",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"public_port_timeout": {
|
||||
"description": "Proxy timeout of the public port in seconds. Not returned for SQLite.",
|
||||
"type": [
|
||||
"integer",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"ports_mappings": {
|
||||
"description": "Comma-separated host:container port mappings. Not returned for SQLite.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"enable_ssl": {
|
||||
"description": "Not returned for ClickHouse and SQLite.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"ssl_mode": {
|
||||
"description": "PostgreSQL, MongoDB and MySQL only.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"internal_db_url": {
|
||||
"description": "Connection URL inside the Docker network. Contains the password. Not returned for SQLite.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"external_db_url": {
|
||||
"description": "Public connection URL, when the database is public. Contains the password. Not returned for SQLite.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"init_scripts": {
|
||||
"description": "PostgreSQL only.",
|
||||
"type": [
|
||||
"array",
|
||||
"null"
|
||||
],
|
||||
"items": {
|
||||
"properties": {
|
||||
"index": {
|
||||
"type": "integer"
|
||||
},
|
||||
"filename": {
|
||||
"type": "string"
|
||||
},
|
||||
"content": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"custom_docker_run_options": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"is_log_drain_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"is_include_timestamps": {
|
||||
"description": "Not returned for MariaDB.",
|
||||
"type": "boolean"
|
||||
},
|
||||
"include_coolify_default_variables": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"redact_all_env_values_in_logs": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"health_check_enabled": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"health_check_interval": {
|
||||
"type": "integer"
|
||||
},
|
||||
"health_check_timeout": {
|
||||
"type": "integer"
|
||||
},
|
||||
"health_check_retries": {
|
||||
"type": "integer"
|
||||
},
|
||||
"health_check_start_period": {
|
||||
"type": "integer"
|
||||
},
|
||||
"limits_memory": {
|
||||
"type": "string"
|
||||
},
|
||||
"limits_memory_swap": {
|
||||
"type": "string"
|
||||
},
|
||||
"limits_memory_swappiness": {
|
||||
"type": "integer"
|
||||
},
|
||||
"limits_memory_reservation": {
|
||||
"type": "string"
|
||||
},
|
||||
"limits_cpus": {
|
||||
"type": "string"
|
||||
},
|
||||
"limits_cpuset": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"limits_cpu_shares": {
|
||||
"type": "integer"
|
||||
},
|
||||
"config_hash": {
|
||||
"description": "Internal hash that Coolify uses to find configuration changes that need a restart. It changes only when the database starts, so do not use it to compare configurations.",
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"restart_count": {
|
||||
"type": "integer"
|
||||
},
|
||||
"last_restart_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"last_restart_type": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"last_online_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"started_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
},
|
||||
"backup_configs": {
|
||||
"description": "Only returned by GET \/databases. The scheduled backups of the database, as returned by GET \/databases\/{uuid}\/backups.",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object"
|
||||
}
|
||||
},
|
||||
"postgres_user": {
|
||||
"type": "string"
|
||||
},
|
||||
"postgres_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"postgres_db": {
|
||||
"type": "string"
|
||||
},
|
||||
"postgres_initdb_args": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"postgres_host_auth_method": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"postgres_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"redis_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"redis_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mongo_initdb_root_username": {
|
||||
"type": "string"
|
||||
},
|
||||
"mongo_initdb_root_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"mongo_initdb_database": {
|
||||
"type": "string"
|
||||
},
|
||||
"mongo_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mysql_user": {
|
||||
"type": "string"
|
||||
},
|
||||
"mysql_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"mysql_root_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"mysql_database": {
|
||||
"type": "string"
|
||||
},
|
||||
"mysql_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"mariadb_user": {
|
||||
"type": "string"
|
||||
},
|
||||
"mariadb_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"mariadb_root_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"mariadb_database": {
|
||||
"type": "string"
|
||||
},
|
||||
"mariadb_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"keydb_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"keydb_conf": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
]
|
||||
},
|
||||
"dragonfly_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"clickhouse_admin_user": {
|
||||
"type": "string"
|
||||
},
|
||||
"clickhouse_admin_password": {
|
||||
"type": "string",
|
||||
"format": "password"
|
||||
},
|
||||
"clickhouse_db": {
|
||||
"type": "string"
|
||||
},
|
||||
"sqlite_databases": {
|
||||
"description": "Comma-separated SQLite database file names.",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"deleted_at": {
|
||||
"type": [
|
||||
"string",
|
||||
"null"
|
||||
],
|
||||
"format": "date-time"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"ApplicationPreview": {
|
||||
"properties": {
|
||||
"uuid": {
|
||||
|
||||
Reference in New Issue
Block a user