openapi: 3.0.3
info:
  title: Task Service
  version: 1.0.0
  description: This API is used to monitor the status of various tasks carried out in Cisco ISE.
tags:
  - name: task-api-controller
    description: the task API
paths:
  /api/v1/task:
    get:
      tags:
        - tasks
      summary: get all task status
      operationId: getAllTaskStatus
      responses:
        '200':
          description: List of task within 24 hours
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TaskStatus'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
  /api/v1/task/{taskId}:
    get:
      tags:
        - tasks
      summary: Monitor task status
      operationId: getTaskStatus
      parameters:
        - name: taskId
          in: path
          description: The id of the task executed before
          required: true
          style: simple
          schema:
            type: string
      responses:
        '200':
          description: task Status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskStatus'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
components:
  schemas:
    Error:
      title: Error
      required:
        - code
        - message
      type: object
      properties:
        code:
          type: integer
          format: int32
        message:
          type: string
    TaskStatus:
      title: TaskStatus
      type: object
      properties:
        detailStatus:
          type: array
          items:
            type: object
        executionStatus:
          type: string
        failCount:
          type: integer
          format: int32
        id:
          type: string
        moduleType:
          type: string
        resourcesCount:
          type: integer
          format: int32
        startTime:
          type: string
        successCount:
          type: integer
          format: int32
