|
354 | 354 | "description": "The app key to filter integrations", |
355 | 355 | "required": true, |
356 | 356 | "schema": { |
357 | | - "type": "string" |
| 357 | + "$ref": "#/components/schemas/Platform.App.AppEnum" |
358 | 358 | } |
359 | 359 | }, |
360 | 360 | { |
|
1794 | 1794 | }, |
1795 | 1795 | "Platform.AlertRule.Request": { |
1796 | 1796 | "allOf": [ |
| 1797 | + { |
| 1798 | + "properties": { |
| 1799 | + "scope": { |
| 1800 | + "description": "Scoped of the alert rule", |
| 1801 | + "type": "string", |
| 1802 | + "enum": [ |
| 1803 | + "organization", |
| 1804 | + "project" |
| 1805 | + ], |
| 1806 | + "example": "organization" |
| 1807 | + } |
| 1808 | + }, |
| 1809 | + "type": "object" |
| 1810 | + }, |
1797 | 1811 | { |
1798 | 1812 | "$ref": "#/components/schemas/Platform.AlertRule" |
1799 | 1813 | } |
|
1879 | 1893 | "type": "number", |
1880 | 1894 | "example": 1 |
1881 | 1895 | }, |
| 1896 | + "project_id": { |
| 1897 | + "description": "The ID of a project to use as a scope", |
| 1898 | + "type": "number", |
| 1899 | + "example": 1, |
| 1900 | + "nullable": true |
| 1901 | + }, |
1882 | 1902 | "event": { |
1883 | 1903 | "description": "Name of the event that will trigger the execution of the alert rule", |
1884 | 1904 | "oneOf": [ |
|
1887 | 1907 | } |
1888 | 1908 | ] |
1889 | 1909 | }, |
1890 | | - "project_id": { |
1891 | | - "description": "The ID of a project to use as a scope", |
1892 | | - "type": "number", |
1893 | | - "example": 1, |
1894 | | - "nullable": true |
1895 | | - }, |
1896 | 1910 | "integration_id": { |
1897 | 1911 | "description": "The ID of the integration used to send a notification when the alert rule is executed", |
1898 | 1912 | "type": "number", |
|
1913 | 1927 | ], |
1914 | 1928 | "example": 5 |
1915 | 1929 | }, |
| 1930 | + "event_settings": { |
| 1931 | + "description": "Additional settings for the event", |
| 1932 | + "anyOf": [ |
| 1933 | + { |
| 1934 | + "title": "Empty", |
| 1935 | + "type": "object", |
| 1936 | + "nullable": true |
| 1937 | + }, |
| 1938 | + { |
| 1939 | + "$ref": "#/components/schemas/Platform.Event.UptimeIncident.AlertRuleSettings" |
| 1940 | + }, |
| 1941 | + { |
| 1942 | + "$ref": "#/components/schemas/Platform.Event.UptimeMonitorCertificateExpiring.AlertRuleSettings" |
| 1943 | + } |
| 1944 | + ] |
| 1945 | + }, |
| 1946 | + "integration_settings": { |
| 1947 | + "description": "Additional settings for the integration", |
| 1948 | + "anyOf": [ |
| 1949 | + { |
| 1950 | + "title": "Empty", |
| 1951 | + "type": "object", |
| 1952 | + "nullable": true |
| 1953 | + }, |
| 1954 | + { |
| 1955 | + "$ref": "#/components/schemas/Platform.App.Ntfy.AlertRuleSettings" |
| 1956 | + }, |
| 1957 | + { |
| 1958 | + "$ref": "#/components/schemas/Platform.App.OutgoingWebhook.AlertRuleSettings" |
| 1959 | + }, |
| 1960 | + { |
| 1961 | + "$ref": "#/components/schemas/Platform.App.Pushover.AlertRuleSettings" |
| 1962 | + } |
| 1963 | + ] |
| 1964 | + }, |
1916 | 1965 | "created_at": { |
1917 | 1966 | "description": "Date of creation for the entity", |
1918 | 1967 | "type": "string", |
|
2773 | 2822 | } |
2774 | 2823 | ] |
2775 | 2824 | }, |
2776 | | - "project_id": { |
2777 | | - "description": "The ID of a project to use as a scope", |
2778 | | - "type": "number", |
2779 | | - "example": 1, |
2780 | | - "nullable": true |
2781 | | - }, |
2782 | 2825 | "integration_id": { |
2783 | 2826 | "description": "The ID of the integration used to send a notification when the alert rule is executed", |
2784 | 2827 | "type": "number", |
|
2798 | 2841 | 1440 |
2799 | 2842 | ], |
2800 | 2843 | "example": 5 |
| 2844 | + }, |
| 2845 | + "event_settings": { |
| 2846 | + "description": "Additional settings for the event", |
| 2847 | + "anyOf": [ |
| 2848 | + { |
| 2849 | + "title": "Empty", |
| 2850 | + "type": "object", |
| 2851 | + "nullable": true |
| 2852 | + }, |
| 2853 | + { |
| 2854 | + "$ref": "#/components/schemas/Platform.Event.UptimeIncident.AlertRuleSettings" |
| 2855 | + }, |
| 2856 | + { |
| 2857 | + "$ref": "#/components/schemas/Platform.Event.UptimeMonitorCertificateExpiring.AlertRuleSettings" |
| 2858 | + } |
| 2859 | + ] |
| 2860 | + }, |
| 2861 | + "integration_settings": { |
| 2862 | + "description": "Additional settings for the integration", |
| 2863 | + "anyOf": [ |
| 2864 | + { |
| 2865 | + "title": "Empty", |
| 2866 | + "type": "object", |
| 2867 | + "nullable": true |
| 2868 | + }, |
| 2869 | + { |
| 2870 | + "$ref": "#/components/schemas/Platform.App.Ntfy.AlertRuleSettings" |
| 2871 | + }, |
| 2872 | + { |
| 2873 | + "$ref": "#/components/schemas/Platform.App.OutgoingWebhook.AlertRuleSettings" |
| 2874 | + }, |
| 2875 | + { |
| 2876 | + "$ref": "#/components/schemas/Platform.App.Pushover.AlertRuleSettings" |
| 2877 | + } |
| 2878 | + ] |
2801 | 2879 | } |
2802 | 2880 | }, |
2803 | 2881 | "type": "object" |
|
3375 | 3453 | }, |
3376 | 3454 | "type": "object" |
3377 | 3455 | }, |
| 3456 | + "Platform.App.Ntfy.AlertRuleSettings": { |
| 3457 | + "title": "Ntfy", |
| 3458 | + "required": [ |
| 3459 | + "priority" |
| 3460 | + ], |
| 3461 | + "properties": { |
| 3462 | + "priority": { |
| 3463 | + "description": "Notification priority level", |
| 3464 | + "type": "string", |
| 3465 | + "enum": [ |
| 3466 | + "min", |
| 3467 | + "low", |
| 3468 | + "default", |
| 3469 | + "high", |
| 3470 | + "max" |
| 3471 | + ], |
| 3472 | + "example": "default" |
| 3473 | + } |
| 3474 | + }, |
| 3475 | + "type": "object" |
| 3476 | + }, |
| 3477 | + "Platform.App.OutgoingWebhook.AlertRuleSettings": { |
| 3478 | + "title": "Outgoing Webhooks", |
| 3479 | + "required": [ |
| 3480 | + "schema" |
| 3481 | + ], |
| 3482 | + "properties": { |
| 3483 | + "schema": { |
| 3484 | + "description": "JSON schema defining the webhook payload structure", |
| 3485 | + "type": "string", |
| 3486 | + "format": "json", |
| 3487 | + "maxLength": 5000, |
| 3488 | + "example": "{\"id\": \"{{ alert_rule_request.id }}\", \"event\": \"{{ event.key }}\"}" |
| 3489 | + } |
| 3490 | + }, |
| 3491 | + "type": "object" |
| 3492 | + }, |
| 3493 | + "Platform.App.Pushover.AlertRuleSettings": { |
| 3494 | + "title": "Pushover", |
| 3495 | + "properties": { |
| 3496 | + "priority": { |
| 3497 | + "description": "Notification priority level", |
| 3498 | + "type": "string", |
| 3499 | + "enum": [ |
| 3500 | + "lowest", |
| 3501 | + "low", |
| 3502 | + "normal", |
| 3503 | + "high", |
| 3504 | + "emergency" |
| 3505 | + ], |
| 3506 | + "example": "normal" |
| 3507 | + }, |
| 3508 | + "retry": { |
| 3509 | + "description": "Retry interval in seconds (required for emergency priority)", |
| 3510 | + "type": "integer", |
| 3511 | + "maximum": 86400, |
| 3512 | + "minimum": 30, |
| 3513 | + "example": 300, |
| 3514 | + "nullable": true |
| 3515 | + }, |
| 3516 | + "expire": { |
| 3517 | + "description": "Expiration time in seconds (required for emergency priority)", |
| 3518 | + "type": "integer", |
| 3519 | + "maximum": 10800, |
| 3520 | + "minimum": 30, |
| 3521 | + "example": 3600, |
| 3522 | + "nullable": true |
| 3523 | + } |
| 3524 | + }, |
| 3525 | + "type": "object" |
| 3526 | + }, |
| 3527 | + "Platform.Event.UptimeIncident.AlertRuleSettings": { |
| 3528 | + "title": "Uptime incident", |
| 3529 | + "required": [ |
| 3530 | + "type" |
| 3531 | + ], |
| 3532 | + "properties": { |
| 3533 | + "type": { |
| 3534 | + "description": "Type of incident to notify about", |
| 3535 | + "type": "string", |
| 3536 | + "enum": [ |
| 3537 | + "all", |
| 3538 | + "monitor", |
| 3539 | + "manual" |
| 3540 | + ], |
| 3541 | + "example": "all" |
| 3542 | + } |
| 3543 | + }, |
| 3544 | + "type": "object" |
| 3545 | + }, |
| 3546 | + "Platform.Event.UptimeMonitorCertificateExpiring.AlertRuleSettings": { |
| 3547 | + "title": "Uptime certificate expiring", |
| 3548 | + "required": [ |
| 3549 | + "days_before_expiry" |
| 3550 | + ], |
| 3551 | + "properties": { |
| 3552 | + "days_before_expiry": { |
| 3553 | + "description": "Days to notify before the certificate expires", |
| 3554 | + "type": "integer", |
| 3555 | + "maximum": 60, |
| 3556 | + "minimum": 1, |
| 3557 | + "example": 25 |
| 3558 | + } |
| 3559 | + }, |
| 3560 | + "type": "object" |
| 3561 | + }, |
3378 | 3562 | "Uptime.ProductEvents": { |
3379 | 3563 | "type": "string", |
3380 | 3564 | "enum": [ |
|
3480 | 3664 | "rss", |
3481 | 3665 | "atom" |
3482 | 3666 | ] |
| 3667 | + }, |
| 3668 | + "Platform.App.AppEnum": { |
| 3669 | + "type": "string", |
| 3670 | + "enum": [ |
| 3671 | + "sms", |
| 3672 | + "discord", |
| 3673 | + "email", |
| 3674 | + "ilert", |
| 3675 | + "ntfy", |
| 3676 | + "outgoing_webhook", |
| 3677 | + "pushover", |
| 3678 | + "slack", |
| 3679 | + "telegram" |
| 3680 | + ] |
3483 | 3681 | } |
3484 | 3682 | }, |
3485 | 3683 | "responses": { |
|
0 commit comments