swagger: '2.0'
info:
  description: Configuration for Security App Dashboard Report table resource.
  version: 'v2'
  title: security_app_dashboard_details
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: security_app_dashboard_details
    description: Security App Dashboard Report table
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/security_app_dashboard_details:
    get:
      tags:
        - security_app_dashboard_details
      summary: GET all security_app_dashboard_details
      operationId: getall_security_app_dashboard_details
      description: Af Report for Security App Dashboard
      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: args
          type: string
          required: false
          description: "Use this query-parameter to specify arguments.Example:  property-name1:property-value1 "
        - in: query
          name: duration
          type: string
          required: true
          description: "Duration "
          enum:
            - last_1_hour
            - last_1_day
            - last_1_week
            - last_1_month
        - in: query
          name: order_by
          type: string
          required: false
          description: Use this query-parameter to get the result that is ordered by the given property
          enum:
            - total_attacks
            - app_threat_index
        - in: query
          name: group_by
          type: string
          required: false
          description: Use this query-parameter to get the result that is grouped by according to the given property
          enum:
            - violation_type
            - rpt_sample_time
        - in: query
          name: pagesize
          type: integer
          required: false
          description: Use this query-parameter to get the security_app_dashboard_details 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 security_app_dashboard_details 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 security_app_dashboard_details resources.
          enum:
            - yes
      responses:
        200:
          description:  for security_app_dashboard_details
          schema: 
              $ref: '#/definitions/getsecurity_app_dashboard_detailssResponse'
        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:
  getsecurity_app_dashboard_detailsResponse:
    type: object
    required:
      - security_app_dashboard_details
    properties:
      security_app_dashboard_details:
        $ref: '#/definitions/security_app_dashboard_details'
    title: getsecurity_app_dashboard_detailsResponse
    example:
      security_app_dashboard_details:
        violation_category: "Overflow"
        app_threat_index: "0"
        ns_city: "Banglore"
        severity_type: "Critical"
        __count: "0"
        app_category: "Others"
        country_code: "IN"
        violation_type: "Buffer Overflow"
        block_flags_prev: "0"
        safety_index: "0"
        source_ip_address_prev: "1.1.1.1"
        app_safety_index_prev: "0"
        appname: "test_app"
        threat_index: "0"
        city: "Banglore"
        total_attacks_prev: "0"
        latitude: "38.898556"
        ctnsappname: "test_app"
        ip_address: "1.1.1.1"
        app_safety_index: "0"
        country: "INDIA"
        longitude: "-77.037852"
        source_ip_address: "1.1.1.1"
        name: "ADC_24"
        rpt_sample_time: "1578963624"
        description: "Buffer Overflow"
        total_attacks: "10"
        device_ip_address: "1.1.1.1"
        attack_category: "Others"
        ns_latitude: "38.898556"
        exporter_id: "1.1.1.1"
        vserver_name: "test_vserver"
        ns_longitude: "-77.037852"
        app_threat_index_prev: "0"
        block_flags: "0"

  getsecurity_app_dashboard_detailssResponse:
    type: object
    required:
      - security_app_dashboard_details
    properties:
      security_app_dashboard_details:
        type: array
        items:
          $ref: '#/definitions/security_app_dashboard_details'
    title: getsecurity_app_dashboard_detailssResponse
    example:
      security_app_dashboard_details:
        violation_category: "Overflow"
        app_threat_index: "0"
        ns_city: "Banglore"
        severity_type: "Critical"
        __count: "0"
        app_category: "Others"
        country_code: "IN"
        violation_type: "Buffer Overflow"
        block_flags_prev: "0"
        safety_index: "0"
        source_ip_address_prev: "1.1.1.1"
        app_safety_index_prev: "0"
        appname: "test_app"
        threat_index: "0"
        city: "Banglore"
        total_attacks_prev: "0"
        latitude: "38.898556"
        ctnsappname: "test_app"
        ip_address: "1.1.1.1"
        app_safety_index: "0"
        country: "INDIA"
        longitude: "-77.037852"
        source_ip_address: "1.1.1.1"
        name: "ADC_24"
        rpt_sample_time: "1578963624"
        description: "Buffer Overflow"
        total_attacks: "10"
        device_ip_address: "1.1.1.1"
        attack_category: "Others"
        ns_latitude: "38.898556"
        exporter_id: "1.1.1.1"
        vserver_name: "test_vserver"
        ns_longitude: "-77.037852"
        app_threat_index_prev: "0"
        block_flags: "0"

  security_app_dashboard_details_readwrite:
    type: object
    properties:
      violation_category:
        description: "violation Category."
        type: string
        format: string
      app_threat_index:
        description: "Application threat Index"
        type: number
        format: double
      ns_city:
        description: "NetScaler Location city"
        type: string
        format: string
      severity_type:
        description: "severity_type"
        type: string
        format: string
        maxLength: 255
      __count:
        description: "count."
        type: number
        format: double
      app_category:
        description: "App Category"
        type: string
        format: string
        maxLength: 255
      country_code:
        description: "country_code"
        type: string
        format: string
        maxLength: 255
      violation_type:
        description: "Violation Type"
        type: string
        format: string
      block_flags_prev:
        description: "Block flag count"
        type: number
        format: double
      safety_index:
        description: "safety index."
        type: number
        format: double
      source_ip_address_prev:
        description: "Client ip address"
        type: string
        format: ipaddress
        maxLength: 255
      app_safety_index_prev:
        description: "App safety index prev"
        type: number
        format: double
      appname:
        description: "AppName"
        type: string
        format: string
        maxLength: 255
      threat_index:
        description: "threat_index"
        type: number
        format: double
      city:
        description: "city"
        type: string
        format: string
      total_attacks_prev:
        description: "Count of attacks in given sampled timeframe."
        type: number
        format: double
      latitude:
        description: "latitude"
        type: number
        format: double
      ctnsappname:
        description: "AppName"
        type: string
        format: string
        maxLength: 255
      ip_address:
        description: "NetScaler IP Address."
        type: string
        format: ipaddress
        minLength: 1
        maxLength: 64
      app_safety_index:
        description: "App Safety Index"
        type: number
        format: double
      country:
        description: "country"
        type: string
        format: string
        maxLength: 255
      longitude:
        description: "longitude"
        type: number
        format: double
      source_ip_address:
        description: "Client ip address"
        type: string
        format: string
        maxLength: 255
      name:
        description: "Name of NetScaler Instance"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      rpt_sample_time:
        description: "Report Sample time."
        type: number
        format: double
      description:
        description: "Violation Type Description"
        type: string
        format: string
      total_attacks:
        description: "Count of this URL in given sampled timeframe."
        type: number
        format: double
      device_ip_address:
        description: "Device IP Address"
        type: string
        format: ipaddress
        maxLength: 255
      attack_category:
        description: "Attack Category."
        type: string
        format: string
      ns_latitude:
        description: "NetScaler Location latitude"
        type: number
        format: double
      exporter_id:
        description: "Exporter ID"
        type: string
        format: string
        maxLength: 255
      vserver_name:
        description: "AppName"
        type: string
        format: string
        maxLength: 255
      ns_longitude:
        description: "NetScaler Location longitude"
        type: number
        format: double
      app_threat_index_prev:
        description: "App threat index previous"
        type: number
        format: double
      block_flags:
        description: "Block flag count"
        type: number
        format: double

  security_app_dashboard_details:
    allOf:
      - $ref: '#/definitions/security_app_dashboard_details_readwrite'

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