swagger: '2.0'
info:
  description: Configuration for System Status resource.
  version: 'v2'
  title: mps
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: mps
    description: System Status
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/mps:
    get:
      tags:
        - mps
      summary: GET all mps
      operationId: getall_mps
      description: Use this operation to get system status
      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 mps 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 mps 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 mps resources.
          enum:
            - yes
      responses:
        200:
          description:  for mps
          schema: 
              $ref: '#/definitions/getmpssResponse'
        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:
  addmpsRequest:
    type: object
    required:
      - mps
    properties:
      mps:
        $ref: '#/definitions/mps_readwrite'
    title: addmpsRequest
    example:
      mps:
        maps_apikey: "string_value"
        deployment_type: "string_value"
        is_passive: "false"
        privilege_feature: "string_value"
        is_cloud: "false"
        is_member_of_default_group: "false"
        motd: "string_value"
        config_motd: "false"
        is_container: "false"
        hist_mig_inprog: "false"
        upgrade_agent_version: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  addmpsResponse:
    type: object
    required:
      - mps
    properties:
      mps:
        $ref: '#/definitions/mps'
    title: addmpsResponse
    example:
      mps:
        maps_apikey: "string_value"
        build_number_short: "string_value"
        sysid: "string_value"
        hostname: "string_value"
        bios_version: "string_value"
        deployment_type: "string_value"
        uptime: "string_value"
        current_user_permission: "string_value"
        is_passive: "false"
        product_build_number: "string_value"
        serial: "string_value"
        privilege_feature: "string_value"
        username: "testUser"
        current_tenant: "string_value"
        current_time_formatted: "string_value"
        is_cloud: "false"
        current_time: "integer_value"
        hostid: "string_value"
        is_member_of_default_group: "false"
        product_version: "string_value"
        platform: "string_value"
        motd: "string_value"
        hypervisor_uptime: "string_value"
        config_motd: "false"
        host: "string_value"
        build_number: "string_value"
        time_zone_offset: "integer_value"
        is_container: "false"
        hist_mig_inprog: "false"
        time_zone: "string_value"
        product: "string_value"
        upgrade_agent_version: "string_value"
        current_tenant_id: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  getmpsResponse:
    type: object
    required:
      - mps
    properties:
      mps:
        $ref: '#/definitions/mps'
    title: getmpsResponse
    example:
      mps:
        maps_apikey: "string_value"
        build_number_short: "string_value"
        sysid: "string_value"
        hostname: "string_value"
        bios_version: "string_value"
        deployment_type: "string_value"
        uptime: "string_value"
        current_user_permission: "string_value"
        is_passive: "false"
        product_build_number: "string_value"
        serial: "string_value"
        privilege_feature: "string_value"
        username: "testUser"
        current_tenant: "string_value"
        current_time_formatted: "string_value"
        is_cloud: "false"
        current_time: "integer_value"
        hostid: "string_value"
        is_member_of_default_group: "false"
        product_version: "string_value"
        platform: "string_value"
        motd: "string_value"
        hypervisor_uptime: "string_value"
        config_motd: "false"
        host: "string_value"
        build_number: "string_value"
        time_zone_offset: "integer_value"
        is_container: "false"
        hist_mig_inprog: "false"
        time_zone: "string_value"
        product: "string_value"
        upgrade_agent_version: "string_value"
        current_tenant_id: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  getmpssResponse:
    type: object
    required:
      - mps
    properties:
      mps:
        type: array
        items:
          $ref: '#/definitions/mps'
    title: getmpssResponse
    example:
      mps:
        maps_apikey: "string_value"
        build_number_short: "string_value"
        sysid: "string_value"
        hostname: "string_value"
        bios_version: "string_value"
        deployment_type: "string_value"
        uptime: "string_value"
        current_user_permission: "string_value"
        is_passive: "false"
        product_build_number: "string_value"
        serial: "string_value"
        privilege_feature: "string_value"
        username: "testUser"
        current_tenant: "string_value"
        current_time_formatted: "string_value"
        is_cloud: "false"
        current_time: "integer_value"
        hostid: "string_value"
        is_member_of_default_group: "false"
        product_version: "string_value"
        platform: "string_value"
        motd: "string_value"
        hypervisor_uptime: "string_value"
        config_motd: "false"
        host: "string_value"
        build_number: "string_value"
        time_zone_offset: "integer_value"
        is_container: "false"
        hist_mig_inprog: "false"
        time_zone: "string_value"
        product: "string_value"
        upgrade_agent_version: "string_value"
        current_tenant_id: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  modifympsRequest:
    type: object
    required:
      - mps
    properties:
      mps:
        $ref: '#/definitions/mps_readwrite'
    title: modifympsRequest
    example:
      mps:
        maps_apikey: "string_value"
        deployment_type: "string_value"
        is_passive: "false"
        privilege_feature: "string_value"
        is_cloud: "false"
        is_member_of_default_group: "false"
        motd: "string_value"
        config_motd: "false"
        is_container: "false"
        hist_mig_inprog: "false"
        upgrade_agent_version: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  modifympsResponse:
    type: object
    required:
      - mps
    properties:
      mps:
        $ref: '#/definitions/mps'
    title: modifympsResponse
    example:
      mps:
        maps_apikey: "string_value"
        build_number_short: "string_value"
        sysid: "string_value"
        hostname: "string_value"
        bios_version: "string_value"
        deployment_type: "string_value"
        uptime: "string_value"
        current_user_permission: "string_value"
        is_passive: "false"
        product_build_number: "string_value"
        serial: "string_value"
        privilege_feature: "string_value"
        username: "testUser"
        current_tenant: "string_value"
        current_time_formatted: "string_value"
        is_cloud: "false"
        current_time: "integer_value"
        hostid: "string_value"
        is_member_of_default_group: "false"
        product_version: "string_value"
        platform: "string_value"
        motd: "string_value"
        hypervisor_uptime: "string_value"
        config_motd: "false"
        host: "string_value"
        build_number: "string_value"
        time_zone_offset: "integer_value"
        is_container: "false"
        hist_mig_inprog: "false"
        time_zone: "string_value"
        product: "string_value"
        upgrade_agent_version: "string_value"
        current_tenant_id: "string_value"
        cc_profile_id: "string_value"
        cc_feature_enabled: "false"
        cc_pop_name: "string_value"
        cc_profile_skip: "boolean_value"
        new_with_cloudconnect: "false"
        cc_client_id: "string_value"
        cloud_customer_name: "string_value"
        enable_mastlmy: "false"
        cc_profile: "boolean_value"

  mps_readwrite:
    type: object
    properties:
      maps_apikey:
        description: "Maps API Key"
        type: string
        format: string
      deployment_type:
        description: "Indicates the type of deployment of NetScaler Console: standalone or ha or scaleout."
        type: string
        format: string
      is_passive:
        description: "Indicates the node's state: ACTIVE or PASSIVE in a HA deployment."
        type: boolean
        format: boolean
      privilege_feature:
        description: "privilege_feature"
        type: string
        format: string
      is_cloud:
        description: "True if its a cloud deployment"
        type: boolean
        format: boolean
      is_member_of_default_group:
        description: "Is Member Of Default Group"
        type: boolean
        format: boolean
      motd:
        description: "Message of the Day (contents of motd file) that can be shown on UI after successful login"
        type: string
        format: string
        maxLength: 255
      config_motd:
        description: "Configure Message of the Day (contents of motd file), this needs to be set true if user wants to configure message if the day"
        type: boolean
        format: boolean
      is_container:
        description: "True if its a container deployment"
        type: boolean
        format: boolean
      hist_mig_inprog:
        description: "Indicates whether the historical tables database migration is in progress or not."
        type: boolean
        format: boolean
      upgrade_agent_version:
        description: "Indicates the next version the agent needs to upgrade to."
        type: string
        format: string
      cc_profile_id:
        description: "Returns cloud profile id."
        type: string
        format: string
      cc_feature_enabled:
        description: "cloud connector feature enabled"
        type: boolean
        format: boolean
      cc_pop_name:
        description: "Returns cloud connect pop name."
        type: string
        format: string
      cc_profile_skip:
        description: "True, if cloud identity authenticate is to be skipped"
        type: boolean
        format: boolean
      new_with_cloudconnect:
        description: "new with cloudconnect"
        type: boolean
        format: boolean
      cc_client_id:
        description: "Returns cloud profile client id."
        type: string
        format: string
      cloud_customer_name:
        description: "cloud customer name"
        type: string
        format: string
      enable_mastlmy:
        description: "Cloud Connector telemetry enabled"
        type: boolean
        format: boolean
      cc_profile:
        description: "True, if cloud profile is updated by user."
        type: boolean
        format: boolean

  mps:
    allOf:
      -
        properties:
          build_number_short:
             description: "Build Number without Date"
             type: string
             format: string
          sysid:
             description: "System Id"
             type: string
             format: string
          hostname:
             description: "Host name on which system is running"
             type: string
             format: string
          bios_version:
             description: "BIOS Version"
             type: string
             format: string
          uptime:
             description: "Uptime"
             type: string
             format: string
          current_user_permission:
             description: "This property will show the permission type for current user"
             type: string
             format: string
          product_build_number:
             description: "Product Build Number"
             type: string
             format: string
          serial:
             description: "Serial Number"
             type: string
             format: string
          username:
             description: "User Name who is currently connected to the system"
             type: string
             format: string
          current_tenant:
             description: "Current Tenant Name for logged-in user"
             type: string
             format: string
          current_time_formatted:
             description: "Current Time (Formatted)"
             type: string
             format: string
          current_time:
             description: "Current Time"
             type: integer
             format: int32
          hostid:
             description: "Host Id"
             type: string
             format: string
          product_version:
             description: "Product Version"
             type: string
             format: string
          platform:
             description: "Platform"
             type: string
             format: string
          hypervisor_uptime:
             description: "Hypervisor Uptime"
             type: string
             format: string
          host:
             description: "Host IP Address on which system is running, this will set for each client session only"
             type: string
             format: string
          build_number:
             description: "Build Number"
             type: string
             format: string
          time_zone_offset:
             description: "Time zone offset in minutes (Example:-330)"
             type: integer
             format: int32
          time_zone:
             description: "Server Time Zone"
             type: string
             format: string
          product:
             description: "Product Name"
             type: string
             format: string
          current_tenant_id:
             description: "Current Tenant Id for logged-in user"
             type: string
             format: string
      - $ref: '#/definitions/mps_readwrite'

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