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

/segment/composition-tree/read

API call to read segment composition trees (SCTs).

The user must be authenticated and have read permissions to the site group.

Request

The request object has the following fields:

Name

Type

Required

Description

id

String

No

The id of the SCT to read.

siteGroupIds

List of String

No

The site group identifier to read SCTs from.

Response

The response object for a successful query has the following fields (list of objects):

Name

Type

Description

id

String

The identifier for the SCT

siteGroupId

String

The site group identifier to which this SCT belongs

name

String

The name of this SCT

description

String

A description for this SCT

node

Node object

The segment composition tree nodes the tree consists of.

Node object

Name

Type

Description

segmentId

String

Segment id

and

List of Node Objects

Combination of nodes that all must match for the SCT to match

or

List of Node Objects

Combination of nodes where 1 must match for the SCT to match

not

Node Object

Negates the matching of a node

Examples

Bash
$ /config/bin/cx.py /segment/composition-tree/read '{"id":"c1a91f31-b42f-4870-aa04-e136988b1de0"}'
[{
 "id": "c1a91f31-b42f-4870-aa04-e136988b1de0",
 "name": "test2",
 "siteGroupId": "1352607337759980390",
 "node": {
 "or": [
 {
 "and": [
 {
 "segmentId": "aa9o0y4vujjh"
 },
 {
 "segmentId": "aaki3g4izc5a"
 }
 ]
 },
 {
 "segmentId": "aavlzlrn5j9b"
 }
 ]
 }
}]

$ /config/bin/cx.py /segment/composition-tree/read '{}'
[ {
 "id" : "ffe8e6c6-fa30-4c0d-9142-15003c2cd157",
 "name" : "Test name",
 "description" : "Test desc",
 "siteGroupId" : "9222676619387915874",
 "node" : {
 "or" : [ {
 "segmentId" : "1y2i60cplruxw"
 }, {
 "segmentId" : "1y2i60cplruxy"
 }, {
 "segmentId" : "1y2i60cplruxx"
 } ]
 }
}, {
 "id" : "7d8f7e4a-8c56-4038-be4a-abb3596dea62",
 "name" : "Test name",
 "description" : "Test desc",
 "siteGroupId" : "9222676619387915874",
 "node" : {
 "or" : [ {
 "segmentId" : "1y2i60cplruxz"
 }, {
 "segmentId" : "1y2i60cplruy1"
 }, {
 "segmentId" : "1y2i60cplruy0"
 } ]
 }
} ]

Last updated: