openapi: 3.0.0 info: version: 1.0.4 title: Qovery Account Info Alert Rules 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: Alert Rules paths: /alert-rules: post: summary: Create alert rule tags: - Alert Rules responses: '201': description: Created content: application/json: schema: $ref: '#/components/schemas/AlertRuleResponse' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' operationId: createAlertRule x-stoplight: id: htbtqo7s45dzg description: Create a new alert rule with PromQL expression requestBody: content: application/json: schema: $ref: '#/components/schemas/AlertRuleCreationRequest' /alert-rules/{alertRuleId}: parameters: - $ref: '#/components/parameters/alertRuleId' get: summary: Get alert rule tags: - Alert Rules responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AlertRuleResponse' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' operationId: getAlertRule x-stoplight: id: qfitd78wejspk description: Retrieve a specific alert rule by its ID put: summary: Update alert rule tags: - Alert Rules responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AlertRuleResponse' '400': $ref: '#/components/responses/400' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' operationId: editAlertRule x-stoplight: id: cj5a3t08qw1aj description: Update an existing alert rule requestBody: content: application/json: schema: $ref: '#/components/schemas/AlertRuleEditRequest' delete: summary: Delete alert rule tags: - Alert Rules responses: '204': description: Alert rule successfully deleted '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' operationId: deleteAlertRule x-stoplight: id: 812453spx2l0f description: Delete an alert rule /organization/{organizationId}/alert-rules: parameters: - $ref: '#/components/parameters/organizationId' get: summary: List alert rules tags: - Alert Rules responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/AlertRuleList' '401': $ref: '#/components/responses/401' '403': $ref: '#/components/responses/403' '404': $ref: '#/components/responses/404' operationId: getAlertRules x-stoplight: id: xkza3tt52gwse description: Retrieve all alert rules for a specific organization components: schemas: AlertTargetType: title: AlertTargetType x-stoplight: id: y45ivkwhr7wb4 enum: - ' CLUSTER' - ENVIRONMENT - APPLICATION - CONTAINER - JOB - CRONJOB - HELM - TERRAFORM description: The target of an alert AlertRuleResponse: title: AlertRuleResponse x-stoplight: id: jsi9jy70651hv allOf: - $ref: '#/components/schemas/Base' - $ref: '#/components/schemas/AlertRuleResponseBase' - type: object required: - organization_id - cluster_id - description - tag - condition - for_duration - severity - enabled - alert_receiver_ids - presentation - target - is_up_to_date properties: organization_id: type: string x-stoplight: id: 40agisyi9s6no format: uuid description: Organization identifier cluster_id: type: string x-stoplight: id: nd3oz9h1qpa6w description: ' Cluster identifier' format: uuid description: type: string x-stoplight: id: r728dl0e8ef6x description: Description of what the alert monitors tag: type: string x-stoplight: id: kloew25gqdxqt condition: $ref: '#/components/schemas/AlertRuleCondition' for_duration: type: string x-stoplight: id: 3aceb4kbdv4pz format: duration description: Duration the condition must be true before firing (ISO-8601 duration format) severity: $ref: '#/components/schemas/AlertSeverity' enabled: type: boolean x-stoplight: id: du2v3ss6fb66f description: Whether the alert rule is enabled alert_receiver_ids: type: array x-stoplight: id: 7lerayyele2ss description: List of alert receiver IDs to send notifications to items: x-stoplight: id: xdka1kakao7s0 type: string format: uuid presentation: $ref: '#/components/schemas/AlertPresentationResponse' target: $ref: '#/components/schemas/AlertTarget' is_up_to_date: type: boolean x-stoplight: id: 4nfaupf2l1668 description: 'Indicates whether the current version of the alert has been synced with the alerting system. If false, an outdated version is currently deployed.' starts_at: type: string x-stoplight: id: 9r76f8pipu6y5 description: when the alert starts firing format: date-time GhostAlertRuleResponse: title: GhostAlertRuleResponse x-stoplight: id: ghost_alert_rule_response description: Response for ghost alerts that exist in Prometheus but have been deleted from the database allOf: - $ref: '#/components/schemas/AlertRuleResponseBase' - type: object properties: target: allOf: - $ref: '#/components/schemas/AlertTarget' - nullable: true description: May be null if target info couldn't be extracted from Prometheus starts_at: type: string x-stoplight: id: ghost_starts_at description: When the ghost alert started firing format: date-time nullable: true AlertRuleConditionKind: title: AlertRuleConditionKind x-stoplight: id: 275ykwbxqzr24 enum: - CUSTOM - BUILT AlertRuleCondition: title: AlertRuleCondition x-stoplight: id: x5o1gdqlpoyei type: object required: - kind - promql properties: kind: $ref: '#/components/schemas/AlertRuleConditionKind' operator: $ref: '#/components/schemas/AlertRuleConditionOperator' threshold: type: number x-stoplight: id: ua0w1t89vrl0b function: $ref: '#/components/schemas/AlertRuleConditionFunction' promql: type: string x-stoplight: id: 6xaesnuka2c2q ServiceTypeEnum: type: string x-stoplight: id: d66063cd29913 description: type of the service (application, database, job, ...) enum: - APPLICATION - DATABASE - CONTAINER - JOB - HELM - TERRAFORM - ARGOCD_APP AlertRuleConditionFunction: title: AlertRuleConditionFunction x-stoplight: id: 7tp2xk2ehojvz enum: - NONE - AVG - MAX - MIN - SUM - COUNT AlertRuleConditionOperator: title: AlertRuleConditionOperator x-stoplight: id: hpxq0ysquqnts enum: - NONE - ABOVE - BELOW - ABOVE_OR_EQUAL - BELOW_OR_EQUAL - EQUAL ServiceLightResponse: title: ServiceLightResponse x-stoplight: id: tg1rwcmait89l type: object required: - id - name - description - icon_uri - service_type - project_id - project_name - environment_id - environment_name - cluster_id properties: id: type: string x-stoplight: id: kusnde41nhbq0 format: uuid name: type: string x-stoplight: id: uxr40wquz4uo4 description: type: string x-stoplight: id: 71c9yrajgrd9f icon_uri: type: string format: uri x-stoplight: id: k6zs0jdg7k95f service_type: $ref: '#/components/schemas/ServiceTypeEnum' project_id: type: string x-stoplight: id: 6j6xz0qq65mbs format: uuid project_name: type: string x-stoplight: id: jfl0pof91101b environment_id: type: string x-stoplight: id: cs79bi0ic3r18 format: uuid environment_name: type: string x-stoplight: id: s8c6hmto9njzg cluster_id: type: string x-stoplight: id: hg9qpxe5z7 format: uuid job_type: x-stoplight: id: jwtmqb1fq5a6m enum: - CRON - LIFECYCLE AlertRuleList: title: AlertRuleList x-stoplight: id: hawsqfl98nqlz type: object required: - results properties: results: type: array x-stoplight: id: nsk4tfkil7yuf items: oneOf: - $ref: '#/components/schemas/AlertRuleResponse' - $ref: '#/components/schemas/GhostAlertRuleResponse' discriminator: propertyName: source mapping: MANAGED: '#/components/schemas/AlertRuleResponse' GHOST: '#/components/schemas/GhostAlertRuleResponse' AlertRuleSource: title: AlertRuleSource x-stoplight: id: alert_rule_source_enum description: 'Source of the alert rule: - MANAGED: Alert rule created and managed through the Qovery API - GHOST: Alert rule that exists in Prometheus but has been deleted from the database' enum: - MANAGED - GHOST AlertTarget: title: AlertTarget x-stoplight: id: rv11vyq7cy4dn type: object required: - target_type - target_id properties: target_type: $ref: '#/components/schemas/AlertTargetType' target_id: type: string x-stoplight: id: 8begp36fsknxq format: uuid service: $ref: '#/components/schemas/ServiceLightResponse' description: Service details when target_type is APPLICATION, CONTAINER, JOB, CRONJOB, HELM or TERRAFORM AlertRuleCreationRequest: title: AlertRuleCreationRequest x-stoplight: id: mcgiquvv7m2vp type: object required: - organization_id - cluster_id - name - description - tag - condition - for_duration - severity - presentation - enabled - alert_receiver_ids - target properties: organization_id: type: string x-stoplight: id: qe8mxuqf5rerq format: uuid description: Organization identifier cluster_id: type: string x-stoplight: id: luojx47y8mgl1 format: uuid description: ' Cluster identifier where the rule will be deployed' name: type: string x-stoplight: id: 7ih1egmfghew9 description: Name of the alert rule description: type: string x-stoplight: id: jhc5u599bha5a description: 'Description of what the alert monitors ' tag: type: string x-stoplight: id: eaisshdmo1xgi condition: $ref: '#/components/schemas/AlertRuleCondition' for_duration: type: string x-stoplight: id: 8jk0kcca7whc6 description: Duration the condition must be true before firing (ISO-8601 duration format) format: duration severity: $ref: '#/components/schemas/AlertSeverity' presentation: $ref: '#/components/schemas/AlertPresentation' enabled: type: boolean x-stoplight: id: 0ksuq2b0flii5 description: Whether the alert rule is enabled alert_receiver_ids: type: array x-stoplight: id: oy3dbybxgmvs5 description: List of alert receiver IDs to send notifications to minItems: 1 items: x-stoplight: id: cc3sm9sjduuqf type: string format: uuid target: $ref: '#/components/schemas/AlertTarget' AlertPresentationResponse: title: AlertPresentationResponse x-stoplight: id: dx514vxebudw0 type: object properties: summary: type: string x-stoplight: id: z5t89ub093022 description: ' Alert summary template' nullable: true runbook_url: type: string x-stoplight: id: kf94o17fes7zl description: URL to runbook with remediation steps format: uri nullable: true AlertRuleState: title: AlertRuleState x-stoplight: id: 05u4rv9rrfvcp enum: - UNDEPLOYED - OK - TRIGGERED - PENDING_NOTIFICATION - NOTIFIED - SUPPRESSED - UNROUTED AlertSeverity: title: AlertSeverity x-stoplight: id: 74rrc7nvxpc30 description: "Alert severity level:\n - LOW: Minor issues or informational alerts that don't require immediate attention. Can be addressed during normal business hours.\n - MEDIUM: Moderate issues that should be investigated soon but don't impact critical services. May cause degraded performance or minor service disruption.\n - HIGH: Serious issues affecting service quality or availability. Requires prompt attention and resolution within hours.\n - CRITICAL: Critical issue requiring immediate action. Service outage, data loss risk, or severe performance degradation affecting users." enum: - LOW - MEDIUM - HIGH - CRITICAL AlertRuleResponseBase: title: AlertRuleResponseBase x-stoplight: id: alert_rule_response_base description: Base schema for alert rule responses with discriminator type: object required: - source - name - state properties: source: $ref: '#/components/schemas/AlertRuleSource' name: type: string x-stoplight: id: base_name_prop description: Name of the alert rule state: $ref: '#/components/schemas/AlertRuleState' discriminator: propertyName: source mapping: MANAGED: '#/components/schemas/AlertRuleResponse' GHOST: '#/components/schemas/GhostAlertRuleResponse' AlertPresentation: title: AlertPresentation x-stoplight: id: csg2krsbv2i40 type: object properties: summary: type: string x-stoplight: id: 4q8s7z1uu8kvm nullable: true runbook_url: type: string x-stoplight: id: fe7wk13airhnu description: URL to runbook with remediation steps format: uri nullable: true AlertRuleEditRequest: title: AlertRuleEditRequest x-stoplight: id: 6914x54u4sgg0 type: object required: - name - description - tag - condition - for_duration - severity - enabled - alert_receiver_ids - presentation properties: name: type: string x-stoplight: id: 7zbib93n861tt description: Name of the alert rule description: type: string x-stoplight: id: 2xpgzz03za6jo description: Description of what the alert monitors tag: type: string x-stoplight: id: p754eq1nh7gqp condition: $ref: '#/components/schemas/AlertRuleCondition' for_duration: type: string x-stoplight: id: auoq20czr9ouh format: duration description: Duration the condition must be true before firing (ISO-8601 duration format) severity: $ref: '#/components/schemas/AlertSeverity' enabled: type: boolean x-stoplight: id: uayodiines5vd description: Whether the alert rule is enabled alert_receiver_ids: type: array x-stoplight: id: n42yd3ffbfzdq description: List of alert receiver IDs to send notifications to minItems: 1 items: x-stoplight: id: xt3qvn76g9znl type: string format: uuid presentation: $ref: '#/components/schemas/AlertPresentation' 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 parameters: alertRuleId: name: alertRuleId in: path description: Alert Rule ID required: true schema: type: string format: uuid organizationId: name: organizationId in: path description: Organization ID required: true schema: type: string format: uuid responses: '400': description: Bad request '403': description: Access forbidden '404': description: Resource not found '401': description: Access token is missing or invalid 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