mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
docs(api): add alert thresholds endpoints to swagger documentation
Add OpenAPI documentation for the new alert threshold management endpoints used in traffic spike detection: - GET /admin/alerts/thresholds - retrieve current threshold config - PUT /admin/alerts/thresholds - update threshold configuration Include AlertThresholdView and UpdateAlertThresholdsRequest schema definitions with properties for QPS, RPM, TPM, RPD, TPD limits.
This commit is contained in:
@@ -181,6 +181,86 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/alerts/thresholds": {
|
||||
"get": {
|
||||
"security": [
|
||||
{
|
||||
"AdminAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Get current alert threshold configuration for traffic spike detection",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "Get alert thresholds",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.AlertThresholdView"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gin.H"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"AdminAuth": []
|
||||
}
|
||||
],
|
||||
"description": "Update alert threshold configuration for traffic spike detection",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"admin"
|
||||
],
|
||||
"summary": "Update alert thresholds",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Threshold configuration",
|
||||
"name": "request",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.UpdateAlertThresholdsRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/internal_api.AlertThresholdView"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gin.H"
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "Internal Server Error",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gin.H"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/admin/alerts/{id}": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -4823,6 +4903,35 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.AlertThresholdView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"global_qps": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_rpd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_rpm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_tpd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_tpm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_rpm_requests_1m": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_tpm_tokens_1m": {
|
||||
"type": "integer"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.AlertView": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -5739,6 +5848,32 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.UpdateAlertThresholdsRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"global_qps": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_rpd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_rpm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_tpd": {
|
||||
"type": "integer"
|
||||
},
|
||||
"master_tpm": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_rpm_requests_1m": {
|
||||
"type": "integer"
|
||||
},
|
||||
"min_tpm_tokens_1m": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"internal_api.UpdateMasterRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user