VIEW ALL MAPPING TABLES
In order to view all mapping tables, send a GET request as per the below:
curl -X GET \
https://YOUR_STACK.datatap.adverity.com/api/mapping-tables \
-H 'Authorization: Token TOKEN_VALUE' \
Result (cropped for 1 table)
{
"count": XX,
"next": null,
"previous": null,
"results": [
{
"id": MAPPING_TABLE_ID,
"name": "MAPPING_TABLE_NAME",
"created": "YYYY-MM-DDTHH:MM:SSZ",
"entries": "https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/ID/entries/",
"url": "https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/ID/"
}
]
}
VIEW ALL ENTRIES
To get a list of all entries for a specific table, perform a GET request on the specific MAPPING_TABLE_ID:
curl -X GET \
https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/MAPPING_TABLE_ID/entries \
Result (cropped for 1 entry):
{
"count": XX,
"next": null,
"previous": null,
"results": [
{
"id": ENTRY_ID,
"match": "MATCH_ENTRY",
"value": "VALUE_ENTRY"
}
]
}
CREATE A NEW ENTRY
curl -X POST \
https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/MAPPING_TABLE_ID/entries/ \
-H 'Authorization: Token TOKEN_VALUE' \
-H 'Content-Type: application/json' \
-d '{"match":"MATCH_VALUE"
}'
Result:
{
"id": ENTRY_ID,
"match": "MATCH_ENTRY",
"value": ""
}
UPDATE AN EXISTING ENTRY
To update an entry, use the following PATCH request:
curl -X PATCH \
https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/MAPPING_TABLE_ID/entries/ENTRY_ID/ \
-H 'Authorization: Token TOKEN_VALUE' \
-H 'Content-Type: application/json' \
-d '{"value":"UPDATED_VALUE"}'
DELETE AN ENTRY
To delete an existing entry, perform a DELETE request.
curl -X DELETE \
https://YOUR_STACK.datatap.adverity.com/api/mapping-tables/MAPPING_TABLE_ID/entries/ENTRY_ID/ \
-H 'Authorization: Token TOKEN_VALUE' \
Comments
0 comments
Article is closed for comments.