swagger: '2.0'
info:
  description: Configuration for application summarized information resource.
  version: 'v2'
  title: adc_application_summary
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: adc_application_summary
    description: application summarized information
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  UserSecurity:
    type: basic
security:
  - UserSecurity: []
parameters:
  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/adc_application_summary:
    get:
      tags:
        - adc_application_summary
      summary: GET all adc_application_summary
      operationId: getall_adc_application_summary
      description: Af Report for App information collected by this AF Collector
      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 adc_application_summary 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 adc_application_summary 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 adc_application_summary resources.
          enum:
            - yes
      responses:
        200:
          description:  for adc_application_summary
          schema: 
              $ref: '#/definitions/getadc_application_summarysResponse'
        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:
  getadc_application_summaryResponse:
    type: object
    required:
      - adc_application_summary
    properties:
      adc_application_summary:
        $ref: '#/definitions/adc_application_summary'
    title: getadc_application_summaryResponse
    example:
      adc_application_summary:
        issues_detected: "{'vsvr_health_issues': [], 'vsvrname': 'test_vserver'}"
        ssl_rating: "A+"
        appname: "test_vserver_1.1.1.1_lb"
        response_time: "0"
        vslbhealth: "100"
        appcategory: "Others"
        ip_address: "1.1.1.1"
        clnt_connections: "0"
        vservertype: "lbvserver"
        pkt_recvd_cur: "0"
        error_percentage: "0"
        total_bytes: "0"
        srvr_connections: "0"
        vservername: "lbvserver"
        application_class: "discrete"
        pkt_sent_cur: "0"
        curr_state: "UP"
        health_score: "100"
        total_requests: "0"
        throughput: "128"

  getadc_application_summarysResponse:
    type: object
    required:
      - adc_application_summary
    properties:
      adc_application_summary:
        type: array
        items:
          $ref: '#/definitions/adc_application_summary'
    title: getadc_application_summarysResponse
    example:
      adc_application_summary:
        issues_detected: "{'vsvr_health_issues': [], 'vsvrname': 'test_vserver'}"
        ssl_rating: "A+"
        appname: "test_vserver_1.1.1.1_lb"
        response_time: "0"
        vslbhealth: "100"
        appcategory: "Others"
        ip_address: "1.1.1.1"
        clnt_connections: "0"
        vservertype: "lbvserver"
        pkt_recvd_cur: "0"
        error_percentage: "0"
        total_bytes: "0"
        srvr_connections: "0"
        vservername: "lbvserver"
        application_class: "discrete"
        pkt_sent_cur: "0"
        curr_state: "UP"
        health_score: "100"
        total_requests: "0"
        throughput: "128"

  adc_application_summary_readwrite:
    type: object
    properties:
      issues_detected:
        description: "Array of all app issues affecting health score. Each array element tells issueId, penalty and time when it occured"
        type: string
        format: string
        maxLength: 2048
      ssl_rating:
        description: "A+ / non-A+ / NA"
        type: string
        format: string
        maxLength: 50
      appname:
        description: "AppName"
        type: string
        format: string
        maxLength: 255
      response_time:
        description: "total time taken by the app to send response to client"
        type: number
        format: double
      vslbhealth:
        description: "Vserver Health"
        type: integer
        format: int32
      appcategory:
        description: "App Category"
        type: string
        format: string
        maxLength: 255
      ip_address:
        description: "Field to store the ip address as it is along with any extension"
        type: string
        format: string
        maxLength: 512
      clnt_connections:
        description: "Current Client Connections"
        type: number
        format: int64
      vservertype:
        description: "Vserver Tyoe"
        type: string
        format: string
        maxLength: 255
      pkt_recvd_cur:
        description: "Total Pkts Received"
        type: number
        format: int64
      error_percentage:
        description: "Number of 5xx response recieved wrt total requests"
        type: number
        format: double
      total_bytes:
        description: "Session total bytes"
        type: number
        format: int64
      srvr_connections:
        description: "Current Server Connections"
        type: number
        format: int64
      vservername:
        description: "Vserver Name"
        type: string
        format: string
        maxLength: 255
      pkt_sent_cur:
        description: "Total Pkts Sent"
        type: number
        format: int64
      curr_state:
        description: "Current State"
        type: string
        format: string
        maxLength: 50
      health_score:
        description: "App Health Score"
        type: number
        format: double
      total_requests:
        description: "Total Requests"
        type: number
        format: int64
      throughput:
        description: "Throughput ."
        type: number
        format: double

  adc_application_summary:
    allOf:
      -
        properties:
          application_class:
             description: "Application class"
             type: string
             format: string
             maxLength: 255
      - $ref: '#/definitions/adc_application_summary_readwrite'

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