openapi: 3.0.0
info:
  contact:
    name: VMware
  description: API query for the HCX license activation details.
  license:
    name: Copyright (c) 2020-2021 VMware, Inc. All rights reserved.
  termsOfService: https://hcx.vmware.com/terms-and-conditions
  title: Query HCX License activation details API.
  version: "1.0"
security:
 - x-hm-authorization: []
servers:
- url: https://{server}/hybridity/api
  variables:
    server:
      default: hcx_mgr_server
      description: HCX Manager server host name
tags:
- description: API to get the licensing activation status details from HCX Manager
  name: Licensing Activation Status
paths:
  /license/hcx/activationStatus:
    get:
      description: Returns the HCX licensing activation status details,
        including whether activation is done, trial period is envoked, and communication with the HCX licensing server is established.
        This API can be invoked for monitoring the activation status at a frequency of once in 5minutes interval.
      operationId: getHcxLicensingActivationStatus
      responses:
        200:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/hcxActivationStatusDetailsResponse'
          description: Ok
        401:
          description: Unauthorized
        403:
          description: Forbidden
        400:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Bad Request
        500:
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
          description: Internal Server Error
      summary: Returns HCX licensing activation status details along with communication to HCX licensing server status.
      tags:
      - Licensing Activation Status
components:
  schemas:
    hcxActivationStatusDetailsResponse:
      example:
        '{success=true, completed=true, time=1594198351035, version="1.0", data={activationDone=true, activationStatus="ok", warnCommunicationBroken=false,
          hasCommunicationBroken=false, moreInfo={isGraceExpired=false,expiryTime="ISO Date"}}}'
      type: object
      properties:
        success:
          type: boolean
          description: If the value of this parameter is true, the API returned successfully with the status details.
        completed:
          type: boolean
          description: Completion status.
        time:
          type: number
          description: Time in milliseconds.
        version:
          type: string
          description: API response version.
        data:
          type: object
          properties:
            activationDone:
              type: boolean
              description: Is HCX license activation is done.
            activationStatus:
              type: string
              description: HCX license activation status. The possible values are ok or deactivated.
              enum:
               - ok
               - deactivated
            warnCommunicationBroken:
              type: boolean
              description: Indicates whether communication to HCX site manager is broken within the 7-day grace period.
            hasCommunicationBroken:
              type: boolean
              description: Indicates whether communication to HCX site manager is broken beyond the 7-day grace period.
            moreInfo:
              type: object
              properties:
                isGraceExpired:
                  type: boolean
                  description: Is grace period of 7days for communication to connect.hcx.vmware.com or HCX site manager server.
                expiryTime:
                  type: string
                  description: Expiry time about communication to connect.hcx.vmware.com or HCX site manager server.    
    errorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/error'
          type: array
      type: object
    error:
      properties:
        code:
          type: string
        message:
          type: string
      type: object
  securitySchemes:
    x-hm-authorization:
      description: Obtained from /hybridity/api/session
      in: header
      name: x-hm-authorization
      type: apiKey      