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 |
|---|---|---|---|
|
|
String |
No |
The id of the SCT to read. |
|
|
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 |
|---|---|---|
|
|
String |
The identifier for the SCT |
|
|
String |
The site group identifier to which this SCT belongs |
|
|
String |
The name of this SCT |
|
|
String |
A description for this SCT |
|
|
|
The segment composition tree nodes the tree consists of. |
Node object
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Segment id |
|
|
List of |
Combination of nodes that all must match for the SCT to match |
|
|
List of |
Combination of nodes where 1 must match for the SCT to match |
|
|
|
Negates the matching of a node |
Examples
$ /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"
} ]
}
} ]