curl --request GET \
--url https://api-dev.narrative.io/mappings/{mapping_id}/sample \
--header 'Authorization: Bearer <token>'{
"records": [
{
"input": {
"idType": "idType1",
"idValue": "idValue1"
},
"output": {
"unique_id_f7635d42_51ce_4535_ae8b_9ac64df85501": {
"type": "idType1",
"value": "idValue1"
}
}
},
{
"input": {
"idType": "idType2",
"idValue": "idValue2"
},
"output": {
"unique_id_f7635d42_51ce_4535_ae8b_9ac64df85501": {
"type": "idType2",
"value": "idValue2"
}
}
}
]
}Returns sampled dataset after attribute mapping for a given mapping_id
This endpoint should be used when mapping exist.
A response is a list of JSON objects, where every object will have an input field, that represents the original key/value pairs from the dataset, and the output filed that will contain mapped fields where the key will be attribute name, and value will be JSON object of key/value pairs.
curl --request GET \
--url https://api-dev.narrative.io/mappings/{mapping_id}/sample \
--header 'Authorization: Bearer <token>'{
"records": [
{
"input": {
"idType": "idType1",
"idValue": "idValue1"
},
"output": {
"unique_id_f7635d42_51ce_4535_ae8b_9ac64df85501": {
"type": "idType1",
"value": "idValue1"
}
}
},
{
"input": {
"idType": "idType2",
"idValue": "idValue2"
},
"output": {
"unique_id_f7635d42_51ce_4535_ae8b_9ac64df85501": {
"type": "idType2",
"value": "idValue2"
}
}
}
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Unique identifier for a mapping.
The number of rows to sample from the dataset.
x <= 1000OK