Skip to content

Commit 6892e15

Browse files
author
Sentio Bot
committed
chore: update
1 parent 17774b7 commit 6892e15

12 files changed

+2718
-0
lines changed

doc/index.html

Lines changed: 976 additions & 0 deletions
Large diffs are not rendered by default.

openapi.json

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,33 @@
1616
"application/json"
1717
],
1818
"paths": {
19+
"/api/v1/alerts/rule": {
20+
"post": {
21+
"operationId": "SaveAlertRule",
22+
"responses": {
23+
"200": {
24+
"description": "A successful response.",
25+
"schema": {
26+
"type": "object",
27+
"properties": {}
28+
}
29+
}
30+
},
31+
"parameters": [
32+
{
33+
"name": "body",
34+
"in": "body",
35+
"required": true,
36+
"schema": {
37+
"$ref": "#/definitions/alert_service.SaveAlertRuleRequest"
38+
}
39+
}
40+
],
41+
"tags": [
42+
"Alerts"
43+
]
44+
}
45+
},
1946
"/api/v1/alerts/rule/project/{projectId}": {
2047
"get": {
2148
"summary": "List all alert rules for a project",
@@ -41,6 +68,39 @@
4168
]
4269
}
4370
},
71+
"/api/v1/alerts/rule/{id}": {
72+
"put": {
73+
"operationId": "SaveAlertRule2",
74+
"responses": {
75+
"200": {
76+
"description": "A successful response.",
77+
"schema": {
78+
"type": "object",
79+
"properties": {}
80+
}
81+
}
82+
},
83+
"parameters": [
84+
{
85+
"name": "id",
86+
"in": "path",
87+
"required": true,
88+
"type": "string"
89+
},
90+
{
91+
"name": "body",
92+
"in": "body",
93+
"required": true,
94+
"schema": {
95+
"$ref": "#/definitions/alert_service.AlertService.SaveAlertRuleBody"
96+
}
97+
}
98+
],
99+
"tags": [
100+
"Alerts"
101+
]
102+
}
103+
},
44104
"/api/v1/alerts/{ruleId}": {
45105
"get": {
46106
"summary": "Find an alert rule by id, and list all alerts for this rule",
@@ -2360,6 +2420,76 @@
23602420
],
23612421
"default": "NO_DATA"
23622422
},
2423+
"alert_service.AlertService.SaveAlertRuleBody": {
2424+
"type": "object",
2425+
"properties": {
2426+
"rule": {
2427+
"type": "object",
2428+
"properties": {
2429+
"projectId": {
2430+
"type": "string",
2431+
"title": "project it belongs to"
2432+
},
2433+
"state": {
2434+
"$ref": "#/definitions/alert_service.AlertRule.State"
2435+
},
2436+
"subject": {
2437+
"type": "string"
2438+
},
2439+
"message": {
2440+
"type": "string"
2441+
},
2442+
"group": {
2443+
"type": "string"
2444+
},
2445+
"query": {
2446+
"type": "string"
2447+
},
2448+
"for": {
2449+
"$ref": "#/definitions/common.Duration"
2450+
},
2451+
"channels": {
2452+
"type": "array",
2453+
"items": {
2454+
"type": "object",
2455+
"$ref": "#/definitions/common.Channel"
2456+
}
2457+
},
2458+
"updateTime": {
2459+
"type": "string",
2460+
"format": "date-time"
2461+
},
2462+
"condition": {
2463+
"$ref": "#/definitions/alert_service.Condition"
2464+
},
2465+
"renotifyDuration": {
2466+
"$ref": "#/definitions/common.Duration"
2467+
},
2468+
"renotifyLimit": {
2469+
"type": "integer",
2470+
"format": "int32"
2471+
},
2472+
"alertType": {
2473+
"$ref": "#/definitions/alert_service.AlertType"
2474+
},
2475+
"logCondition": {
2476+
"$ref": "#/definitions/alert_service.LogCondition"
2477+
},
2478+
"lastQueryTime": {
2479+
"type": "string",
2480+
"format": "date-time"
2481+
},
2482+
"mute": {
2483+
"type": "boolean"
2484+
},
2485+
"interval": {
2486+
"$ref": "#/definitions/common.Duration"
2487+
}
2488+
},
2489+
"title": "maybe need to extract to common so it could used by web as well"
2490+
}
2491+
}
2492+
},
23632493
"alert_service.AlertType": {
23642494
"type": "string",
23652495
"enum": [
@@ -2527,6 +2657,14 @@
25272657
}
25282658
}
25292659
},
2660+
"alert_service.SaveAlertRuleRequest": {
2661+
"type": "object",
2662+
"properties": {
2663+
"rule": {
2664+
"$ref": "#/definitions/alert_service.AlertRule"
2665+
}
2666+
}
2667+
},
25302668
"analytic_service.AnalyticService.ExecuteSQLBody": {
25312669
"type": "object",
25322670
"example": {

0 commit comments

Comments
 (0)