Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sentio Bot committed Nov 21, 2024
1 parent 17774b7 commit 6892e15
Show file tree
Hide file tree
Showing 12 changed files with 2,718 additions and 0 deletions.
976 changes: 976 additions & 0 deletions doc/index.html

Large diffs are not rendered by default.

138 changes: 138 additions & 0 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,33 @@
"application/json"
],
"paths": {
"/api/v1/alerts/rule": {
"post": {
"operationId": "SaveAlertRule",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "object",
"properties": {}
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/alert_service.SaveAlertRuleRequest"
}
}
],
"tags": [
"Alerts"
]
}
},
"/api/v1/alerts/rule/project/{projectId}": {
"get": {
"summary": "List all alert rules for a project",
Expand All @@ -41,6 +68,39 @@
]
}
},
"/api/v1/alerts/rule/{id}": {
"put": {
"operationId": "SaveAlertRule2",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"type": "object",
"properties": {}
}
}
},
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/alert_service.AlertService.SaveAlertRuleBody"
}
}
],
"tags": [
"Alerts"
]
}
},
"/api/v1/alerts/{ruleId}": {
"get": {
"summary": "Find an alert rule by id, and list all alerts for this rule",
Expand Down Expand Up @@ -2360,6 +2420,76 @@
],
"default": "NO_DATA"
},
"alert_service.AlertService.SaveAlertRuleBody": {
"type": "object",
"properties": {
"rule": {
"type": "object",
"properties": {
"projectId": {
"type": "string",
"title": "project it belongs to"
},
"state": {
"$ref": "#/definitions/alert_service.AlertRule.State"
},
"subject": {
"type": "string"
},
"message": {
"type": "string"
},
"group": {
"type": "string"
},
"query": {
"type": "string"
},
"for": {
"$ref": "#/definitions/common.Duration"
},
"channels": {
"type": "array",
"items": {
"type": "object",
"$ref": "#/definitions/common.Channel"
}
},
"updateTime": {
"type": "string",
"format": "date-time"
},
"condition": {
"$ref": "#/definitions/alert_service.Condition"
},
"renotifyDuration": {
"$ref": "#/definitions/common.Duration"
},
"renotifyLimit": {
"type": "integer",
"format": "int32"
},
"alertType": {
"$ref": "#/definitions/alert_service.AlertType"
},
"logCondition": {
"$ref": "#/definitions/alert_service.LogCondition"
},
"lastQueryTime": {
"type": "string",
"format": "date-time"
},
"mute": {
"type": "boolean"
},
"interval": {
"$ref": "#/definitions/common.Duration"
}
},
"title": "maybe need to extract to common so it could used by web as well"
}
}
},
"alert_service.AlertType": {
"type": "string",
"enum": [
Expand Down Expand Up @@ -2527,6 +2657,14 @@
}
}
},
"alert_service.SaveAlertRuleRequest": {
"type": "object",
"properties": {
"rule": {
"$ref": "#/definitions/alert_service.AlertRule"
}
}
},
"analytic_service.AnalyticService.ExecuteSQLBody": {
"type": "object",
"example": {
Expand Down
Loading

0 comments on commit 6892e15

Please sign in to comment.