mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
docs(api): add alerts report endpoint and apikey-stats query params
- Add internal /internal/alerts/report POST endpoint documentation - Add reportAlertEntry, reportAlertsRequest, reportAlertsResponse schemas - Add since/until query parameters to /admin/apikey-stats/summary endpoint
This commit is contained in:
@@ -1164,6 +1164,51 @@ definitions:
|
||||
ref:
|
||||
type: string
|
||||
type: object
|
||||
internal_api.reportAlertEntry:
|
||||
properties:
|
||||
fingerprint:
|
||||
type: string
|
||||
message:
|
||||
type: string
|
||||
metadata:
|
||||
type: string
|
||||
related_id:
|
||||
type: integer
|
||||
related_name:
|
||||
type: string
|
||||
related_type:
|
||||
type: string
|
||||
severity:
|
||||
type: string
|
||||
title:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
required:
|
||||
- severity
|
||||
- title
|
||||
- type
|
||||
type: object
|
||||
internal_api.reportAlertsRequest:
|
||||
properties:
|
||||
alerts:
|
||||
items:
|
||||
$ref: '#/definitions/internal_api.reportAlertEntry'
|
||||
type: array
|
||||
required:
|
||||
- alerts
|
||||
type: object
|
||||
internal_api.reportAlertsResponse:
|
||||
properties:
|
||||
accepted:
|
||||
type: integer
|
||||
deduplicated:
|
||||
type: integer
|
||||
errors:
|
||||
items:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
internal_api.statsFlushEntry:
|
||||
properties:
|
||||
last_accessed_at:
|
||||
@@ -1681,6 +1726,15 @@ paths:
|
||||
/admin/apikey-stats/summary:
|
||||
get:
|
||||
description: Aggregate APIKey success/failure stats across all provider groups
|
||||
parameters:
|
||||
- description: Start time (unix seconds)
|
||||
in: query
|
||||
name: since
|
||||
type: integer
|
||||
- description: End time (unix seconds)
|
||||
in: query
|
||||
name: until
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
@@ -3386,6 +3440,36 @@ paths:
|
||||
summary: Get current identity
|
||||
tags:
|
||||
- auth
|
||||
/internal/alerts/report:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: Internal endpoint for Data Plane to report alerts to Control Plane
|
||||
parameters:
|
||||
- description: Alerts to report
|
||||
in: body
|
||||
name: request
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.reportAlertsRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/internal_api.reportAlertsResponse'
|
||||
"400":
|
||||
description: Bad Request
|
||||
schema:
|
||||
$ref: '#/definitions/gin.H'
|
||||
"500":
|
||||
description: Internal Server Error
|
||||
schema:
|
||||
$ref: '#/definitions/gin.H'
|
||||
summary: Report alerts from DP
|
||||
tags:
|
||||
- internal
|
||||
/internal/apikey-stats/flush:
|
||||
post:
|
||||
consumes:
|
||||
|
||||
Reference in New Issue
Block a user