---
title: "queryMappingHistory"
method: GET
path: "/v1/mappings/history"
tags: ["mappings"]
---

# queryMappingHistory

`GET /v1/mappings/history`

Get the Mapping History

## Query parameters

- `from` string, datetime
- `to` string, datetime
- `targetEntityId` string, uuid
- `sourceEntityId` string, uuid

## Response `200`

Query result of mapping history

- object
  - `results` MappingHistoryResp[]
    - `results` MappingHistoryEntry[], required
      - `id` string, required
      - `timestamp` string, ISO datetime, required
      - `source_entity_snapshot` Entity, required
        - `_id` string
        - `_schema` string
        - `_title` string, nullable
        - `_org` string
        - `_tags` string[], nullable
        - `_created_at` string, nullable
        - `_updated_at` string, nullable
        - `required` unknown
      - `mapped_entities_snapshot` Entity[], required
        - `_id` string
        - `_schema` string
        - `_title` string, nullable
        - `_org` string
        - `_tags` string[], nullable
        - `_created_at` string, nullable
        - `_updated_at` string, nullable
        - `required` unknown
      - `target_configs_snapshot` TargetConfig[], required
        - `id` string — Identifier for target configuration. Useful for later usages when trying to identify which target config to map to.
        - `name` string — A name for this configuration
        - `allow_failure` boolean — Pass it as true, when you don't want failures to interrupt the mapping process.
        - `target_schema` string, required — Schema of target entity
        - `target_unique` string[] — Unique key for target entity (see upsertEntity of Entity API)
        - `use_uniqueness_criteria` boolean — Execution wire flag set per automation by automation-workers: resolve the target entity via the organization's global uniqueness criteria (deduplication-api) instead of target_unique. Never persisted in stored mapping configs.
        - `loop_config` object — contains config in case of running in loop mode
          - `source_path` string — path to the array from the entity payload
          - `length` number — a hard limit of how many times the loop is allowed to run.
        - `conditionMode` 'oneOf' | 'anyOf' | 'allOf' — Mode of how conditions are considered valid
        - `conditions` MapCondition[] — Conditions necessary to hold for the target entity to be mapped
          - `_exists` ConditionNode
            - `source` string
            - `value` union
              - …
          - `_equals` ConditionNode
            - `source` string
            - `value` union
              - …
          - `_not_exists` ConditionNode
            - `source` string
            - `value` union
              - …
          - `_any_of` ConditionNode
            - `source` string
            - `value` union
              - …
        - `mapping_attributes` union[], required — Attribute mappings
          - union
            - MappingAttributeV2
              - …
            - union
              - …
        - `relation_attributes` RelationAttribute[] — Relation mappings
          - `target` string, required — Target attribute to store the relation in
          - `target_tags` string[] — Relation tags (labels) to set for the stored relations
          - `target_tags_include_source` boolean — Include all relation tags (labels) present on the main entity relation
          - `target_entity_tags` string[] — Tags to add to the matched target entity's _tags array during mapping. Useful for assigning file collections to file entities.
          - `override_with_source_filter` boolean — Whether to override the relation source_filter with the specified one
          - `source_filter` object — A filter to identify which source entities to pick as relations from main entity
            - `limit` integer — Limit relations to maximum number (default, all matched relations)
            - `schema` string — Filter by specific schema
            - `attribute` string — Filter by a specific relation attribute on the main entity
            - `relation_tag` string — Filter by relation tag (label) on the main entity
            - `tag` string — Filter by a specific tag on the related entity
            - `self` boolean — Picks main entity as relation (overrides other filters)
          - `related_to` object
          - `mode` 'append' | 'prepend' | 'set', required
          - `origin` 'system_recommendation' | 'user_manually' | 'entity_updating_system_recommendation' — Origin of an attribute.
        - `linkback_relation_attribute` string — Relation attribute on the main entity where the target entity will be linked. Set to false to disable linkback
        - `linkback_relation_tags` string[] — Relation tags (labels) to include in main entity linkback relation attribute

---

[API](https://skmtc.dev/epilot/apis/entity-mapping-api.md) · [All operations](https://skmtc.dev/epilot/apis/entity-mapping-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/epilot/entity-mapping-api/revisions/ac038dfc97a1/schema)
