post:
  operationId: createPotentialRoleProvisionRequest
  summary: Create request to provision a potential role into an actual role.
  tags:
    - IAI Role Mining
  description: >-
    This method starts a job to provision a potential role
  parameters:
    - in: path
      name: sessionId
      schema:
        type: string
      required: true
      description: The role mining session id
      example: 8c190e67-87aa-4ed9-a90b-d9d5344523fb
    - in: path
      name: potentialRoleId
      schema:
        type: string
      required: true
      description: A potential role id in a role mining session
      example: 8c190e67-87aa-4ed9-a90b-d9d5344523fb
    - in: query
      name: min-entitlement-popularity
      description: Minimum popularity required for an entitlement to be included in the provisioned role.
      required: false
      style: form
      explode: true
      schema:
        type: integer
        default: 0
        minimum: 0
        maximum: 100
    - in: query
      name: include-common-access
      description: Boolean determining whether common access entitlements will be included in the provisioned role.
      required: false
      style: form
      explode: true
      schema:
        type: boolean
        default: true
  requestBody:
    description: Required information to create a new role
    content:
      application/json:
        schema:
          $ref: '../schemas/RoleMiningPotentialRoleProvisionRequest.yaml'
  responses:
    '202':
      description: Accepted. Returns a potential role summary including the status of the provison request
      content:
        application/json:
          schema:
              $ref: '../schemas/RoleMiningPotentialRoleSummary.yaml'
    '400':
      $ref: '../../v3/responses/400.yaml'
    '401':
      $ref: '../../v3/responses/401.yaml'
    '403':
      $ref: '../../v3/responses/403.yaml'
    '404':
      $ref: '../../v3/responses/404.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
