get:
  operationId: listLifecycleStates
  tags:
    - Lifecycle States
  summary: Lists LifecycleStates
  description: >-
    This end-point lists all the LifecycleStates associated with IdentityProfiles.

    A token with API, or ORG_ADMIN authority is required to call this API.
  security:
    - oauth2: [idn:identity-profile-lifecycle-state:read]
  parameters:
    - in: path
      name: identity-profile-id
      description: The IdentityProfile id
      required: true
      schema:
        type: string
      example: ef38f94347e94562b5bb8424a56397d8
    - $ref: '../parameters/limit.yaml'
    - $ref: '../parameters/offset.yaml'
    - $ref: '../parameters/count.yaml'
    - in: query
      name: sorters
      required: false
      schema:
        type: string
        format: comma-separated
      example: created,modified
      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: **created, modified**
  responses:
    '200':
      description: List of LifecycleState objects
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: '../schemas/LifecycleState.yaml'
    '400':
      $ref: '../responses/400.yaml'
    '401':
      $ref: '../responses/401.yaml'
    '403':
      $ref: '../responses/403.yaml'
    '429':
      $ref: '../responses/429.yaml'
    '500':
      $ref: '../responses/500.yaml'
post:
  operationId: createLifecycleState
  tags:
    - Lifecycle States
  summary: Create Lifecycle State
  description: >-
    This API creates a new Lifecycle State.

    A token with ORG_ADMIN or API authority is required to call this API.
  security:
    - oauth2: [idn:identity-profile-lifecycle-state:create]
  parameters:
    - in: path
      name: identity-profile-id
      description: Identity Profile ID
      required: true
      schema:
        type: string
  requestBody:
    description: Lifecycle State
    required: true
    content:
      application/json:
        schema:
          $ref: '../schemas/LifecycleState.yaml'
  responses:
    '201':
      description: Created LifecycleState object.
      content:
        application/json:
          schema:
            $ref: '../schemas/LifecycleState.yaml'
    '400':
      $ref: '../responses/400.yaml'
    '401':
      $ref: '../responses/401.yaml'
    '403':
      $ref: '../responses/403.yaml'
    '429':
      $ref: '../responses/429.yaml'
    '500':
      $ref: '../responses/500.yaml'
