We’ve migrated our documentation to a new site, which means some URLs have changed.
Audience

/segment/history

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

segmentId

String

The identifier for the audience segment

time

Long

The segment modification time in format of unix timestamp

username

String

Name of user who did segment modification

changes

Array of Object

List of specified segment modification

Change object has the following fields:

Name

Type

Description

type

String

Type of change (NAME, DESCRIPTION, FILTERS, ANNOTATIONS, ACTIVE, TYPE, GROUP, CATEGORY, ITEM, EXPIRATION_DATE, TARGETING, LOOKALIKE_ACTIVE, FRACTION, NEGATIVES)

oldValue

String

The value of segment field before change

newValue

String

The value of segment field after change

Examples

Bash
$ 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"
 }
 ]
 }
 ]
}

Last updated: