swagger: '2.0'
info:
  description: Configuration for System Groups resource.
  version: 'v2'
  title: mpsgroup
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: mpsgroup
    description: System Groups
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  UserSecurity:
    type: basic
security:
  - UserSecurity: []
parameters:
  idParam:
   name: id
   in: path
   type: string
   description: Id is system generated key for all the system groups
   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/mpsgroup:
    get:
      tags:
        - mpsgroup
      summary: GET all mpsgroup
      operationId: getall_mpsgroup
      description: Use this operation to get system groups
      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 mpsgroup 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 mpsgroup 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 mpsgroup resources.
          enum:
            - yes
      responses:
        200:
          description:  for mpsgroup
          schema: 
              $ref: '#/definitions/getmpsgroupsResponse'
        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:
        - mpsgroup
      summary: POST operation for mpsgroup
      operationId: post_mpsgroup
      description: POST operation for mpsgroup
      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: mpsgroup
          description: mpsgroup object
          schema:
              $ref: '#/definitions/addmpsgroupRequest'
      responses:
        200:
          description: add for mpsgroup
          schema: 
              $ref: '#/definitions/addmpsgroupResponse'
        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/mpsgroup/{id}:
    get:
      tags:
        - mpsgroup
      summary: GET by key for mpsgroup
      operationId: getbykey_mpsgroup
      description: Use this operation to get system groups
      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 mpsgroup
          schema: 
              $ref: '#/definitions/getmpsgroupResponse'
        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:
        - mpsgroup
      summary: PUT for mpsgroup
      operationId: putbykey_mpsgroup
      description: Use this operation to modify system group
      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: mpsgroup
          description: mpsgroup object
          schema:
              $ref: '#/definitions/modifympsgroupRequest'
      responses:
        200:
          description: add for mpsgroup
          schema: 
              $ref: '#/definitions/modifympsgroupResponse'
        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:
        - mpsgroup
      summary: Delete for mpsgroup
      operationId: deletebykey_mpsgroup
      description: Use this operation to delete system group(s)
      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 mpsgroup
        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:
  addmpsgroupRequest:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        $ref: '#/definitions/mpsgroup_readwrite'
    title: addmpsgroupRequest
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        propvalue: "string_value"
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  addmpsgroupResponse:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        $ref: '#/definitions/mpsgroup'
    title: addmpsgroupResponse
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        parent_name: "string_value"
,        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        parent_id: "string_value"
,        propvalue: "string_value"
,        propvalues: ["string_value1","string_value2"]
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        application_names_without_regex: ["string_value1","string_value2"]
        tenant_name: "Owner"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        application_list: [{        export_option: "string_value"
,        name: "string_value"
,        hostname: "string_value"
,        display_name: "string_value"
,        state: "string_value"
,        ns_ip_address: "string_value"
,        vsvr_type: "string_value"
,        vsvr_ip_address: "string_value"
,        configuration_path: "string_value"
,        id: "string_value"
,        type: "string_value"
}]
        application_names_with_regex: ["string_value1","string_value2"]
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  getmpsgroupResponse:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        $ref: '#/definitions/mpsgroup'
    title: getmpsgroupResponse
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        parent_name: "string_value"
,        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        parent_id: "string_value"
,        propvalue: "string_value"
,        propvalues: ["string_value1","string_value2"]
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        application_names_without_regex: ["string_value1","string_value2"]
        tenant_name: "Owner"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        application_list: [{        export_option: "string_value"
,        name: "string_value"
,        hostname: "string_value"
,        display_name: "string_value"
,        state: "string_value"
,        ns_ip_address: "string_value"
,        vsvr_type: "string_value"
,        vsvr_ip_address: "string_value"
,        configuration_path: "string_value"
,        id: "string_value"
,        type: "string_value"
}]
        application_names_with_regex: ["string_value1","string_value2"]
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  getmpsgroupsResponse:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        type: array
        items:
          $ref: '#/definitions/mpsgroup'
    title: getmpsgroupsResponse
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        parent_name: "string_value"
,        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        parent_id: "string_value"
,        propvalue: "string_value"
,        propvalues: ["string_value1","string_value2"]
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        application_names_without_regex: ["string_value1","string_value2"]
        tenant_name: "Owner"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        application_list: [{        export_option: "string_value"
,        name: "string_value"
,        hostname: "string_value"
,        display_name: "string_value"
,        state: "string_value"
,        ns_ip_address: "string_value"
,        vsvr_type: "string_value"
,        vsvr_ip_address: "string_value"
,        configuration_path: "string_value"
,        id: "string_value"
,        type: "string_value"
}]
        application_names_with_regex: ["string_value1","string_value2"]
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  modifympsgroupRequest:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        $ref: '#/definitions/mpsgroup_readwrite'
    title: modifympsgroupRequest
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        propvalue: "string_value"
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  modifympsgroupResponse:
    type: object
    required:
      - mpsgroup
    properties:
      mpsgroup:
        $ref: '#/definitions/mpsgroup'
    title: modifympsgroupResponse
    example:
      mpsgroup:
        session_timeout: "15"
        session_timeout_unit: "Minutes"
        assign_all_apps: "true"
        enable_session_timeout: "false"
        select_individual_entity: "false"
        authscope_props: [{        parent_name: "string_value"
,        propname: "string_value"
,        rbaoperator: "string_value"
,        id: "string_value"
,        parent_id: "string_value"
,        propvalue: "string_value"
,        propvalues: ["string_value1","string_value2"]
}]
        tenant_id: "7ed7946f-4af7-11e9-99d2-b6fe81a85d18"
        apply_all_bound_entities: "true"
        assign_all_devices: "false"
        assign_all_selected_device_apps: "false"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        allow_application_only: "false"
        name: "admin"
        permission: "superuser"
        description: "Group of SSL dashboard admins"
        bound_entity_selected: "0"
        user_session_limit: "40"
        assign_all_autoscale_groups: "true"
        role: "string_value"
        roles: "ARRAY(0x2c2b394)"
        application_names_without_regex: ["string_value1","string_value2"]
        tenant_name: "Owner"
        standalone_instances_id: "ARRAY(0x2b741fc)"
        users: "ARRAY(0x2b606ac)"
        application_names: "ARRAY(0x2b7dee4)"
        application_list: [{        export_option: "string_value"
,        name: "string_value"
,        hostname: "string_value"
,        display_name: "string_value"
,        state: "string_value"
,        ns_ip_address: "string_value"
,        vsvr_type: "string_value"
,        vsvr_ip_address: "string_value"
,        configuration_path: "string_value"
,        id: "string_value"
,        type: "string_value"
}]
        application_names_with_regex: ["string_value1","string_value2"]
        autoscale_groups_id: "ARRAY(0x2b7cb8c)"

  mpsgroup_readwrite:
    type: object
    properties:
      session_timeout:
        description: "Session timeout for the Group"
        type: integer
        format: int32
      session_timeout_unit:
        description: "Session timeout unit for the Group"
        type: string
        format: string
      assign_all_apps:
        description: "Assign All Applications (YES|NO)"
        type: boolean
        format: boolean
      enable_session_timeout:
        description: "Enables session timeout for group"
        type: boolean
        format: boolean
      select_individual_entity:
        description: "Select Individual Entity Type"
        type: boolean
        format: boolean
      authscope_props:
        type: array
        items:
          $ref: '#/definitions/rba_authscope_props_readwrite'
      tenant_id:
        description: "Id of the tenant"
        type: string
        format: uuid
        minLength: 1
        maxLength: 128
      apply_all_bound_entities:
        description: "Apply for all bound entities (TRUE|FALSE)"
        type: boolean
        format: boolean
      assign_all_devices:
        description: "Assign All Instances (YES|NO)"
        type: boolean
        format: boolean
      assign_all_selected_device_apps:
        description: "Assign All Application from selected instances (YES|NO)"
        type: boolean
        format: boolean
      allow_application_only:
        description: "Checks if only application centic page is needed"
        type: boolean
        format: boolean
      name:
        description: "Group Name"
        type: string
        format: string
        minLength: 1
        maxLength: 64
      permission:
        description: "Permission for the group (admin/read-only)"
        type: string
        format: string
        minLength: 1
        maxLength: 128
      description:
        description: "Description of Group"
        type: string
        format: string
        minLength: 1
        maxLength: 1024
      bound_entity_selected:
        description: "Which bound entiy is selected VSERVER(0),SERVICE(1),SERVICEGROUP(2),SERVER(3)"
        type: integer
        format: int32
      user_session_limit:
        description: "Number of session(s) limited per user part of this group"
        type: integer
        format: int32
      assign_all_autoscale_groups:
        description: "Assign All Autoscale groups (YES|NO)"
        type: boolean
        format: boolean
      role:
        description: "Role (admin|nonadmin)"
        type: string
        format: string
      roles:
        description: "Roles assigned to the group"
        type: array
        items:
          type: string
          format: string
      standalone_instances_id:
        description: "Stand alone instances belong to this groupp"
        type: array
        items:
          type: string
          format: string
      users:
        description: "Users belong to the group"
        type: array
        items:
          type: string
          format: string
      application_names:
        description: "All Application names that are part of this group.This includes selected appnames as well as applications which are result of defined regex"
        type: array
        items:
          type: string
          format: string
      autoscale_groups_id:
        description: "Autoscale groups belong to this groupp"
        type: array
        items:
          type: string
          format: string

  mpsgroup:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all the system groups
            type: string
            format: uuid
          application_names_without_regex:
             description: "selected application names that are part of this group"
             type: array
             items:
               type: string
               format: string
          application_names_with_regex:
             description: "Application names defined with regex that are part of this group"
             type: array
             items:
               type: string
               format: string
      - $ref: '#/definitions/mpsgroup_readwrite'

  rba_authscope_props_readwrite:
    type: object
    properties:
      propname:
        description: "Prop Name"
        type: string
        format: string
      rbaoperator:
        description: "RBA operator has to be given as true if regex has been given for individual entities for services,servicegroup,servers while creating or modifying group."
        type: string
        format: string
      propvalue:
        description: "comma separated ids or use ALL for everything"
        type: string
        format: string

  rba_authscope_props:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all the auth scope properties
            type: string
            format: uuid
          parent_name:
             type: string
             format: string
          parent_id:
             type: string
             format: string
          propvalues:
             description: "Values for a Propname"
             type: array
             items:
               type: string
               format: string
      - $ref: '#/definitions/rba_authscope_props_readwrite'

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