- Base URL:
https://entity-mapping.sls.epilot.io - API Docs: https://docs.epilot.io/api/entity-mapping
API Backend for mapping source entity into target entities
# List available operations
epilot entity-mapping
# Call an operation
epilot entity-mapping storeConfig| Flag | Description |
|---|---|
-p key=value |
Set a named parameter |
-d '{...}' |
Request body JSON |
-H 'Key: Value' |
Custom header |
-t, --token <token> |
Bearer token for authentication |
--profile <name> |
Use a named profile |
-s, --server <url> |
Override server base URL |
-i, --include |
Include response headers in output |
--json |
Output raw JSON (no formatting) |
-v, --verbose |
Verbose output (show request details) |
--jsonata <expr> |
JSONata expression to transform response |
--definition <file> |
Override OpenAPI spec file/URL |
--guided |
Prompt for all parameters interactively |
--no-interactive |
Disable interactive prompts |
mappings
storeConfig— Store new MappingConfiggetConfig— Get latest version of a mapping config by iddeleteConfig— Delete entity mapping configgetAllVersions— Get all version of MappingConfigstoreNewVersion— Store new version of MappingConfiggetConfigVersion— Get specific version of a mapping config by id & versionexecuteMapping— Execute entity mapping based on a configsearchConfigs— Search mapping configsqueryMappingHistory— Get the Mapping HistoryexecuteRelations— Execute relation mapping between source entity and target entitiesgetMappingConfig— Get latest version of a mapping config by id V2putMappingConfig— Stores new version of entity mapping config
Store new MappingConfig
POST /v1/mappings
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
with_id |
query | string | No | Whether ids are part of the body or not |
Request Body
Sample Call
epilot entity-mapping storeConfigWith request body:
epilot entity-mapping storeConfig \
-d '{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}'Using stdin pipe:
cat body.json | epilot entity-mapping storeConfigWith JSONata filter:
epilot entity-mapping storeConfig --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Get latest version of a mapping config by id
GET /v1/mappings/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Sample Call
epilot entity-mapping getConfig \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47Using positional args for path parameters:
epilot entity-mapping getConfig 70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping getConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Delete entity mapping config
DELETE /v1/mappings/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Sample Call
epilot entity-mapping deleteConfig \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47Using positional args for path parameters:
epilot entity-mapping deleteConfig 70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping deleteConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Get all version of MappingConfig
GET /v1/mappings/{id}/versions
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Sample Call
epilot entity-mapping getAllVersions \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47Using positional args for path parameters:
epilot entity-mapping getAllVersions 70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping getAllVersions -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata 'configs'Sample Response
{
"configs": [
{
"id": "string",
"source": {},
"targets": [],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {},
"last_updated_by": {},
"org_id": "66",
"version": 2
}
]
}Store new version of MappingConfig
POST /v1/mappings/{id}/versions
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Request Body
Sample Call
epilot entity-mapping storeNewVersion \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47With request body:
epilot entity-mapping storeNewVersion \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \
-d '{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}'Using positional args for path parameters:
epilot entity-mapping storeNewVersion 70542580-2b38-4bfc-af8d-bb90102f9f47Using stdin pipe:
cat body.json | epilot entity-mapping storeNewVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping storeNewVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Get specific version of a mapping config by id & version
GET /v1/mappings/{id}/versions/{version}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
version |
path | number | Yes | Version to be loaded |
Sample Call
epilot entity-mapping getConfigVersion \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \
-p version=3Using positional args for path parameters:
epilot entity-mapping getConfigVersion 70542580-2b38-4bfc-af8d-bb90102f9f47 3With JSONata filter:
epilot entity-mapping getConfigVersion -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 -p version=3 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Execute entity mapping based on a config
POST /v1/mappings:execute
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
preview_mode |
query | boolean | No | True, if you want to preview the entities which will result |
Request Body
Sample Call
epilot entity-mapping executeMappingWith request body:
epilot entity-mapping executeMapping \
-d '{
"source_ref": {
"entity_id": "string",
"entity_schema": "submission"
},
"loop_ref": {
"entity_id": "string",
"entity_schema": "submission"
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
]
}'Using stdin pipe:
cat body.json | epilot entity-mapping executeMappingWith JSONata filter:
epilot entity-mapping executeMapping --jsonata 'mapped_entities'Sample Response
{
"mapped_entities": [
{
"_id": "string",
"_schema": "string",
"_title": "string",
"_org": "string",
"_tags": ["string"],
"_created_at": "string",
"_updated_at": "string",
"required": {}
}
],
"failures": [
{
"target": {},
"error": {}
}
],
"warnings": [
{
"explanation": "string",
"context": "string",
"id": "string"
}
]
}Search mapping configs
POST /v1/mappings:search
Request Body
Sample Call
epilot entity-mapping searchConfigs \
-d '{"source":{"type":"journey","config":{"journey_id":"string"}}}'Using stdin pipe:
cat body.json | epilot entity-mapping searchConfigsWith JSONata filter:
epilot entity-mapping searchConfigs --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Get the Mapping History
GET /v1/mappings/history
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
from |
query | string (datetime) | No | filter the history from this date on |
to |
query | string (datetime) | No | filter the history to this date on |
targetEntityId |
query | string (uuid) | No | |
sourceEntityId |
query | string (uuid) | No |
Sample Call
epilot entity-mapping queryMappingHistoryWith JSONata filter:
epilot entity-mapping queryMappingHistory --jsonata 'results[0]'Sample Response
{}Execute relation mapping between source entity and target entities
POST /v1/relations:execute
Request Body
Sample Call
epilot entity-mapping executeRelationsWith request body:
epilot entity-mapping executeRelations \
-d '{
"source_ref": {
"entity_id": "string",
"entity_schema": "submission"
},
"target": {
"main_entity_ref": {
"entity_id": "string",
"entity_schema": "submission"
},
"relation_attributes": [
{
"target": "string",
"target_tags": ["string"],
"target_tags_include_source": false,
"target_entity_tags": ["string"],
"override_with_source_filter": false,
"source_filter": {
"limit": 0,
"schema": "string",
"attribute": "string",
"relation_tag": "string",
"tag": "string",
"self": false
},
"related_to": {},
"mode": "append",
"origin": "system_recommendation"
}
],
"linkback": {
"attribute": "mapped_entities",
"relation_tags": ["string"]
}
},
"additional_relations": [
{
"entity_id": "string",
"attribute": "string"
}
]
}'Using stdin pipe:
cat body.json | epilot entity-mapping executeRelationsWith JSONata filter:
epilot entity-mapping executeRelations --jsonata 'relations'Sample Response
{
"relations": [
{
"source_entity_id": "string",
"target_entity_id": "string",
"relation_attr": "string",
"tags": ["string"]
}
]
}Get latest version of a mapping config by id V2
GET /v2/mappings/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Sample Call
epilot entity-mapping getMappingConfig \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47Using positional args for path parameters:
epilot entity-mapping getMappingConfig 70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping getMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}Stores new version of entity mapping config
PUT /v2/mappings/{id}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id |
path | string | Yes | Mapping Config Id |
Request Body
Sample Call
epilot entity-mapping putMappingConfig \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47With request body:
epilot entity-mapping putMappingConfig \
-p id=70542580-2b38-4bfc-af8d-bb90102f9f47 \
-d '{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}'Using positional args for path parameters:
epilot entity-mapping putMappingConfig 70542580-2b38-4bfc-af8d-bb90102f9f47Using stdin pipe:
cat body.json | epilot entity-mapping putMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47With JSONata filter:
epilot entity-mapping putMappingConfig -p id=70542580-2b38-4bfc-af8d-bb90102f9f47 --jsonata '$'Sample Response
{
"id": "string",
"source": {
"type": "journey",
"config": {
"journey_id": "string"
}
},
"targets": [
{
"id": "string",
"name": "string",
"allow_failure": true,
"target_schema": "string",
"target_unique": ["string"],
"use_uniqueness_criteria": false,
"loop_config": {},
"conditionMode": "oneOf",
"conditions": [],
"mapping_attributes": [],
"relation_attributes": [],
"linkback_relation_attribute": "mapped_entities",
"linkback_relation_tags": ["string"],
"graph_context": []
}
],
"created_at": "1970-01-01T00:00:00.000Z",
"updated_at": "1970-01-01T00:00:00.000Z",
"created_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"last_updated_by": {
"type": "user",
"org_id": "string",
"user_id": "string"
},
"org_id": "66",
"version": 2
}