The user must be authenticated and have read permissions to the siteGroup.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
No |
The site group to retrieve segments from. |
|
|
Integer |
No |
Limit number of segments. |
|
|
Array of String |
No |
Segments to include. All segments from the site group will be included if this is omitted. |
|
|
Boolean |
No |
If true, will calculate overlap of all combinations of segments. Maximum of 10 segments can be included when true |
|
|
String |
No |
Either |
Response
The response object for a successful query has the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of String |
Segments that were included in the segment overlap calculation. |
|
|
Array of Level Object |
See level object below. |
|
|
Integer |
Total number of members in all the included segments. |
Level object:
|
Name |
Type |
Description |
|---|---|---|
|
|
Integer |
The number of segments used in the overlap calculation. Size 1 means overlap with itself, i.e. size of the segment. |
|
|
Array of Overlap Object |
See overlap object below. |
Overlap object:
|
Name |
Type |
Description |
|---|---|---|
|
|
Array of Integer |
The index of the segment(s) included in the overlap claculation. |
|
|
Integer |
Number of members that are part of all the segments listed in |
Examples
$ /config/bin/cx.py /segment/overlap '{"siteGroupId":"1127234276582331313","segments":["8q6sq96cyy5y","a9yd48gemajp","8m64z0cjy6q5"], "allLevels": true}'
{
"segments": [
"8q6sq96cyy5y",
"a9yd48gemajp",
"8m64z0cjy6q5"
],
"levels": [
{
"size": 1,
"overlap": [
{
"indexes": [
0
],
"intersection": 1028142
},
{
"indexes": [
1
],
"intersection": 0
},
{
"indexes": [
2
],
"intersection": 7
}
]
},
{
"size": 2,
"overlap": [
{
"indexes": [
0,
1
],
"intersection": 0
},
{
"indexes": [
0,
2
],
"intersection": 7
},
{
"indexes": [
1,
2
],
"intersection": 0
}
]
},
{
"size": 3,
"overlap": [
{
"indexes": [
0,
1,
2
],
"intersection": 0
}
]
}
],
"totalUnion": 1028142
}