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

# Get the history for a record or relationship

> Retrieves a list of all operations performed on a specific source entity (record or relationship).
Results can be paginated and filtered by a date range.




## OpenAPI

````yaml /api-reference/registry.yml get /sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations
openapi: 3.0.1
info:
  title: Registry API
  version: 1.0.0
servers:
  - url: https://api.{workspaceId}.clinia.cloud
    variables:
      workspaceId:
        default: ''
        description: The workspace id.
security:
  - apiKey: []
  - basicHttpAuth: []
  - bearerHttpAuth: []
tags:
  - name: Collections
    description: Management of collections in a registry.
  - name: Relationships
    description: Management of relationships in a registry.
  - name: Resources
    description: Management of resources in a registry.
paths:
  /sources/{sourceKey}/v1/history/{collectionType}/{collectionKey}/{itemId}/operations:
    get:
      tags:
        - VersionHistory
      summary: Get the history for a record or relationship
      description: >
        Retrieves a list of all operations performed on a specific source entity
        (record or relationship).

        Results can be paginated and filtered by a date range.
      operationId: ListVersionHistoryItems
      parameters:
        - name: sourceKey
          in: path
          description: The source key.
          required: true
          schema:
            type: string
        - name: collectionType
          in: path
          description: The type of the collection.
          required: true
          schema:
            $ref: '#/components/schemas/v1CollectionType'
        - name: collectionKey
          in: path
          description: The key of the collection.
          required: true
          schema:
            type: string
        - name: itemId
          in: path
          description: The id of the item.
          required: true
          schema:
            type: string
        - name: perPage
          in: query
          description: The number of items to return per page.
          required: false
          schema:
            type: integer
            format: int32
            default: 20
        - name: page
          in: query
          description: The page number to retrieve.
          required: false
          schema:
            type: integer
            format: int32
            default: 1
        - name: from
          in: query
          description: >-
            The start of the date range filter (ISO 8601 format). The default
            value is the beginning of time.
          required: false
          schema:
            type: string
            format: date-time
        - name: to
          in: query
          description: >-
            The end of the date range filter (ISO 8601 format). The default
            value is now.
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: A list of version history items for the entity.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1VersionHistoryItems'
        '400':
          description: Bad Request. The request parameters were invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1RegistryError'
        '404':
          description: The specified entity or relationship was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/v1RegistryError'
        '429':
          $ref: '#/components/responses/v1TooManyRequestError'
        '504':
          $ref: '#/components/responses/v1GatewayTimeoutError'
components:
  schemas:
    v1CollectionType:
      type: string
      enum:
        - resources
        - relationships
    v1VersionHistoryItems:
      readOnly: true
      type: array
      description: Represents a list version history item related to an entity.
      items:
        $ref: '#/components/schemas/v1VersionHistoryItem'
    v1RegistryError:
      allOf:
        - $ref: '#/components/schemas/v1Error'
        - type: object
          properties:
            code:
              $ref: '#/components/schemas/v1ErrorCode'
            applicationErrorCode:
              type: string
              enum:
                - REGISTRY_DUPLICATE_IDENTIFIER
                - REGISTRY_INVALID_COLLECTION_TYPE
                - REGISTRY_INVALID_CONTENT_TYPE
                - REGISTRY_INVALID_PIPELINE_STEP_DEFINITION
                - REGISTRY_INVALID_REQUEST_BODY
                - REGISTRY_INVALID_REVISION_ID
                - REGISTRY_PAYLOAD_PARSE_ERROR
                - REGISTRY_REQUIRED_FIELD_MISSING
                - REGISTRY_RESOURCE_TYPE_NOT_FOUND
                - REGISTRY_UNAVAILABLE_UPSTREAM_SERVICE
                - REGISTRY_BROWSE_SESSION_EXPIRED
                - REGISTRY_BULK_OPERATION_NOT_FOUND
                - REGISTRY_COLLECTION_NOT_FOUND
                - REGISTRY_CONTAINED_DEFINITION_NOT_FOUND
                - REGISTRY_PIPELINE_EXECUTION_NOT_FOUND
                - REGISTRY_PROFILE_NOT_FOUND
                - REGISTRY_PURGE_NOT_FOUND
                - REGISTRY_RELATIONSHIP_COLLECTION_NOT_FOUND
                - REGISTRY_RELATIONSHIP_DEFINITION_NOT_FOUND
                - REGISTRY_RELATIONSHIP_NOT_FOUND
                - REGISTRY_RESOURCE_NOT_FOUND
                - REGISTRY_RESOURCE_COLLECTION_NOT_FOUND
                - REGISTRY_SOURCE_NOT_FOUND
                - REGISTRY_TASK_NOT_FOUND
                - REGISTRY_VERSION_HISTORY_ITEM_NOT_FOUND
                - REGISTRY_REQUEST_CANCELLED
                - REGISTRY_REQUEST_TIMEOUT
                - REGISTRY_COLLECTION_ALREADY_EXISTS
                - REGISTRY_DUPLICATE_OPERATION_IN_BUNDLE
                - REGISTRY_IDENTIFIER_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_FROM_REF_ALREADY_EXISTS
                - REGISTRY_RELATIONSHIP_TO_REF_ALREADY_EXISTS
                - REGISTRY_RESOURCE_ALREADY_EXISTS
    v1VersionHistoryItem:
      type: object
      description: Represents a single entry in an entity's version history.
      required:
        - id
        - type
        - targetType
        - operationId
        - taskId
        - timestamp
        - action
        - userInfo
      properties:
        id:
          readOnly: true
          type: string
          description: The unique identifier of the resource or relationship.
        type:
          readOnly: true
          type: string
          description: The collection type of the entity.
        targetType:
          $ref: '#/components/schemas/v1CollectionType'
          readOnly: true
        operationId:
          readOnly: true
          description: The unique identifier of the operation.
          type: string
        taskId:
          readOnly: true
          description: The identifier of the task that processed this operation.
          type: string
        timestamp:
          readOnly: true
          type: string
          format: date-time
          description: The exact time the operation was applied.
        action:
          $ref: '#/components/schemas/v1OperationAction'
          readOnly: true
        userInfo:
          $ref: '#/components/schemas/v1UserInfo'
          readOnly: true
          type: object
          description: Information about the user or service that performed the operation.
    v1Error:
      type: object
      required:
        - code
        - message
        - type
      properties:
        code:
          $ref: '#/components/schemas/v1ErrorCode'
        message:
          type: string
        type:
          $ref: '#/components/schemas/v1ErrorType'
        details:
          description: list of errors that occurred if applicable.
          type: array
          items:
            $ref: '#/components/schemas/v1Error'
        additionalContext:
          type: object
          additionalProperties: true
    v1ErrorCode:
      type: integer
      format: int32
      enum:
        - 400
        - 401
        - 403
        - 404
        - 408
        - 409
        - 413
        - 429
        - 500
        - 501
        - 504
    v1OperationAction:
      type: string
      enum:
        - CREATE
        - UPSERT
        - DELETE
        - UPDATE
      description: The action to perform.
    v1UserInfo:
      type: object
      required:
        - id
        - email
      properties:
        id:
          type: string
        email:
          type: string
    v1ErrorType:
      type: string
      enum:
        - ALREADY_EXISTS
        - FAILED_PRECONDITION
        - INTERNAL
        - INVALID_ARGUMENT
        - NOT_FOUND
        - OUT_OF_RANGE
        - UNIMPLEMENTED
        - PERMISSION_DENIED
        - UNAUTHENTICATED
        - CONTENT_TOO_LARGE
        - REQUEST_TIMEOUT
        - TOO_MANY_REQUEST
        - GATEWAY_TIMEOUT
  responses:
    v1TooManyRequestError:
      description: Returned when the server starts throttling the requests.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
    v1GatewayTimeoutError:
      description: Returned when the request exceeds the server timeout window.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/v1Error'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-Clinia-API-Key
    basicHttpAuth:
      description: Basic HTTP authentication.
      type: http
      scheme: basic
    bearerHttpAuth:
      description: JWT Bearer authentication.
      type: http
      scheme: Bearer
      bearerFormat: JWT

````