openapi: 3.1.0 info: title: Coolify Applications Databases API version: '0.1' description: Applications servers: - url: https://app.coolify.io/api/v1 description: Coolify Cloud API. Change the host to your own instance if you are self-hosting. tags: - name: Databases description: Databases paths: /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: 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 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: - 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 database. required: true schema: type: string requestBody: description: Backup configuration data required: true content: application/json: schema: required: - frequency properties: frequency: 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 s3_storage_uuid: type: string description: S3 storage UUID (required if save_s3 is true) databases_to_backup: 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: number description: Max storage (GB) 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: number description: Max storage (GB) for S3 backups timeout: type: integer description: 'Backup job timeout in seconds (min: 60, max: 36000)' default: 3600 type: object responses: '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' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/{uuid}: get: tags: - Databases 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 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' '404': $ref: '#/components/responses/404' security: - bearerAuth: [] delete: tags: - Databases 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 - 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 requestBody: description: Database data required: true content: application/json: schema: 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 type: object responses: '200': description: Database updated '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/{uuid}/backups/{scheduled_backup_uuid}: delete: tags: - Databases 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 - 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. type: object '404': description: Backup configuration not found. content: application/json: schema: properties: message: type: string example: Backup configuration not found. 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 - name: scheduled_backup_uuid in: path description: UUID of the backup configuration. required: true schema: type: string 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 s3_storage_uuid: type: string description: S3 storage UUID backup_now: type: boolean description: Whether to take a backup now or not enabled: type: boolean description: Whether the backup is enabled or not databases_to_backup: type: string description: Comma separated list of databases to backup dump_all: type: boolean description: Whether all databases are dumped or not frequency: type: string description: Frequency of the backup database_backup_retention_amount_locally: type: integer description: Retention amount of the backup locally database_backup_retention_days_locally: type: integer description: Retention days of the backup locally database_backup_retention_max_storage_locally: type: number description: Max storage of the backup locally database_backup_retention_amount_s3: type: integer description: Retention amount of the backup in s3 database_backup_retention_days_s3: type: integer description: Retention days of the backup in s3 database_backup_retention_max_storage_s3: type: number description: Max storage of the backup in S3 timeout: type: integer description: 'Backup job timeout in seconds (min: 60, max: 36000)' default: 3600 type: object responses: '200': description: Database backup configuration updated '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/postgresql: post: 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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/clickhouse: post: tags: - Databases summary: Create (Clickhouse) description: Create a new Clickhouse database. operationId: create-database-clickhouse 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 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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/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: 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 dragonfly_password: type: string description: DragonFly password 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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/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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 public_port_timeout: type: integer description: 'Public port timeout in seconds (default: 3600)' 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 - name: execution_uuid in: path description: UUID of the backup execution to delete required: true schema: type: string - 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 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 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 - name: docker_cleanup in: query description: Perform docker cleanup (prune networks, volumes, etc.). schema: type: boolean default: true 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: - bearerAuth: [] /databases/{uuid}/restart: get: tags: - Databases 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 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' '404': $ref: '#/components/responses/404' security: - bearerAuth: [] /databases/{uuid}/envs: get: tags: - Databases summary: List Envs description: List all envs by database UUID. operationId: list-envs-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string responses: '200': description: Environment variables. content: application/json: schema: type: array items: $ref: '#/components/schemas/EnvironmentVariable' '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' security: - bearerAuth: [] post: tags: - Databases summary: Create Env description: Create env by database UUID. operationId: create-env-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string requestBody: description: Env created. required: true content: application/json: schema: properties: key: type: string description: The key of the environment variable. value: type: string description: The value of the environment variable. is_literal: type: boolean description: The flag to indicate if the environment variable is a literal, nothing espaced. is_multiline: type: boolean description: The flag to indicate if the environment variable is multiline. is_shown_once: type: boolean description: The flag to indicate if the environment variable's value is shown on the UI. type: object responses: '201': description: Environment variable created. content: application/json: schema: properties: uuid: type: string example: nc0k04gk8g0cgsk440g0koko type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] patch: tags: - Databases summary: Update Env description: Update env by database UUID. operationId: update-env-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string requestBody: description: Env updated. required: true content: application/json: schema: required: - key - value properties: key: type: string description: The key of the environment variable. value: type: string description: The value of the environment variable. is_literal: type: boolean description: The flag to indicate if the environment variable is a literal, nothing espaced. is_multiline: type: boolean description: The flag to indicate if the environment variable is multiline. is_shown_once: type: boolean description: The flag to indicate if the environment variable's value is shown on the UI. type: object responses: '201': description: Environment variable updated. content: application/json: schema: $ref: '#/components/schemas/EnvironmentVariable' '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/{uuid}/envs/bulk: patch: tags: - Databases summary: Update Envs (Bulk) description: Update multiple envs by database UUID. operationId: update-envs-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string requestBody: description: Bulk envs updated. required: true content: application/json: schema: required: - data properties: data: type: array items: properties: key: type: string description: The key of the environment variable. value: type: string description: The value of the environment variable. is_literal: type: boolean description: The flag to indicate if the environment variable is a literal, nothing espaced. is_multiline: type: boolean description: The flag to indicate if the environment variable is multiline. is_shown_once: type: boolean description: The flag to indicate if the environment variable's value is shown on the UI. type: object type: object responses: '201': description: Environment variables updated. content: application/json: schema: type: array items: $ref: '#/components/schemas/EnvironmentVariable' '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/{uuid}/envs/{env_uuid}: delete: tags: - Databases summary: Delete Env description: Delete env by UUID. operationId: delete-env-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string - name: env_uuid in: path description: UUID of the environment variable. required: true schema: type: string responses: '200': description: Environment variable deleted. content: application/json: schema: properties: message: type: string example: Environment variable deleted. type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' security: - bearerAuth: [] /databases/{uuid}/storages: get: tags: - Databases summary: List Storages description: List all persistent storages and file storages by database UUID. operationId: list-storages-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string responses: '200': description: All storages by database UUID. content: application/json: schema: properties: persistent_storages: type: array items: type: object file_storages: type: array items: type: object type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' security: - bearerAuth: [] post: tags: - Databases summary: Create Storage description: Create a persistent storage or file storage for a database. operationId: create-storage-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string requestBody: required: true content: application/json: schema: required: - type - mount_path properties: type: type: string enum: - persistent - file description: The type of storage. name: type: string description: Volume name (persistent only, required for persistent). mount_path: type: string description: The container mount path. host_path: type: string nullable: true description: The host path (persistent only, optional). content: type: string nullable: true description: File content (file only, optional). is_directory: type: boolean description: Whether this is a directory mount (file only, default false). fs_path: type: string description: Host directory path (required when is_directory is true). type: object additionalProperties: false responses: '201': description: Storage created. content: application/json: schema: type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] patch: tags: - Databases summary: Update Storage description: Update a persistent storage or file storage by database UUID. operationId: update-storage-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string requestBody: description: Storage updated. For read-only storages (from docker-compose or services), only is_preview_suffix_enabled can be updated. required: true content: application/json: schema: required: - type properties: uuid: type: string description: The UUID of the storage (preferred). id: type: integer description: The ID of the storage (deprecated, use uuid instead). type: type: string enum: - persistent - file description: 'The type of storage: persistent or file.' is_preview_suffix_enabled: type: boolean description: Whether to add -pr-N suffix for preview deployments. name: type: string description: The volume name (persistent only, not allowed for read-only storages). mount_path: type: string description: The container mount path (not allowed for read-only storages). host_path: type: string nullable: true description: The host path (persistent only, not allowed for read-only storages). content: type: string nullable: true description: The file content (file only, not allowed for read-only storages). type: object additionalProperties: false responses: '200': description: Storage updated. content: application/json: schema: type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] /databases/{uuid}/storages/{storage_uuid}: delete: tags: - Databases summary: Delete Storage description: Delete a persistent storage or file storage by database UUID. operationId: delete-storage-by-database-uuid parameters: - name: uuid in: path description: UUID of the database. required: true schema: type: string - name: storage_uuid in: path description: UUID of the storage. required: true schema: type: string responses: '200': description: Storage deleted. content: application/json: schema: properties: message: type: string type: object '401': $ref: '#/components/responses/401' '400': $ref: '#/components/responses/400' '404': $ref: '#/components/responses/404' '422': $ref: '#/components/responses/422' security: - bearerAuth: [] components: responses: '400': description: Invalid token. content: application/json: schema: properties: message: type: string example: Invalid token. type: object '404': description: Resource not found. content: application/json: schema: properties: message: type: string example: Resource not found. type: object '401': description: Unauthenticated. content: application/json: schema: properties: message: type: string example: Unauthenticated. type: object '422': description: Validation error. content: application/json: schema: properties: message: type: string example: Validation error. errors: type: object example: name: - The name field is required. api_url: - The api url field is required. - The api url format is invalid. additionalProperties: type: array items: type: string type: object schemas: EnvironmentVariable: description: Environment Variable model properties: id: type: integer uuid: type: string resourceable_type: type: string resourceable_id: type: integer is_literal: type: boolean is_multiline: type: boolean is_preview: type: boolean is_runtime: type: boolean is_buildtime: type: boolean is_shared: type: boolean is_shown_once: type: boolean key: type: string value: type: string real_value: type: string comment: type: string nullable: true version: type: string created_at: type: string updated_at: type: string type: object securitySchemes: bearerAuth: type: http description: Go to `Keys & Tokens` / `API tokens` and create a new token. Use the token as the bearer token. scheme: bearer