get:
  operationId: listPasswordPolicyHoldersOnSource
  tags:
    - Sources
  summary: Lists password policy exceptions
  description: >-
    This end-point gets the password policy exceptions associated with a specified source.
  parameters:
    - in: path
      name: sourceId
      schema:
        type: string
      required: true
      description: The Source id
      example: 8c190e6787aa4ed9a90bd9d5344523fb
  responses:
    '200':
      description: List of Password Policy Exceptions for the specified Source
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '../schemas/PasswordPolicyHoldersDto.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'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
  security:
    - oauth2: [idn:password-policy:read]

patch:
  operationId: updatePasswordPolicyHolders
  tags:
    - Sources
  summary: Update Exceptions Password Policy
  description: |
    This API can be used to set up or update an Exceptions Password Policy in IdentityNow for the specified Source.
    Source must support PASSWORD feature.

    A token with ORG_ADMIN, SOURCE_ADMIN, SOURCE_SUBADMIN, or ROLE_SUBADMIN authority is required to call this API.
  parameters:
    - in: path
      name: sourceId
      schema:
        type: string
      required: true
      description: The Source id
      example: 8c190e6787aa4ed9a90bd9d5344523fb
  requestBody:
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/PasswordPolicyHoldersDto.yaml'
  responses:
    '200':
      description: >-
        Updated Exception Password Policies
      content:
        application/json:
          schema:
            $ref: '../schemas/PasswordPolicyHoldersDto.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'
    '429':
      $ref: '../../v3/responses/429.yaml'
    '500':
      $ref: '../../v3/responses/500.yaml'
  security:
    - oauth2: [ idn:sources:update ]
