openapi: 3.0.0
info:
  title: Telco Cloud Automation Fault Management API
  description: Telco Cloud Automation Fault Management 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
security:
- x-hm-authorization: []
tags:
- name: vnfFmAlarms
  description: Telco Cloud Automation Fault Management API
paths:
  /vnffm/v1/alarms:
    get:
      tags:
      - vnfFmAlarms
      summary: Get Alarms of all the Network Functions
      description: Get Alarms of all the Network Functions
      operationId: getAlarms
      parameters:
      - name: filter
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: ""
      - name: nextpage_opaque_marker
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: int
      - name: pageSize
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: int
      - name: sortOrder
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: asc
          enum:
          - asc
          - desc
      - name: sortColumn
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: perceivedSeverity
      responses:
        "200":
          description: Accepted
          headers:
            nextPage:
              description: Gives the next page to query alarms. If the current page
                is the last page, empty string is returned.
              style: simple
              explode: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vduAlarmsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    post:
      tags:
      - vnfFmAlarms
      summary: Get Telco Cloud Automation Alarms For Network Function By Action Param
      description: Get Telco Cloud Automation Alarms For Network Function By Action
        Param
      operationId: getNfvAlarmByAction
      parameters:
      - name: action
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/alarmQueryFilter'
        required: true
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/alarmCountResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    patch:
      tags:
      - vnfFmAlarms
      summary: Acknowledge multiple alarms
      description: Acknowledge multiple alarms
      operationId: acknowledgeAlarms
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/acknowledgeFilter'
        required: true
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobIdsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /vnffm/v1/{vnfInstanceId}/alarms:
    post:
      tags:
      - vnfFmAlarms
      summary: Get Alarms from Vms given the vdu Id
      description: Get Alarms from Vms given the vdu Id
      operationId: queryAlarms
      parameters:
      - name: vnfInstanceId
        in: path
        description: Network Function Instance Id
        required: true
        style: simple
        explode: false
        schema:
          type: string
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/alarmFilter'
        required: true
      responses:
        "200":
          description: Accepted
          headers:
            nextPage:
              description: Gives the next page to query alarms. If the current page
                is the last page, empty string is returned.
              style: simple
              explode: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vduAlarmsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /vnffm/v1/alarms/{alarmId}:
    get:
      tags:
      - vnfFmAlarms
      summary: Get Alarm of the Network Function given the alarmId
      description: Get Alarm of the Network Function given the alarmId
      operationId: getAlarmForAlarmId
      parameters:
      - name: alarmId
        in: path
        description: alarmId
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vduAlarmResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    patch:
      tags:
      - vnfFmAlarms
      summary: Acknowledge an Alarm in the vCenter
      description: Acknowledge an Alarm in the vCenter
      operationId: acknowledgeAlarm
      parameters:
      - name: alarmId
        in: path
        description: alarmId
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobIdResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /nsfm/v1/alarms:
    get:
      tags:
      - nsFmAlarms
      summary: Get Alarms of all the Network Services
      description: Get Alarms of all the Network Services
      operationId: getAlarms
      parameters:
      - name: filter
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: ""
      - name: nextpage_opaque_marker
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: int
      - name: pageSize
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: int
      - name: sortOrder
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: asc
          enum:
          - asc
          - desc
      - name: sortColumn
        in: query
        required: false
        style: form
        explode: true
        schema:
          type: string
          default: perceivedSeverity
      responses:
        "200":
          description: Accepted
          headers:
            nextPage:
              description: Gives the next page to query alarms. If the current page
                is the last page, empty string is returned.
              style: simple
              explode: false
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vduAlarmsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    post:
      tags:
      - nsFmAlarms
      summary: Get Telco Cloud Automation Alarms For Network Services By Action Param
      description: Get Telco Cloud Automation Alarms For Network Services By Action
        Param
      operationId: getNfvAlarmByAction
      parameters:
      - name: action
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/alarmQueryFilterForNs'
        required: true
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/alarmCountForNsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    patch:
      tags:
      - nsFmAlarms
      summary: Acknowledge multiple alarms of Network Services
      description: Acknowledge multiple alarms of Network Services
      operationId: acknowledgeAlarms
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/acknowledgeFilter'
        required: true
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobIdsResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /nsfm/v1/alarms/{alarmId}:
    get:
      tags:
      - nsFmAlarms
      summary: Get Alarm of the Network Services given the alarmId
      description: Get Alarm of the Network Services given the alarmId
      operationId: getAlarmForAlarmId
      parameters:
      - name: alarmId
        in: path
        description: alarmId
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/vduAlarmResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    patch:
      tags:
      - nsFmAlarms
      summary: Acknowledge an Alarm of Network Services in the vCenter
      description: Acknowledge an Alarm of Network Services in the vCenter
      operationId: acknowledgeAlarm
      parameters:
      - name: alarmId
        in: path
        description: alarmId
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobIdResponse'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /vnffm/v1/subscriptions:
    get:
      tags:
      - nsFmAlarms
      summary: List all subscriptions.
      description: List all subscriptions.
      operationId: getSubscriptions
      responses:
        "200":
          description: Accepted
          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'
    post:
      tags:
      - nsFmAlarms
      summary: Creates a new subscription.
      description: Creates a new subscription.
      operationId: createSubscription
      requestBody:
        description: "null"
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FmSubscriptionRequest'
        required: true
      responses:
        "201":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FmSubscription'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
  /vnffm/v1/subscriptions/{subscriptionId}:
    get:
      tags:
      - nsFmAlarms
      summary: Get subscription.
      description: Get subscription.
      operationId: getSubscription
      parameters:
      - name: subscriptionId
        in: path
        description: subscription Id
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "200":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FmSubscription'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
    delete:
      tags:
      - nsFmAlarms
      summary: Remove subscription.
      description: Remove subscription.
      operationId: removeSubscription
      parameters:
      - name: subscriptionId
        in: path
        description: subscription Id
        required: true
        style: simple
        explode: false
        schema:
          type: string
      responses:
        "204":
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RemoveFmSubscription'
        "401":
          description: Unauthorized
        "403":
          description: Forbidden
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errorResponse'
components:
  schemas:
    vduAlarms:
      type: object
      properties:
        id:
          type: string
        entityId:
          type: string
        entityName:
          type: string
        managedObjectId:
          type: string
        vnfInstanceName:
          type: string
        vnfInstanceId:
          type: string
        nsName:
          type: string
        nsInstanceId:
          type: string
        perceivedSeverity:
          type: string
        alarmRaisedTime:
          type: string
        ackState:
          type: string
        ackStatus:
          type: string
        alarmName:
          type: string
        description:
          type: string
        acknowledgedByUser:
          type: string
        acknowledgedTime:
          type: string
        rootCauseFaultyResource:
          type: object
        eventTime:
          type: string
        eventType:
          type: string
        probableCause:
          type: string
        isRootCause:
          type: boolean
        _links:
          type: object
        rowType:
          type: string
        errors:
          type: array
          items:
            type: string
    errorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    vduAlarmsResponse:
      type: object
      properties:
        alarms:
          type: array
          items:
            $ref: ./components/schemas/vduAlarms.yaml
        nextPage:
          type: string
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    vduAlarmResponse:
      type: object
      properties:
        alarm:
          $ref: ./components/schemas/vduAlarms.yaml
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    alarmFilter:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/alarmFilter_filter'
    alarmQueryFilter:
      type: object
      properties:
        queryType:
          type: string
        filter:
          $ref: '#/components/schemas/alarmQueryFilter_filter'
    alarmQueryFilterForNs:
      type: object
      properties:
        queryType:
          type: string
        filter:
          $ref: '#/components/schemas/alarmQueryFilterForNs_filter'
    JobIdResponse:
      type: object
      properties:
        jobId:
          type: string
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    alarmCountResponse:
      type: object
      properties:
        alarmSummary:
          type: array
          items:
            $ref: '#/components/schemas/alarmCountResponse_alarmSummary'
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    alarmCountForNsResponse:
      type: object
      properties:
        alarmSummary:
          type: array
          items:
            $ref: '#/components/schemas/alarmCountForNsResponse_alarmSummary'
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    acknowledgeFilter:
      type: object
      properties:
        filter:
          $ref: '#/components/schemas/acknowledgeFilter_filter'
    JobIdsResponse:
      type: object
      properties:
        postedJobs:
          type: array
          items:
            $ref: '#/components/schemas/JobIdsResponse_postedJobs'
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    FmSubscriptionRequest:
      type: object
      properties:
        filter:
          $ref: ./components/schemas/FmNotificationsFilter.yaml
        callbackUri:
          type: string
        authentication:
          $ref: ./components/schemas/SubscriptionAuthentication.yaml
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    FmSubscription:
      type: object
      properties:
        id:
          type: string
        filter:
          $ref: ./components/schemas/FmNotificationsFilter.yaml
        callbackUri:
          type: string
        _links:
          $ref: '#/components/schemas/FmSubscription__links'
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    FmSubscriptionArray:
      type: array
      items:
        $ref: '#/components/schemas/FmSubscription'
    RemoveFmSubscription:
      type: object
      properties:
        warnings:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/warning.yaml
        errors:
          type: array
          items:
            $ref: ../../../api-common/swagger/1.0/components/schemas/error.yaml
    inline_response_200:
      oneOf:
      - $ref: '#/components/schemas/FmSubscriptionArray'
      - $ref: '#/components/schemas/errorResponse'
    alarmFilter_filter:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
        vduIds:
          type: array
          items:
            type: string
        vnfInstanceId:
          type: string
        vmMorefs:
          type: array
          items:
            type: string
        alarmIds:
          type: array
          items:
            type: string
        ackState:
          type: string
        perceivedSeverity:
          type: array
          items:
            type: string
        hcxEndpointIds:
          type: array
          items:
            type: string
    alarmQueryFilter_filter:
      type: object
      properties:
        vduIds:
          type: array
          items:
            type: string
        vnfInstanceId:
          type: string
    alarmQueryFilterForNs_filter:
      type: object
      properties:
        vnfInstanceIds:
          type: array
          items:
            type: string
        nsInstanceIds:
          type: array
          items:
            type: string
        objectTypes:
          type: array
          items:
            type: string
    alarmCountResponse_severityCount:
      type: object
      properties:
        perceivedSeverity:
          type: string
        count:
          type: integer
    alarmCountResponse_alarmSummary:
      type: object
      properties:
        entityId:
          type: string
        severityCount:
          type: array
          items:
            $ref: '#/components/schemas/alarmCountResponse_severityCount'
    alarmCountForNsResponse_alarmSummary:
      type: object
      properties:
        vnfInstanceId:
          type: string
        severityCount:
          type: array
          items:
            $ref: '#/components/schemas/alarmCountResponse_severityCount'
    acknowledgeFilter_filter:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
    JobIdsResponse_postedJobs:
      type: object
      properties:
        id:
          type: string
        jobId:
          type: string
    FmSubscription__links:
      type: object
      properties:
        self:
          type: string
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    BadRequest:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/errorResponse'
    SucessAlarmsResponse:
      description: Accepted
      headers:
        nextPage:
          description: Gives the next page to query alarms. If the current page is
            the last page, empty string is returned.
          style: simple
          explode: false
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/vduAlarmsResponse'
    SucessAlarmResponse:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/vduAlarmResponse'
    SucessAcknowledgeAlarmResponse:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JobIdResponse'
    SucessAlarmCountResponse:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/alarmCountResponse'
    SucessAlarmCountForNsResponse:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/alarmCountForNsResponse'
    SucessMultiAcknowledgeAlarmResponse:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/JobIdsResponse'
    FmSubscription:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FmSubscription'
    FmSubscriptionArray:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_response_200'
    RemoveFmSubscription:
      description: Accepted
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/RemoveFmSubscription'
  securitySchemes:
    x-hm-authorization:
      type: apiKey
      description: Obtained from /hybridity/api/session
      name: x-hm-authorization
      in: header
