post:
  operationId: createRoleMiningSessions
  summary: Create a role mining session
  tags:
    - IAI Role Mining
  description: >-
    This submits a create role mining session request to the role mining application.
  requestBody:
    description: Role mining session parameters
    required: true
    content:
      application/json:
        schema:
          $ref: "../schemas/RoleMiningSessionDto.yaml"
  responses:
    '201':
      description: Submitted a role mining session request
      content:
        application/json:
          schema:
            $ref: '../schemas/RoleMiningSessionResponse.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'

get:
  operationId: getRoleMiningSessions
  summary: Retrieves all role mining sessions
  tags:
    - IAI Role Mining
  description: >-
    Returns all role mining sessions that match the query parameters
  parameters:
    - in: query
      name: filters
      schema:
        type: string
      description: >-
        Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results)
        Filtering is supported for the following fields and operators:
        **saved**: *eq* "true" or "false"
        **name**: *eq, sw*
      example: 'saved eq "true" and name sw "RM Session"'
    - in: query
      name: sorters
      schema:
        type: string
        format: comma-separated
      description: >-
        Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results)
        Sorting is supported for the following fields: **createdBy, createdDate**
      example: 'createdBy,createdDate'
    - $ref: '../../v3/parameters/offset.yaml'
    - $ref: '../../v3/parameters/limit.yaml'
    - $ref: '../../v3/parameters/count.yaml'
  responses:
    '200':
      description: Succeeded. Returns all role mining sessions that match the query parameters.
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '../schemas/RoleMiningSessionDto.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'