openapi: 3.0.0 info: version: 1.0.4 title: Qovery Account Info Database Main Calls API description: '- Qovery is the fastest way to deploy your full-stack apps on any Cloud provider. - ℹ️ The API is stable and still in development. ' contact: name: Qovery Product Team url: https://www.qovery.com email: support+api+documentation@qovery.com x-logo: url: https://console.qovery.com/assets/logos/logo-white.svg altText: Qovery servers: - url: https://api.qovery.com security: - bearerAuth: [] - ApiKeyAuth: [] tags: - name: Database Main Calls paths: /database/{databaseId}: get: summary: Get database by ID operationId: getDatabase parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls responses: '200': description: Get database by ID content: application/json: schema: $ref: '#/components/schemas/Database' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' put: summary: 'Edit a database ' description: To edit a database you must have the admin permission operationId: editDatabase parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls requestBody: content: application/json: schema: $ref: '#/components/schemas/DatabaseEditRequest' responses: '200': description: 'Edit a database ' content: application/json: schema: $ref: '#/components/schemas/Database' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' '409': description: Database name within the environment is already taken delete: summary: 'Delete a database ' description: To delete a database you must have the admin permission operationId: deleteDatabase parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls responses: '204': $ref: '#/components/responses/204-deletion' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /database/{databaseId}/status: get: summary: Get database status operationId: getDatabaseStatus parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls responses: '200': description: Get status content: application/json: schema: $ref: '#/components/schemas/Status' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /database/{databaseId}/version: get: summary: List eligible versions for the database operationId: listDatabaseVersion parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls responses: '200': description: List eligible versions content: application/json: schema: $ref: '#/components/schemas/VersionResponseList' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' /database/{databaseId}/masterCredentials: get: summary: Get master credentials of the database operationId: getDatabaseMasterCredentials parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls responses: '200': description: get credentials content: application/json: schema: $ref: '#/components/schemas/Credentials' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' put: summary: Edit database master credentials operationId: editDatabaseCredentials parameters: - $ref: '#/components/parameters/databaseId' tags: - Database Main Calls requestBody: content: application/json: schema: $ref: '#/components/schemas/CredentialsRequest' responses: '200': description: Edit database credentials content: application/json: schema: $ref: '#/components/schemas/Credentials' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' components: schemas: ReferenceObject: type: object required: - id properties: id: type: string format: uuid readOnly: true Credentials: type: object required: - host - port - login - password properties: host: type: string port: type: integer login: type: string password: type: string DatabaseModeEnum: type: string enum: - CONTAINER - MANAGED ServiceLabelRequest: type: object required: - id properties: id: type: string format: uuid VersionResponseList: type: object properties: results: type: array items: $ref: '#/components/schemas/Version' OrganizationAnnotationsGroupScopeEnum: type: string description: Annotations Group Scope enum: - DEPLOYMENTS - STATEFUL_SETS - SERVICES - INGRESS - GATEWAY_API_ROUTES - HPA - PODS - SECRETS - JOBS - CRON_JOBS ServiceAnnotationsRequestList: type: array items: $ref: '#/components/schemas/ServiceAnnotationRequest' DatabaseAccessibilityEnum: type: string default: PRIVATE enum: - PRIVATE - PUBLIC OrganizationLabelsGroupResponse: allOf: - $ref: '#/components/schemas/Base' - type: object required: - name - labels properties: name: type: string labels: type: array items: $ref: '#/components/schemas/Label' title: '' ServiceAnnotationRequest: type: object required: - id properties: id: type: string format: uuid DatabaseTypeEnum: type: string enum: - MONGODB - MYSQL - POSTGRESQL - REDIS ServiceTypeEnum: type: string x-stoplight: id: d66063cd29913 description: type of the service (application, database, job, ...) enum: - APPLICATION - DATABASE - CONTAINER - JOB - HELM - TERRAFORM - ARGOCD_APP OrganizationAnnotationsGroupResponse: allOf: - $ref: '#/components/schemas/Base' - type: object required: - name - annotations - scopes properties: name: type: string annotations: type: array items: $ref: '#/components/schemas/Annotation' scopes: type: array items: $ref: '#/components/schemas/OrganizationAnnotationsGroupScopeEnum' StepMetricStatusEnum: type: string enum: - SUCCESS - ERROR - CANCEL - SKIP description: 'The status of completion for the step: - SUCCESS: The step completed successfully. - ERROR: The step completed with an error. - CANCEL: The step was canceled. - SKIP: The step was skipped because it was not necessary. ' Label: type: object required: - key - value - propagate_to_cloud_provider properties: key: type: string value: type: string propagate_to_cloud_provider: type: boolean ServiceSubActionEnum: type: string default: NONE enum: - NONE - TERRAFORM_PLAN_ONLY - TERRAFORM_PLAN_AND_APPLY - TERRAFORM_DESTROY - TERRAFORM_FORCE_UNLOCK_STATE - TERRAFORM_MIGRATE_STATE ServiceLabelsRequestList: type: array items: $ref: '#/components/schemas/ServiceLabelRequest' DatabaseRequest: type: object required: - name - type - version - mode properties: name: type: string description: name is case insensitive description: type: string description: give a description to this database type: $ref: '#/components/schemas/DatabaseTypeEnum' version: type: string example: '10.1' mode: $ref: '#/components/schemas/DatabaseModeEnum' accessibility: $ref: '#/components/schemas/DatabaseAccessibilityEnum' cpu: type: integer description: 'unit is millicores (m). 1000m = 1 cpu This field will be ignored for managed DB (instance type will be used instead). ' default: 250 example: 1250 instance_type: type: string example: db.t3.medium description: Database instance type to be used for this database. The list of values can be retrieved via the endpoint /{CloudProvider}/managedDatabase/instanceType/{region}/{dbType}. This field SHOULD NOT be set for container DB. memory: type: integer description: "unit is MB. 1024 MB = 1GB\nThis field will be ignored for managed DB (instance type will be used instead).\nDefault value is linked to the database type:\n- MANAGED: `100`\n- CONTAINER\n - POSTGRES: `100`\n - REDIS: `100`\n - MYSQL: `512`\n - MONGODB: `256`\n" example: 1024 storage: type: integer description: unit is GB default: 10 annotations_groups: $ref: '#/components/schemas/ServiceAnnotationsRequestList' labels_groups: $ref: '#/components/schemas/ServiceLabelsRequestList' icon_uri: type: string format: uri description: Icon URI representing the database. x-stoplight: id: ls6yevnhskd5y DatabaseEditRequest: type: object properties: name: type: string description: name is case-insensitive description: type: string description: give a description to this database version: type: string example: '10.1' accessibility: $ref: '#/components/schemas/DatabaseAccessibilityEnum' cpu: type: integer description: 'unit is millicores (m). 1000m = 1 cpu. This field will be ignored for managed DB (instance type will be used instead). ' default: 250 example: 1250 memory: type: integer description: "unit is MB. 1024 MB = 1GB\nThis field will be ignored for managed DB (instance type will be used instead).\nDefault value is linked to the database type:\n- MANAGED: 100\n- CONTAINER\n - POSTGRES: 100\n - REDIS: 100\n - MYSQL: 512\n - MONGODB: 256\n" example: 1024 storage: type: integer description: unit is GB example: 4 instance_type: type: string example: db.t3.medium description: Database instance type to be used for this database. The list of values can be retrieved via the endpoint /{CloudProvider}/managedDatabase/instanceType/{region}/{dbType}. This field SHOULD NOT be set for container DB. annotations_groups: $ref: '#/components/schemas/ServiceAnnotationsRequestList' labels_groups: $ref: '#/components/schemas/ServiceLabelsRequestList' icon_uri: type: string format: uri description: Icon URI representing the database. disk_type: type: string nullable: true enum: - gp2 - gp3 description: 'EBS disk type for MANAGED AWS databases. Allowed values: gp2, gp3. Only applicable for MANAGED mode.' OrganizationLabelsGroupResponseList: type: array items: $ref: '#/components/schemas/OrganizationLabelsGroupResponse' title: '' ServiceStepMetric: type: object properties: step_name: $ref: '#/components/schemas/ServiceStepMetricNameEnum' status: $ref: '#/components/schemas/StepMetricStatusEnum' duration_sec: description: The duration of the step in seconds. type: integer Version: type: object required: - name properties: name: type: string example: '10.1' Database: allOf: - $ref: '#/components/schemas/Base' - $ref: '#/components/schemas/DatabaseRequest' - type: object required: - environment - icon_uri - service_type properties: environment: $ref: '#/components/schemas/ReferenceObject' host: type: string port: type: integer example: 5432 maximum_cpu: type: integer description: Maximum cpu that can be allocated to the database based on organization cluster configuration. unit is millicores (m). 1000m = 1 cpu example: 1250 maximum_memory: type: integer description: Maximum memory that can be allocated to the database based on organization cluster configuration. unit is MB. 1024 MB = 1GB example: 1024 disk_encrypted: type: boolean description: indicates if the database disk is encrypted or not instance_type: type: string example: db.t3.medium description: Database instance type to be used for this database. The list of values can be retrieved via the endpoint /{CloudProvider}/managedDatabase/instanceType/{region}/{dbType}. This field is null for container DB. disk_type: type: string nullable: true description: EBS disk type for the database. Only applicable for MANAGED mode (gp2 or gp3). Null for CONTAINER mode. enum: - gp2 - gp3 annotations_groups: $ref: '#/components/schemas/OrganizationAnnotationsGroupResponseList' labels_groups: $ref: '#/components/schemas/OrganizationLabelsGroupResponseList' icon_uri: type: string format: uri description: Icon URI representing the database. service_type: $ref: '#/components/schemas/ServiceTypeEnum' Annotation: type: object required: - key - value properties: key: type: string value: type: string ServiceDeploymentStatusEnum: type: string enum: - NEVER_DEPLOYED - OUT_OF_DATE - UP_TO_DATE ServiceStepMetricNameEnum: type: string enum: - REGISTRY_CREATE_REPOSITORY - GIT_CLONE - BUILD_QUEUEING - BUILD - DEPLOYMENT_QUEUEING - DEPLOYMENT - ROUTER_DEPLOYMENT - MIRROR_IMAGE - EXECUTING description: "The name of the deployment step at the service level:\n- REGISTRY_CREATE_REPOSITORY: The step to create the repository in the registry.\n- GIT_CLONE: The step to clone the source code repository. \n- BUILD_QUEUEING: The queuing time preceding the actual building step.\n- BUILD: The step to build the source code.\n- DEPLOYMENT_QUEUEING: The queuing time preceding the actual deployment step.\n- DEPLOYMENT: The step to deploy the service. \n- ROUTER_DEPLOYMENT: The step to deploy the router. \n- MIRROR_IMAGE: The step to mirror the image to the private registry.\n- EXECUTING: The step to execute a job or terraform apply.\n" ServiceStepMetrics: type: object required: - total_duration_sec - total_computing_duration_sec - details properties: total_duration_sec: description: The total duration in seconds of the service deployment or null if the deployment is not completed. type: integer nullable: true total_computing_duration_sec: description: The total duration in seconds of the service deployment without queuing steps. type: integer details: description: A list of metrics for deployment steps of the service. type: array items: $ref: '#/components/schemas/ServiceStepMetric' ServiceActionEnum: type: string enum: - DEPLOY - DELETE - RESTART - STOP - UNKNOWN StateEnum: type: string enum: - BUILDING - BUILD_ERROR - CANCELED - CANCELING - DELETED - DELETE_ERROR - DELETE_QUEUED - DELETING - DEPLOYED - DEPLOYING - DEPLOYMENT_ERROR - DEPLOYMENT_QUEUED - EXECUTING - QUEUED - READY - RECAP - RESTARTED - RESTARTING - RESTART_ERROR - RESTART_QUEUED - STOPPED - STOPPING - STOP_ERROR - STOP_QUEUED - UNAVAILABLE - WAITING_DELETING - WAITING_RESTARTING - WAITING_RUNNING - WAITING_STOPPING OrganizationAnnotationsGroupResponseList: type: array items: $ref: '#/components/schemas/OrganizationAnnotationsGroupResponse' Status: type: object required: - id - state - service_deployment_status - status_details - is_part_last_deployment - deployment_requests_count - deployment_request_id properties: id: type: string format: uuid state: $ref: '#/components/schemas/StateEnum' service_deployment_status: $ref: '#/components/schemas/ServiceDeploymentStatusEnum' last_deployment_date: type: string format: date-time is_part_last_deployment: type: boolean steps: $ref: '#/components/schemas/ServiceStepMetrics' execution_id: type: string x-stoplight: id: 3o9tz4272s2ct status_details: $ref: '#/components/schemas/StatusDetails' deployment_request_id: type: string x-stoplight: id: bepixrb7tyzme format: uuid nullable: true deployment_requests_count: type: integer x-stoplight: id: crku532vt3v4p CredentialsRequest: type: object required: - login - password properties: login: type: string password: type: string ServiceActionStatusEnum: type: string enum: - QUEUED - ONGOING - SUCCESS - ERROR - EXECUTING - CANCELED - CANCELING - NEVER Base: type: object required: - id - created_at properties: id: type: string format: uuid readOnly: true created_at: type: string readOnly: true format: date-time updated_at: type: string readOnly: true format: date-time StatusDetails: type: object required: - action - status - sub_action properties: action: $ref: '#/components/schemas/ServiceActionEnum' status: $ref: '#/components/schemas/ServiceActionStatusEnum' sub_action: $ref: '#/components/schemas/ServiceSubActionEnum' responses: '400': description: Bad request 204-deletion: description: The resource was deleted successfully '403': description: Access forbidden '404': description: Resource not found '401': description: Access token is missing or invalid parameters: databaseId: name: databaseId in: path description: Database ID required: true schema: type: string format: uuid securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: 'JWT tokens should be used with OIDC account (human to machine). JWT tokens used by the Qovery console to communicate with the API have a TTL. Curl Example '' curl https://console.qovery.com/organization -H "Authorization: Bearer $qovery_token" ''' ApiKeyAuth: type: apiKey in: header name: Authorization description: 'Token API are generated by Qovery to manage machine to machine interaction and do not have a TTL. Curl Example '' curl https://console.qovery.com/organization -H "Authorization: Token $qovery_token" ''' x-tagGroups: - name: Organization tags: - Organization Main Calls - Organization Api Token - Organization Account Git Repositories - Organization Cluster Lock - Organization Webhook - Organization Custom Role - Organization Event - Organization Annotations Group - Organization Labels Group - Organization Enterprise Connection - Projects - Members - Billing - Clusters - Cloud Provider - Cloud Provider Credentials - Github App - Container Registries - Helm Repositories - name: Project tags: - Project Main Calls - Environments - Project Deployment Rule - Project Environment Variable - Project Secret - name: Environment tags: - Environment Main Calls - Applications - Containers - Databases - Jobs - Helms - Terraforms - Environment Actions - Environment Logs - Environment Deployment History - Environment Deployment Rule - Environment Variable - Environment Secret - Environment Export - name: Deployment Stage tags: - Deployment Stage Main Calls - name: Application tags: - Application Main Calls - Application Actions - Application Configuration - Application Custom Domain - Application Database - Application Logs - Application Deployment Restriction - Application Deployment History - Application Environment Variable - Application Secret - Application Annotations Group - name: Container tags: - Container Main Calls - Container Actions - Container Configuration - Container Custom Domain - Container Database - Container Logs - Container Deployment History - Container Environment Variable - Container Secret - Container Annotations Group - name: Database tags: - Database Main Calls - Database Actions - Database Applications - Database Deployment History - Database Containers - Database Application - Database Container - Backups - Database Annotations Group - name: Job tags: - Job Main Calls - Job Actions - Job Configuration - Job Custom Domain - Job Deployment Restriction - Job Deployment History - Job Environment Variable - Job Secret - Job Annotations Group - name: Helm tags: - Helm Main Calls - Helm Actions - Helm Configuration - Helm Custom Domain - Helm Deployment Restriction - Helm Deployment History - name: Terraform tags: - Terraform Main Calls - Terraform Actions - Terraform Configuration - Terraform Deployment Restriction - Terraform Deployment History - name: Account tags: - Account Info - Git repositories - Referral & Rewards - name: Git tags: - Git repositories - name: Variable tags: - Variable Main Calls - name: Lifecycle Template tags: - Lifecycle Template Main Calls - name: Admin tags: - User Sign Up - name: Alerting tags: - Alert Receivers - Alert Rules