get_mappings
POST /API/v2/get_mappings
Matches identifiers to mappings for a particular key field. See example.
Request body¶
slicer_name: the name of the report.project_name: the name of the project.search_mappings: an array with the following structure:- [ {"key": "key_field",
- "values": ["value1", ... ]},...],
where "values" is an array of key field identifiers to search mappings for, and "key_field" is the name of the key field.
Response¶
mappings: a list ofkey field value/key field value mappingpairs with the following structure:- {"key_field":
- {"value1: "mapping1",...},...}
Example¶
Get mappings for the US and CA values of the geo-country key field.
Path:
https://uslicer.iponweb.com/API/v2/get_mappings
Request
{
"slicer_name": "Traffic Demo",
"project_name": "demo",
"search_mappings": [
{
"key": "geo_country",
"values": [
"US", "CA"
]
}
]
}
curl --data '{
"slicer_name": "Traffic Demo",
"project_name": "demo",
"search_mappings": [
{
"key": "geo_country",
"values":[
"US",
"CA"
]
}
]
}'\
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>" \
"https://uslicer.iponweb.com/API/v2/get_mappings"
Response
{
"mappings" : {
"geo_country" : {
"US" : "United States",
"CA" : "Canada"
}
},
"status" : "success"
}