diff --git a/internal/api/swagger.yaml b/internal/api/swagger.yaml index f46f4a5..e0b03a7 100644 --- a/internal/api/swagger.yaml +++ b/internal/api/swagger.yaml @@ -2,17 +2,17 @@ openapi: 3.0.3 info: title: Moonlogs description: Moonlogs API - termsOfService: 'https://moonlogs.pages.dev' + termsOfService: https://moonlogs.pages.dev contact: email: shalpack@gmail.com name: Pijng license: name: Apache 2.0 url: http://www.apache.org/licenses/LICENSE-2.0.html - version: 1.18.5 + version: 1.18.6 externalDocs: description: Find out more about spec - url: 'https://moonlogs.pages.dev' + url: https://moonlogs.pages.dev servers: [] tags: - name: Default @@ -378,7 +378,7 @@ paths: post: description: '' operationId: searchLogs - tags: [] + tags: &ref_16 [] parameters: - in: query name: page @@ -431,7 +431,7 @@ paths: - error - data - code - security: + security: &ref_17 - http1: [] /api/users: get: @@ -1396,6 +1396,44 @@ paths: - code security: - http1: [] + /api/incidents/search: + post: + description: '' + operationId: searchIncidents + tags: *ref_16 + parameters: [] + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/IncidentSearchRequest' + responses: + '200': + description: '' + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + code: + type: integer + error: + type: string + data: + type: array + items: + $ref: '#/components/schemas/IncidentResponse' + meta: + $ref: '#/components/schemas/Meta' + required: + - success + - meta + - error + - data + - code + security: *ref_17 components: schemas: SchemaResponse: @@ -1787,6 +1825,37 @@ components: - pattern - method - schema_name + IncidentSearchRequest: + type: object + properties: + keys: + type: object + properties: {} + IncidentResponse: + type: object + properties: + id: + type: integer + rule_name: + type: string + rule_id: + type: integer + keys: + type: object + properties: {} + count: + type: integer + ttl: + type: string + description: ISO8601 date-time + format: date-time + required: + - id + - rule_name + - rule_id + - keys + - count + - ttl securitySchemes: http1: type: http