swagger: '2.0'
info:
  description: Configuration for Export or Schedule NetScaler Entities report resource.
  version: 'v2'
  title: lb_export_report
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: lb_export_report
    description: Export or Schedule NetScaler Entities report
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/lb_export_report:
    get:
      tags:
        - lb_export_report
      summary: GET all lb_export_report
      operationId: getall_lb_export_report
      description: get export schedule configuration
      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 lb_export_report 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 lb_export_report 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 lb_export_report resources.
          enum:
            - yes
      responses:
        200:
          description:  for lb_export_report
          schema: 
              $ref: '#/definitions/getlb_export_reportsResponse'
        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:
        - lb_export_report
      summary: POST operation for lb_export_report
      operationId: post_lb_export_report
      description: POST operation for lb_export_report
      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: lb_export_report
          description: lb_export_report object
          schema:
              $ref: '#/definitions/addlb_export_reportRequest'
      responses:
        200:
          description: add for lb_export_report
          schema: 
              $ref: '#/definitions/addlb_export_reportResponse'
        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:
  addlb_export_reportRequest:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        $ref: '#/definitions/lb_export_report_readwrite'
    title: addlb_export_reportRequest
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  addlb_export_reportResponse:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        $ref: '#/definitions/lb_export_report'
    title: addlb_export_reportResponse
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  getlb_export_reportResponse:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        $ref: '#/definitions/lb_export_report'
    title: getlb_export_reportResponse
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  getlb_export_reportsResponse:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        type: array
        items:
          $ref: '#/definitions/lb_export_report'
    title: getlb_export_reportsResponse
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  modifylb_export_reportRequest:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        $ref: '#/definitions/lb_export_report_readwrite'
    title: modifylb_export_reportRequest
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  modifylb_export_reportResponse:
    type: object
    required:
      - lb_export_report
    properties:
      lb_export_report:
        $ref: '#/definitions/lb_export_report'
    title: modifylb_export_reportResponse
    example:
      lb_export_report:
        is_enabled: "true"
        enable_cr: "false"
        enable_lb: "true"
        enable_gslb: "false"
        slack_profile: "slack_profile"
        recurrence_type: "weekly"
        enable_sslvpn: "false"
        recurrence_options: "string_value"
        enable_auth: "false"
        file_name: "ns_entity_report_20190910.csv"
        recurrence_times_epoch: "string_value"
        export_now: "true"
        mail_profile: "email_profile"
        enable_cs: "false"

  lb_export_report_readwrite:
    type: object
    properties:
      is_enabled:
        description: "Enable Scheduled Report (default is enabled)"
        type: boolean
        format: boolean
      enable_cr:
        description: "Enable CR Report"
        type: boolean
        format: boolean
      enable_lb:
        description: "Enable LB Report"
        type: boolean
        format: boolean
      enable_gslb:
        description: "Enable GSLB Report"
        type: boolean
        format: boolean
      slack_profile:
        description: "Slack Profile Name"
        type: string
        format: string
      recurrence_type:
        description: "Tenant recurrence type"
        type: string
        format: string
        maxLength: 255
      enable_sslvpn:
        description: "Enable SSLVPN Report"
        type: boolean
        format: boolean
      recurrence_options:
        description: "Comma separated recurrence options of job that is scheduled"
        type: string
        format: string
      enable_auth:
        description: "Enable Auth Report"
        type: boolean
        format: boolean
      file_name:
        description: "Export Report File name."
        type: string
        format: string
      recurrence_times_epoch:
        description: "Schedule time epoch (string representation of 11 digit numbers)."
        type: string
        format: string
      export_now:
        description: "Load Balancing Export Now"
        type: boolean
        format: boolean
      mail_profile:
        description: "Mail Profile"
        type: string
        format: string
      enable_cs:
        description: "Enable CS Report"
        type: boolean
        format: boolean

  lb_export_report:
    allOf:
      - $ref: '#/definitions/lb_export_report_readwrite'

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