openapi: 3.0.0
info:
  title: Telco Cloud Automation Troubleshooting API
  description: Telco Cloud Automation Troubleshooting API
  termsOfService: https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/product/vmware-product-guide.pdf
  contact:
    name: VMware
  license:
    name: Copyright (c) 2020-2021 VMware, Inc. All rights reserved.
  version: "1.0"
servers:
- url: /hybridity/api
paths:
  /techsupport/settings:
    get:
      tags:
      - Troubleshooting
      description: Get Tech Support Settings
      operationId: getSettings
      responses:
        "200":
          description: Get Settings
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    put:
      tags:
      - Troubleshooting
      description: Get Tech Support Settings
      operationId: updateSettings
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/body'
        required: true
      responses:
        "200":
          description: Settings updated
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /techsupport/task/{taskId}:
    get:
      tags:
      - Troubleshooting
      description: Get Tech Support Task details
      operationId: getTaskDetails
      parameters:
      - name: taskId
        in: path
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Get task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_1'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /techsupport:
    post:
      tags:
      - Troubleshooting
      description: Request Tech Support Logs
      operationId: requestTechSupportLogs
      parameters:
      - name: action
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
        example: collectTechSupportBundle
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/body_1'
        required: true
      responses:
        "200":
          description: Get tech support
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_2'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /systemDetails:
    get:
      tags:
      - Support
      description: Get System Details
      operationId: getSystemDetails
      responses:
        "200":
          description: Get System Details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/inline_response_200_3'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  schemas:
    errorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    inline_response_200:
      type: object
      properties:
        autoAcknowledge:
          type: boolean
    body:
      type: object
      properties:
        autoAcknowledge:
          type: boolean
    inline_response_200_1:
      type: object
      properties:
        state:
          type: string
    body_1:
      type: object
      properties:
        collectMongoDump:
          type: boolean
        collectNspTechBundle:
          type: boolean
        fleetAppliances:
          type: array
          items:
            type: object
    inline_response_200_2:
      type: object
      properties:
        jobId:
          type: string
    inline_response_200_3:
      type: object
      properties:
        success:
          type: boolean
        completed:
          type: boolean
        time:
          type: number
        version:
          type: string
        data:
          $ref: '#/components/schemas/inline_response_200_3_data'
    inline_response_200_3_data:
      type: object
      properties:
        systemUuid:
          type: string
        systemName:
          type: string
        systemType:
          type: string
        version:
          type: string
        linkLastCommunicated:
          type: string
        linkVerified:
          type: string
        linkEstablished:
          type: string
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
  securitySchemes:
    x-hm-authorization:
      type: apiKey
      description: Obtained from /hybridity/api/session
      name: x-hm-authorization
      in: header
