Events.com Alert History API

APIs for managing alert execution history

OpenAPI Specification

eventscom-alert-history-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Saasxl-api doc Alert History API
  version: '1.0'
  description: APIs for managing alert execution history
servers:
- url: https://datagol-be.events.com
  description: Generated server url
tags:
- name: Alert History
  description: APIs for managing alert execution history
paths:
  /alerts/history/api/v1/statistics:
    get:
      tags:
      - Alert History
      summary: Get alert statistics for company
      description: Retrieve alert execution statistics for the user's company
      operationId: getAlertStatistics
      parameters:
      - name: since
        in: query
        required: true
        schema:
          type: string
          format: date-time
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TupleStringMapStringObject'
      security:
      - s_jwt: []
  /alerts/history/api/v1/company:
    get:
      tags:
      - Alert History
      summary: Get alert history for company
      description: Retrieve all alert execution history for the user's company
      operationId: getCompanyAlertHistory
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertHistoryDTO'
      security:
      - s_jwt: []
  /alerts/history/api/v1/company/paginated:
    get:
      tags:
      - Alert History
      summary: Get paginated alert history for company
      description: Retrieve paginated alert execution history for the user's company
      operationId: getCompanyAlertHistoryPaginated
      parameters:
      - name: pageable
        in: query
        description: Pagination parameters
        required: true
        schema:
          $ref: '#/components/schemas/Pageable'
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PageAlertHistoryDTO'
      security:
      - s_jwt: []
  /alerts/history/api/v1/company/count/triggered:
    get:
      tags:
      - Alert History
      summary: Count triggered alerts for company
      description: Get the count of triggered alerts for the user's company
      operationId: countCompanyTriggeredAlerts
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                additionalProperties:
                  type: integer
                  format: int64
      security:
      - s_jwt: []
  /alerts/history/api/v1/alert/{alertId}:
    get:
      tags:
      - Alert History
      summary: Get alert history for a specific alert
      description: Retrieve all execution history for a specific alert
      operationId: getAlertHistory
      parameters:
      - name: alertId
        in: path
        description: Alert ID
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertHistoryDTO'
      security:
      - s_jwt: []
    delete:
      tags:
      - Alert History
      summary: Delete alert history for specific alert
      description: Delete all execution history for a specific alert
      operationId: deleteAlertHistory
      parameters:
      - name: alertId
        in: path
        description: Alert ID
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
      security:
      - s_jwt: []
  /alerts/history/api/v1/alert/{alertId}/triggered:
    get:
      tags:
      - Alert History
      summary: Get triggered alerts for a specific alert
      description: Retrieve only triggered alert executions for a specific alert
      operationId: getTriggeredAlerts
      parameters:
      - name: alertId
        in: path
        description: Alert ID
        required: true
        schema:
          type: string
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertHistoryDTO'
      security:
      - s_jwt: []
  /alerts/history/api/v1/alert/{alertId}/paginated:
    get:
      tags:
      - Alert History
      summary: Get paginated alert history for a specific alert
      description: Retrieve paginated execution history for a specific alert
      operationId: getAlertHistoryPaginated
      parameters:
      - name: alertId
        in: path
        description: Alert ID
        required: true
        schema:
          type: string
      - name: pageable
        in: query
        description: Pagination parameters
        required: true
        schema:
          $ref: '#/components/schemas/Pageable'
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PageAlertHistoryDTO'
      security:
      - s_jwt: []
  /alerts/history/api/v1/cleanup:
    delete:
      tags:
      - Alert History
      summary: Clean up old alert history
      description: Delete alert history entries older than the specified date
      operationId: cleanupOldAlertHistory
      parameters:
      - name: beforeDate
        in: query
        description: Before date (ISO format)
        required: true
        schema:
          type: string
          format: date-time
      responses:
        '400':
          description: Bad Request
          content:
            '*/*':
              schema:
                oneOf:
                - type: object
                - $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '503':
          description: Service Unavailable
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '403':
          description: Forbidden
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '501':
          description: Not Implemented
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '500':
          description: Internal Server Error
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/SaasxlResponseDTOObject'
        '200':
          description: OK
      security:
      - s_jwt: []
components:
  schemas:
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        paged:
          type: boolean
        unpaged:
          type: boolean
    SaasxlResponseDTOObject:
      type: object
      properties:
        success:
          type: boolean
        version:
          type: string
        date:
          type: string
          format: date-time
        error:
          $ref: '#/components/schemas/ErrorMessage'
        data:
          type: object
    UserDTO:
      type: object
      properties:
        id:
          type: integer
          format: int64
        firstname:
          type: string
        lastname:
          type: string
        email:
          type: string
        companyName:
          type: string
        companyId:
          type: integer
          format: int64
        status:
          type: string
        roles:
          type: array
          items:
            type: string
        permissions:
          uniqueItems: true
          type: array
          items:
            type: string
        joinDate:
          type: string
          format: date-time
        mfaEnabled:
          type: boolean
        redirectToMfaFlow:
          type: boolean
        tokenExpiryTime:
          type: integer
          format: int64
        isServiceAccount:
          type: boolean
        lastLogin:
          type: string
          format: date-time
        signInMethod:
          type: string
          enum:
          - EMAIL
          - GOOGLE
          - MICROSOFT
        isOnboardingCompleted:
          type: boolean
        role:
          type: string
        department:
          type: string
        anonymousUserId:
          type: string
        thirdPartyUser:
          type: boolean
    ErrorMessage:
      type: object
      properties:
        statusCode:
          type: integer
          format: int32
        requestId:
          type: string
        message:
          type: object
        details:
          type: object
        errorCodes:
          type: array
          items:
            type: string
    Pageable:
      type: object
      properties:
        page:
          minimum: 0
          type: integer
          format: int32
        size:
          minimum: 1
          type: integer
          format: int32
        sort:
          type: array
          items:
            type: string
    TupleStringMapStringObject:
      type: object
      properties:
        item1:
          type: string
        item2:
          type: object
          additionalProperties:
            type: object
    SortObject:
      type: object
      properties:
        direction:
          type: string
        nullHandling:
          type: string
        ascending:
          type: boolean
        property:
          type: string
        ignoreCase:
          type: boolean
    PageAlertHistoryDTO:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        pageable:
          $ref: '#/components/schemas/PageableObject'
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/AlertHistoryDTO'
        number:
          type: integer
          format: int32
        sort:
          type: array
          items:
            $ref: '#/components/schemas/SortObject'
        first:
          type: boolean
        last:
          type: boolean
        numberOfElements:
          type: integer
          format: int32
        empty:
          type: boolean
    AlertExecutionMetadata:
      type: object
      properties:
        thresholdOperand:
          type: string
          enum:
          - EQUALS
          - NOT_EQUALS
          - GREATER_THAN
          - GREATER_THAN_EQUALS
          - LESS_THAN
          - LESS_THAN_EQUALS
          - BETWEEN
          - PERCENTAGE_CHANGE
          - ABSOLUTE_CHANGE
          - PERCENTAGE_INCREASE_BY
          - PERCENTAGE_DECREASE_BY
          - IN
          - NOT_IN
          - CONTAINS
          - DOES_NOT_CONTAINS
          - NOT_BETWEEN
          - STARTS_WITH
        thresholdValue:
          type: number
          format: double
        executionStatus:
          type: string
        errorMessage:
          type: string
        triggerMessage:
          type: string
        executionTimeMs:
          type: integer
          format: int64
        dataSource:
          type: string
        tableName:
          type: string
        columnName:
          type: string
        aggregationType:
          type: string
        filters:
          type: string
        cronExpression:
          type: string
        jobKey:
          type: string
        jobGroup:
          type: string
    AlertHistoryDTO:
      type: object
      properties:
        createdBy:
          $ref: '#/components/schemas/UserDTO'
        modifiedBy:
          $ref: '#/components/schemas/UserDTO'
        createDate:
          type: string
          format: date-time
        modiDate:
          type: string
          format: date-time
        id:
          type: string
        alertId:
          type: string
        alertName:
          type: string
        executedAt:
          type: string
          format: date-time
        value:
          type: number
          format: double
        comparisonValue:
          type: number
          format: double
        query:
          type: string
        executionMetadata:
          $ref: '#/components/schemas/AlertExecutionMetadata'
        thresholdMet:
          type: boolean
        notificationSent:
          type: boolean
        alertDescription:
          type: string
        alertStatus:
          type: string
        alertSourceType:
          type: string
        alertSourceId:
          type: string
  securitySchemes:
    s_jwt:
      type: http
      description: Jwt Token
      scheme: bearer
      bearerFormat: JWT