RETRIEVE ALL TRACKED COLUMNS
Retrieve all columns that were ever tracked (not visible in the UI).
curl -X GET \
'https://YOUR.STACK.datatap.adverity.com/api/columns/' \
-H 'Authorization: Token TOKEN_VALUE' \
Result (cropped for 2 results)
{
"count": XX,
"next": "https://YOUR_STACK.datatap.adverity.com/api/columns/?datastream_id=DATASTREAM_ID",
"previous": null,
"results": [
{
"change_url": "/core/datastreamcolumninfo/COLUMN_ID/change/",
"created": "YYYY-MM-DDTHH:MM:SSZ",
"id": COLUMN_ID,
"is_key_column": false,
"name": "COLUMN_NAME",
"datatype": "Long",
"removed": false,
"target_column": null,
"updated": "YYYY-MM-DDTHH:MM:SSZ"
},
{
"change_url": "/core/datastreamcolumninfo/COLUMN_ID/change/",
"created": "YYYY-MM-DDTHH:MM:SSZ",
"id": COLUMN_ID,
"is_key_column": false,
"name": "COLUMN_NAME",
"datatype": "DateTime",
"removed": false,
"target_column": {
"id": COLUMN_ID,
"name": "TARGET_COLUMN_NAME",
"usage": "dimension",
"datatype": "Date",
"measure": null
},
"updated": "YYYY-MM-DDTHH:MM:SSZ"
}
]
}
RETRIEVE DETAILS OF ONE SPECIFIC COLUMN
To get details about a specific tracked column, perform a GET request on the ID.
curl -X GET \
https://YOUR.STACK.datatap.adverity.com/api/columns/COLUMN_ID\
-H 'Authorization: Token TOKEN_VALUE' \
Result:
{
"change_url": "/core/datastreamcolumninfo/COLUMN_ID/change/",
"created": "YYYY-MM-DDTHH:MM:SSZ",
"id": COLUMN_ID,
"is_key_column": false,
"name": "COLUMN_NAME",
"datatype": "Long",
"removed": false,
"target_column": {
"id": TARGET_COLUMN_ID,
"name": "TARGET_COLUMN_NAME",
"usage": "dimension",
"datatype": "String",
"measure": null
},
"updated": "YYYY-MM-DDTHH:MM:SSZ"
}
Typically you would map a column from tracked Columns into a target column with target_column_id
, is_key_column
and set_default
as mandatory parameters.
UPDATE COLUMN MAPPING
Perform a PATCH request to update mapping, set the mapping as a default, or set it as a key column:
curl -X PATCH \
https://YOUR.STACK.datatap.adverity.com/api/columns/COLUMN_ID/ \
-H 'Authorization: Token TOKEN_VALUE' \
-d '{"is_key_column":"TRUE/FALSE","set_default":"TRUE/FALSE","target_column": {"id": TARGET_COLUMN_ID}}'
Result
{
"change_url": "/core/datastreamcolumninfo/COLUMN_ID/change/",
"created": "YYYY-MM-DDTHH:MM:SSZ",
"id": COLUMN_ID,
"is_key_column": true,
"confirmed_type": false,
"name": "COLUMN_NAME",
"datatype": "Long",
"removed": false,
"target_column": null,
"updated": "YYYY-MM-DDTHH:MM:SSZ"
}
Comments
0 comments
Article is closed for comments.