> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aptlydone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get delegation roles history



## OpenAPI

````yaml get /v1/delegations/{delegationHistoryId}/roles-history
openapi: 3.0.0
info:
  title: Decision APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com/decision
  - url: https://staging.api.eu.aptlydone.com/decision
  - url: https://api.us.aptlydone.com/decision
  - url: https://api.eu.aptlydone.com/decision
security: []
tags: []
paths:
  /v1/delegations/{delegationHistoryId}/roles-history:
    get:
      tags:
        - delegations
      summary: Get delegation roles history
      operationId: DelegationController_getRolesByDelegationHistoryId_v1
      parameters:
        - name: delegationHistoryId
          required: true
          in: path
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: Page number
          schema:
            type: number
            example: 1
            minimum: 1
        - name: limit
          required: false
          in: query
          description: Number of items per page
          schema:
            minimum: 1
            maximum: 100
            example: 10
            type: number
        - name: role
          required: false
          in: query
          description: Role of role Delegation.
          schema:
            type: array
            items:
              type: string
        - name: status
          required: false
          in: query
          description: Status of role Delegation.
          schema:
            type: array
            items:
              type: string
        - name: sortBy
          required: false
          in: query
          description: Criteria for sorting delegation role list
          schema:
            enum:
              - roleName
              - roleStatus
              - roleRequirement
              - updatedAt
            type: string
        - name: sortOrder
          required: false
          in: query
          description: Criteria for order delegation role list
          schema:
            enum:
              - asc
              - desc
            type: string
      responses:
        '200':
          description: Roles list retrieved successfully for Delegation history
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedDelegationRoleResponseDtoResponse
      security:
        - accessToken: []
components:
  schemas:
    PaginatedDelegationRoleResponseDtoResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 200
        timestamp:
          type: string
          example: '2026-01-08T06:33:50.723Z'
        message:
          type: string
          example: Success
        data:
          type: object
          required:
            - page
            - limit
            - total
            - data
          properties:
            page:
              type: number
              example: 1
              minimum: 1
            limit:
              type: number
              example: 10
              minimum: 1
            total:
              type: number
              example: 100
              minimum: 0
            data:
              type: array
              items:
                $ref: '#/components/schemas/DelegationRoleResponseDto'
      required:
        - statusCode
        - timestamp
        - message
    DelegationRoleResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 14f5a115-52d0-4466-baff-740447a60774
          description: Delegation Role Mapping Id
        delegationId:
          type: string
          example: 2sf90da4-0634-40b9-abf5-6e97a222rds8
          description: delegation Id
        delegationRoleId:
          type: string
          example: 7sf90da4-0634-40b9-abf5-6e97a222ttt8
          description: Delegation role Id
        designeeRecipientType:
          type: object
          example: PERSONNEL_IN_POSITION
          description: Delegation recipient type
        isAutoIssue:
          type: boolean
          example: false
          description: >-
            Auto Issue option for Delegation recipient of type
            PERSONNEL_IN_POSITION
        updatedAt:
          format: date-time
          type: string
          description: Last updated date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
        createdAt:
          format: date-time
          type: string
          description: Creation date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
        roleDesignees:
          default: []
          description: Delegation Designees
          type: array
          items:
            $ref: '#/components/schemas/RoleDesigneeResponseDto'
        roleDetails:
          description: Details about the role
          allOf:
            - $ref: '#/components/schemas/DelegationRoleDto'
      required:
        - id
        - delegationId
        - delegationRoleId
        - designeeRecipientType
        - isAutoIssue
        - updatedAt
        - createdAt
    RoleDesigneeResponseDto:
      type: object
      properties:
        user:
          description: User details
          allOf:
            - $ref: '#/components/schemas/UserResponseDto'
        position:
          description: Position details
          allOf:
            - $ref: '#/components/schemas/PositionResponseDto'
    DelegationRoleDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier for the role detail
          example: a97bbbc4-1415-4131-81fb-761fd111f370
        roleId:
          type: string
          description: Associated role ID
          example: 10df93d6-4e88-40f9-b46a-1676017451ba
        roleName:
          type: string
          description: Name of the role
          example: Informed
        roleStatus:
          type: string
          description: Status of the role assignment
          example: ASSIGNED
        roleRequirement:
          type: string
          description: Requirement description of the role
          example: Lorem ipsum is a dummy requirement
        isCascade:
          type: boolean
          description: Indicates if the role is cascaded
          example: false
        isDeleted:
          type: boolean
          description: Indicates if the role is deleted
          example: false
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the role was created
          example: '2025-03-19T14:45:37.301Z'
        updatedAt:
          format: date-time
          type: string
          description: Timestamp when the role was last updated
          example: '2025-03-19T14:45:37.301Z'
      required:
        - id
        - roleId
        - roleName
        - roleStatus
        - roleRequirement
        - isCascade
        - isDeleted
        - createdAt
        - updatedAt
    UserResponseDto:
      type: object
      properties:
        id:
          type: string
          description: User ID
          example: fc10ba5e-2759-4f00-b452-9dbe6ad0df6e
        name:
          type: string
          description: User name (fallback for backward compatibility)
          example: Alpha user
        displayName:
          type: string
          description: User-friendly display name (preferred field)
          example: Alpha User
        profileImageUrl:
          type: string
          description: Profile image URL
          example: ''
    PositionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Position ID
          example: ecb0fccf-0260-4192-b0a0-f9f3960111a3
        positionName:
          type: string
          description: Position name
          example: Expert Tutor
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````