Tessell Event API

The Event API from Tessell — 3 operation(s) for event.

OpenAPI Specification

tessell-event-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Tessell APIs activity-center Event API
  contact:
    email: support@tessell.com
    name: Tessell Inc
    url: https://www.tessell.com
  description: Tessell API Documentation
  termsOfService: https://www.tessell.com/terms
  version: '1.0'
servers:
- url: '{server}'
  variables:
    server:
      default: console.tessell.com
tags:
- name: Event
paths:
  /event-service/events:
    parameters: []
    get:
      summary: Reads event for the current user.
      tags:
      - Event
      operationId: getEvents
      description: Reads event for the current user.
      parameters:
      - name: start-time
        in: query
        description: Start timestamp, when searching events in a range
        required: false
        schema:
          type: string
      - name: end-time
        in: query
        description: End timestamp, when searching events in a range
        required: false
        schema:
          type: string
      - schema:
          type: string
        in: query
        name: entityType
        description: Entity Type
      - schema:
          type: string
        in: query
        name: entityID
        description: Entity/Resource ID
      - schema:
          type: string
        in: query
        name: severity
        description: Severity of the event
      - schema:
          type: string
        in: query
        name: parentEventId
        description: Parent event identifier
      - schema:
          type: string
        in: query
        name: eventType
        description: Event Type
      - schema:
          type: integer
          format: int32
          default: 0
        in: query
        name: pageOffset
        description: Page offset
      - schema:
          type: integer
          default: 10
        in: query
        name: pageSize
        description: Page Size
      - name: Authorization
        in: header
        description: Authorization Token
        required: true
        style: simple
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventApiResponse'
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
  /event-service/event/{eventType}/suppress:
    parameters:
    - schema:
        type: string
      name: eventType
      in: path
      required: true
    patch:
      tags:
      - Event
      summary: Suppress an event type
      operationId: suppressEvent
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      description: Suppress an event type
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entityType:
                  type: string
                entityId:
                  type: string
                severity:
                  $ref: '#/components/schemas/SeverityEvents'
      parameters:
      - name: Authorization
        in: header
        description: Authorization Token
        required: true
        style: simple
        schema:
          type: string
  /event-service/event/{eventType}/unsuppress:
    parameters:
    - schema:
        type: string
      name: eventType
      in: path
      required: true
    patch:
      tags:
      - Event
      summary: Unsuppress a previous suppressed event.
      operationId: unsuppressEvent
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Event'
        default:
          description: API error response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      description: Unsuppress a previously suppressed event.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entityType:
                  type: string
                entityId:
                  type: string
                severity:
                  $ref: '#/components/schemas/SeverityEvents'
      parameters:
      - name: Authorization
        in: header
        description: Authorization Token
        required: true
        style: simple
        schema:
          type: string
components:
  schemas:
    ApiError:
      type: object
      description: Common error response object for non 2xx responses
      properties:
        code:
          type: string
          description: Status code for the error response
        message:
          type: string
          description: Error message for API response
        resolution:
          type: string
        timestamp:
          type: string
          format: date-time
        contextId:
          type: string
          description: ContextId of API request
        sessionId:
          type: string
          description: SessionId of API request
        tessellErrorCode:
          type: string
          description: Unique error code specific to Tessell
    ApiMetadata:
      properties:
        pagination:
          $ref: '#/components/schemas/ApiPaginationInfo'
        records:
          format: int32
          type: integer
        timeZone:
          type: string
      title: ApiMetadata
      type: object
    EventApiResponse:
      title: EventApiResponse
      type: object
      properties:
        metadata:
          $ref: '#/components/schemas/ApiMetadata'
        response:
          $ref: '#/components/schemas/GetEventResponse'
    ApiPaginationInfo:
      title: ApiPaginationInfo
      type: object
      required:
      - pageSize
      - pageOffset
      properties:
        pageOffset:
          format: int32
          type: integer
        pageSize:
          format: int32
          type: integer
    Severity:
      type: string
      description: Severity of a CVE or issue
      enum:
      - CRITICAL
      - HIGH
      - MEDIUM
      - LOW
    Event:
      title: Event
      type: object
      description: Event object
      required:
      - id
      - tenantId
      - subscriptionName
      - userId
      - ownerName
      - eventType
      - appName
      - severity
      - entityId
      - entityName
      - entityType
      - message
      - occurredAt
      - parentEventId
      - order
      - systemGenerated
      properties:
        id:
          type: string
          format: uuid
          x-exclude-from: service
          x-gorm-primary-key: true
          description: event identifier
        tenantId:
          x-exclude-from: service
          x-gorm-column-attrs: not null
          type: string
          description: Tenant identifier
        subscriptionName:
          type: string
          description: Subscription name
        userId:
          type: string
          description: User identifier
        userGroup:
          type: string
          description: User group
        ownerName:
          type: string
          description: Owner of the entity
        eventType:
          x-gorm-column-attrs: not null
          type: string
        appName:
          type: string
          description: App that generated the event
        severity:
          x-gorm-column-attrs: not null
          allOf:
          - $ref: '#/components/schemas/Severity'
        entityId:
          type: string
          description: Entity identifier
        entityName:
          type: string
          description: Entity name
        message:
          x-gorm-column-attrs: not null
          type: string
          description: message
        occurredAt:
          type: string
          format: date-time
          description: occurred at timestamp
        entityType:
          type: string
          description: entity type
        parentEventId:
          type: string
          description: Parent event identifier
        order:
          type: integer
          description: Event order under the parent event
        entityMetadata:
          type: string
          description: Entity metadata
        eventMetadata:
          type: string
          description: Event metadata
        systemGenerated:
          type: boolean
          description: Is system generated event
        visibility:
          $ref: '#/components/schemas/Visibility'
    SeverityEvents:
      title: Severity
      type: string
      enum:
      - INFO
      - WARNING
      - CRITICAL
      description: Enumeration for severity level
    GetEventResponse:
      title: Get Events Response
      type: array
      items:
        $ref: '#/components/schemas/Event'
    Visibility:
      title: Visibility
      type: string
      description: Visibility level
      enum:
      - USER
      - SYSTEM
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer