swagger: '2.0'
info:
  description: Configuration for This resource is used to display the feature wise permissions tree during access policy creation in GUI. resource.
  version: 'v2'
  title: rba_client_data
host: 'adm.cloud.com'
schemes:
 - https
# tags are used for organizing operations
tags:
  - name: rba_client_data
    description: This resource is used to display the feature wise permissions tree during access policy creation in GUI.
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 policys
   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/rba_client_data:
    get:
      tags:
        - rba_client_data
      summary: GET all rba_client_data
      operationId: getall_rba_client_data
      description: Use this operation to display the feature wise permissions tree during access policy creation in GUI.
      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 rba_client_data 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 rba_client_data 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 rba_client_data resources.
          enum:
            - yes
      responses:
        200:
          description:  for rba_client_data
          schema: 
              $ref: '#/definitions/getrba_client_datasResponse'
        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/rba_client_data/{id}:
    get:
      tags:
        - rba_client_data
      summary: GET by key for rba_client_data
      operationId: getbykey_rba_client_data
      description: Use this operation to display the feature wise permissions tree during access policy creation in GUI.
      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:  for rba_client_data
          schema: 
              $ref: '#/definitions/getrba_client_dataResponse'
        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:
  getrba_client_dataResponse:
    type: object
    required:
      - rba_client_data
    properties:
      rba_client_data:
        $ref: '#/definitions/rba_client_data'
    title: getrba_client_dataResponse
    example:
      rba_client_data:
        modules: [{        child_node: "string_value"
,        parent_name: "string_value"
,        name: "string_value"
,        submodules: [{}]
,        ui_component: "boolean_value"
,        display_name: "string_value"
,        parent_id: "string_value"
,        serial_id: "integer_value"
,        id: "string_value"
,        operation: [{}]
}]
        child_node: "operation"
        serial_id: "integer_value"
        name: "adminPolicy"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        ui_component: "true"
        display_name: "lb vserver1"

  getrba_client_datasResponse:
    type: object
    required:
      - rba_client_data
    properties:
      rba_client_data:
        type: array
        items:
          $ref: '#/definitions/rba_client_data'
    title: getrba_client_datasResponse
    example:
      rba_client_data:
        modules: [{        child_node: "string_value"
,        parent_name: "string_value"
,        name: "string_value"
,        submodules: [{}]
,        ui_component: "boolean_value"
,        display_name: "string_value"
,        parent_id: "string_value"
,        serial_id: "integer_value"
,        id: "string_value"
,        operation: [{}]
}]
        child_node: "operation"
        serial_id: "integer_value"
        name: "adminPolicy"
        id: "c970e730-6bc5-44c2-a2bf-8dd1382ffb5f"
        ui_component: "true"
        display_name: "lb vserver1"


  rba_client_data:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key for all the system policys
            type: string
            format: string
          modules:
            type: array
            items:
              $ref: '#/definitions/rba_module_client_data'
          child_node:
             description: "This is used if tree node is child node of another tree node in permission tree."
             type: string
             format: string
          serial_id:
             description: "This is used to display the permissions tree in an order manner."
             type: integer
             format: int32
          name:
             description: "Unique name for tree node in UI"
             type: string
             format: string
          ui_component:
             description: "This is used to mention if its UI component"
             type: boolean
             format: boolean
          display_name:
             description: "Display name for tree node in UI"
             type: string
             format: string


  rba_module_client_data:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: string
          child_node:
             description: "This is used if tree node is child node of another tree node in permission tree."
             type: string
             format: string
          parent_name:
             description: "Parent name for UI tree node"
             type: string
             format: string
          name:
             description: "module name"
             type: string
             format: string
          submodules:
            type: array
            items:
              $ref: '#/definitions/rba_submodule_client_data'
          ui_component:
             description: "This is used to mention if its UI component"
             type: boolean
             format: boolean
          display_name:
             description: "module display name"
             type: string
             format: string
          parent_id:
             description: "Parent id for UI tree node"
             type: string
             format: string
          serial_id:
             description: "This is used to display the permissions tree in an order manner."
             type: integer
             format: int32
          operation:
            type: array
            items:
              $ref: '#/definitions/rba_operation_client_data'


  rba_operation_client_data:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: string
          parent_name:
             description: "Parent name for UI tree node"
             type: string
             format: string
          display_name:
             description: "This describes the operation display name under a particular tree node"
             type: string
             format: string
          parent_id:
             description: "Parent id for UI tree node"
             type: string
             format: string
          operation_name:
             description: "This describes the operation name under a particular tree node"
             type: string
             format: string
          serial_id:
             description: "This is used to display the permissions tree in an order manner."
             type: integer
             format: int32
          type:
             description: "This describes the operation type for a particular tree node"
             type: string
             format: string
          dependent_resources:
             description: "This describes the comma separated resources, permission for which is dependent on this resource type"
             type: string
             format: string
          resource_type:
             description: "This describes the resource for a particular tree node"
             type: string
             format: string


  rba_submodule_client_data:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: string
          child_node:
             description: "This is used if tree node is child node of another tree node in permission tree."
             type: string
             format: string
          parent_name:
             description: "Parent node name for UI tree node"
             type: string
             format: string
          name:
             description: "Unique name for tree node in UI"
             type: string
             format: string
          ui_component:
             description: "This is used to mention if its UI component"
             type: boolean
             format: boolean
          display_name:
             description: "Display name for tree node in UI"
             type: string
             format: string
          parent_id:
             description: "Parent id for UI tree node"
             type: string
             format: string
          serial_id:
             description: "This is used to display the permissions tree in an order manner."
             type: integer
             format: int32
          childmodules:
            type: array
            items:
              $ref: '#/definitions/rba_childmodule_client_data'
          operation:
            type: array
            items:
              $ref: '#/definitions/rba_operation_client_data'


  rba_childmodule_client_data:
    allOf:
      -
        properties:
          id:
            description: Id is system generated key
            type: string
            format: string
          child_node:
             description: "This is used if tree node is child node of another tree node in permission tree."
             type: string
             format: string
          parent_name:
             description: "Parent id for UI tree node"
             type: string
             format: string
          name:
             description: "Unique name for tree node in UI"
             type: string
             format: string
          ui_component:
             description: "This is used to mention if its UI component"
             type: boolean
             format: boolean
          display_name:
             description: "Display name for tree node in UI"
             type: string
             format: string
          parent_id:
             description: "Parent id for UI tree node"
             type: string
             format: string
          serial_id:
             description: "This is used to display the permissions tree in an order manner."
             type: integer
             format: int32
          operation:
            type: array
            items:
              $ref: '#/definitions/rba_operation_client_data'

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