Skip to content

Commit 2cb94fe

Browse files
Update openapi.json
1 parent 4e386f0 commit 2cb94fe

1 file changed

Lines changed: 211 additions & 13 deletions

File tree

openapi.json

Lines changed: 211 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@
354354
"description": "The app key to filter integrations",
355355
"required": true,
356356
"schema": {
357-
"type": "string"
357+
"$ref": "#/components/schemas/Platform.App.AppEnum"
358358
}
359359
},
360360
{
@@ -1794,6 +1794,20 @@
17941794
},
17951795
"Platform.AlertRule.Request": {
17961796
"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+
},
17971811
{
17981812
"$ref": "#/components/schemas/Platform.AlertRule"
17991813
}
@@ -1879,6 +1893,12 @@
18791893
"type": "number",
18801894
"example": 1
18811895
},
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+
},
18821902
"event": {
18831903
"description": "Name of the event that will trigger the execution of the alert rule",
18841904
"oneOf": [
@@ -1887,12 +1907,6 @@
18871907
}
18881908
]
18891909
},
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-
},
18961910
"integration_id": {
18971911
"description": "The ID of the integration used to send a notification when the alert rule is executed",
18981912
"type": "number",
@@ -1913,6 +1927,41 @@
19131927
],
19141928
"example": 5
19151929
},
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+
},
19161965
"created_at": {
19171966
"description": "Date of creation for the entity",
19181967
"type": "string",
@@ -2773,12 +2822,6 @@
27732822
}
27742823
]
27752824
},
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-
},
27822825
"integration_id": {
27832826
"description": "The ID of the integration used to send a notification when the alert rule is executed",
27842827
"type": "number",
@@ -2798,6 +2841,41 @@
27982841
1440
27992842
],
28002843
"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+
]
28012879
}
28022880
},
28032881
"type": "object"
@@ -3375,6 +3453,112 @@
33753453
},
33763454
"type": "object"
33773455
},
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+
},
33783562
"Uptime.ProductEvents": {
33793563
"type": "string",
33803564
"enum": [
@@ -3480,6 +3664,20 @@
34803664
"rss",
34813665
"atom"
34823666
]
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+
]
34833681
}
34843682
},
34853683
"responses": {

0 commit comments

Comments
 (0)