swagger: '2.0'
info:
  description: Configuration for Additional Server node information resource.
  version: 'v2'
  title: appscore_threshold_config
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: appscore_threshold_config
    description: Additional Server node information
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  UserSecurity:
    type: basic
security:
  - UserSecurity: []
parameters:
  idParam:
   name: id
   in: path
   type: string
   description: Id
   required: true
  authParam:
      in: header
      name: Authorization
      type: string
      required: true
      description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
  cloudParam:
      in: header
      name: isCloud
      type: string
      required: true
      description: set the value to true in case of Cloud services, false for on-prem deployment
paths:
  /massvc/{customerid}/nitro/v2/config/appscore_threshold_config:
    get:
      tags:
        - appscore_threshold_config
      summary: GET all appscore_threshold_config
      operationId: getall_appscore_threshold_config
      description: Use this operation to get server nodes
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
        - in: query
          name: filter
          type: string
          required: false
          description: "Use this query-parameter to get the filtered set of vm_device resources configured on the system. You can set a filter on any property of the resource.Example:  property-name1:property-value1 "
        - in: query
          name: pagesize
          type: integer
          required: false
          description: Use this query-parameter to get the appscore_threshold_config resources in chunks.To be used along with pageno query parameter.
        - in: query
          name: pageno
          type: integer
          required: false
          description: Use this query-parameter to get the appscore_threshold_config resources in chunks.To be used along with pagesize query parameter.
        - in: query
          name: count
          type: string
          required: false
          description: Use this query-parameter to get the count of appscore_threshold_config resources.
          enum:
            - yes
      responses:
        200:
          description:  for appscore_threshold_config
          schema: 
              $ref: '#/definitions/getappscore_threshold_configsResponse'
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

    post:
      tags:
        - appscore_threshold_config
      summary: POST operation for appscore_threshold_config
      operationId: post_appscore_threshold_config
      description: POST operation for appscore_threshold_config
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
        - in: query
          name: onerror
          description: Use this parameter to set the onerror status for nitro request. Applicable only for bulk requests.
          required: false
          type: string
          default: CONTINUE
          enum:
            - EXIT
            - CONTINUE
        - in: body
          name: appscore_threshold_config
          description: appscore_threshold_config object
          schema:
              $ref: '#/definitions/addappscore_threshold_configRequest'
      responses:
        200:
          description: add for appscore_threshold_config
          schema: 
              $ref: '#/definitions/addappscore_threshold_configResponse'
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

  /massvc/{customerid}/nitro/v2/config/appscore_threshold_config/{id}:
    get:
      tags:
        - appscore_threshold_config
      summary: GET by key for appscore_threshold_config
      operationId: getbykey_appscore_threshold_config
      description: Use this operation to get server nodes
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
      responses:
        200:
          description: add for appscore_threshold_config
          schema: 
              $ref: '#/definitions/getappscore_threshold_configResponse'
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

    put:
      tags:
        - appscore_threshold_config
      summary: PUT for appscore_threshold_config
      operationId: putbykey_appscore_threshold_config
      description: Use this operation to modify server nodes
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
        - in: body
          name: appscore_threshold_config
          description: appscore_threshold_config object
          schema:
              $ref: '#/definitions/modifyappscore_threshold_configRequest'
      responses:
        200:
          description: add for appscore_threshold_config
          schema: 
              $ref: '#/definitions/modifyappscore_threshold_configResponse'
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

    delete:
      tags:
        - appscore_threshold_config
      summary: Delete for appscore_threshold_config
      operationId: deletebykey_appscore_threshold_config
      description: Use this operation to delete server nodes
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - $ref: '#/parameters/idParam'
        - in: path
          name: customerid
          type: string
          required: true
          description: Customer Id of the user
        - in: header
          name: Authorization
          type: string
          required: true
          description: Session Id for authentication.Should be mentioned in the format CwsAuth bearer=sessionIdValue
        - in: header
          name: isCloud
          type: string
          required: true
          description: set the value to true in case of Cloud services, false for on-prem deployment
      responses:
        204:
          description: add for appscore_threshold_config
        400:
          description: Bad input parameter
          schema: 
              $ref: '#/definitions/Error'
        401:
          description: Failed Authentication
          schema: 
              $ref: '#/definitions/Error'
        403:
          description: Unauthorized
          schema: 
              $ref: '#/definitions/Error'
        404:
          description: Item not found
          schema: 
              $ref: '#/definitions/Error'
        409:
          description: Resource Conflict
          schema: 
              $ref: '#/definitions/Error'
        500:
          description: Server Error
          schema: 
              $ref: '#/definitions/Error'
        504:
          description: Gateway Timeout
          schema: 
              $ref: '#/definitions/Error'

definitions:
  addappscore_threshold_configRequest:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        $ref: '#/definitions/appscore_threshold_config_readwrite'
    title: addappscore_threshold_configRequest
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  addappscore_threshold_configResponse:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        $ref: '#/definitions/appscore_threshold_config'
    title: addappscore_threshold_configResponse
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        id: "a396e41b-01da-4164-8d83-40b7b8e9379e"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  getappscore_threshold_configResponse:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        $ref: '#/definitions/appscore_threshold_config'
    title: getappscore_threshold_configResponse
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        id: "a396e41b-01da-4164-8d83-40b7b8e9379e"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  getappscore_threshold_configsResponse:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        type: array
        items:
          $ref: '#/definitions/appscore_threshold_config'
    title: getappscore_threshold_configsResponse
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        id: "a396e41b-01da-4164-8d83-40b7b8e9379e"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  modifyappscore_threshold_configRequest:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        $ref: '#/definitions/appscore_threshold_config_readwrite'
    title: modifyappscore_threshold_configRequest
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  modifyappscore_threshold_configResponse:
    type: object
    required:
      - appscore_threshold_config
    properties:
      appscore_threshold_config:
        $ref: '#/definitions/appscore_threshold_config'
    title: modifyappscore_threshold_configResponse
    example:
      appscore_threshold_config:
        lowCPU: "85"
        lowThreatScore: "-1"
        lowNicDisCards: "-1"
        highCPU: "90"
        highThreatScore: "-1"
        lowMemory: "60"
        lowVServerCPU: "70"
        responseTimeSLA: "500"
        highVServerCPU: "90"
        highNicCongestion: "-1"
        lowNicCongestion: "-1"
        highNicDisCards: "5"
        highSurgeQ: "85"
        id: "a396e41b-01da-4164-8d83-40b7b8e9379e"
        lowSurgeQ: "0.05"
        highMemory: "85"
        activeServicesSLA: "100"

  appscore_threshold_config_readwrite:
    type: object
    properties:
      lowCPU:
        description: "Low CPU Threshold"
        type: number
        format: double
      lowThreatScore:
        description: "Low Threat Score"
        type: number
        format: double
      lowNicDisCards:
        description: "Low NIC Discards SLA"
        type: number
        format: double
      highCPU:
        description: "High CPU Threshold"
        type: number
        format: double
      highThreatScore:
        description: "High Threat Score"
        type: number
        format: double
      lowMemory:
        description: "Low Memory Threshold"
        type: number
        format: double
      lowVServerCPU:
        description: "Low VServer CPU"
        type: number
        format: double
      responseTimeSLA:
        description: "Response Time Threshold"
        type: number
        format: double
      highVServerCPU:
        description: "High VServer CPU"
        type: number
        format: double
      highNicCongestion:
        description: "High NIC Congestion"
        type: number
        format: double
      lowNicCongestion:
        description: "Low NIC Congestion"
        type: number
        format: double
      highNicDisCards:
        description: "High NIC Discards SLA"
        type: number
        format: double
      highSurgeQ:
        description: "Higher Surge Queue Threshold"
        type: number
        format: double
      lowSurgeQ:
        description: "Lower Surge Queue Threshold"
        type: number
        format: double
      highMemory:
        description: "High Memory Threshold"
        type: number
        format: double
      activeServicesSLA:
        description: "Active Services Threshold"
        type: number
        format: double

  appscore_threshold_config:
    allOf:
      -
        properties:
          id:
            description: Id
            type: string
            format: uuid
      - $ref: '#/definitions/appscore_threshold_config_readwrite'

  Error:
    properties:
      errorcode:
        type: number
        format: int32
        example: 1001
      errormessage:
        type: string
        format: string
        example: "id cannot be found"
