API call to get history of segment changes.
The user must be authenticated and have read permissions to the siteGroup of segment.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
segmentId |
String |
Yes |
Identifier for the audience segment. |
Response
The response object for a successful query has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
The identifier for the audience segment |
|
|
Long |
The segment modification time in format of unix timestamp |
|
|
String |
Name of user who did segment modification |
|
|
Array of Object |
List of specified segment modification |
Change object has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Type of change ( |
|
|
String |
The value of segment field before change |
|
|
String |
The value of segment field after change |
Examples
$ python cx.py /segment/history '{"segmentId":"8n3ggggggggg"}'
{
"changes": [
{
"time": 1574760453835,
"username": "exampleUser@example.com",
"changes": [
{
"type": "FILTERS",
"oldValue": "[{\"type\":\"time\",\"filter\":{\"type\":\"user\",\"having\":{\"min\":2,\"filter\":{\"type\":\"sessionStart\"}}},\"start\":\"-31d\",\"stop\":\"-0d\"}]",
"newValue": "[{\"type\":\"time\",\"filter\":{\"group\":\"browser\",\"type\":\"event\",\"items\":[\"Firefox\"]},\"start\":\"-31d\",\"stop\":\"-0d\"}]"
}
]
},
{
"time": 1574760491264,
"username": "anotherExampleUser@example.com",
"changes": [
{
"type": "NAME",
"oldValue": "Example",
"newValue": "New example name"
}
]
}
]
}