API call to create a segment composition tree (SCT).
The user must be authenticated and have write permissions to the site group.
Request
The request object has the following fields:
|
Name |
Type |
Required |
Description |
|---|---|---|---|
|
|
String |
Yes |
The site group identifier to store the SCT under. |
|
|
String |
Yes |
Max 250 characters. |
|
|
String |
No |
Max 250 characters. |
|
|
|
Yes |
The segment composition tree nodes the tree consists of. |
Response
The response object for a successful query has the following fields:
|
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. |
Examples
$ /config/bin/cx.py /segment/composition-tree/create '{"siteGroupId":"1352607337759980390","name":"test","description":"test-sct","node":{"or":[{"segmentId":"aavl5zz4kkem"},{"segmentId":"aavlzlrn5j9b"}]}}'
{
"id": "d747c125-af4e-448a-a172-f55a1b88b81b",
"name": "test",
"description": "test-sct",
"siteGroupId": "1352607337759980390",
"node": {
"or": [
{
"segmentId": "aavl5zz4kkem"
},
{
"segmentId": "aavlzlrn5j9b"
}
]
}
}
$ /config/bin/cx.py /segment/composition-tree/create '{"siteGroupId":"1352607337759980390","name":"test","description":"test-sct","node":{"or":[{"and":[{"segmentId":"aa9o0y4vujjh"},{"segmentId":"aaki3g4izc5a"}]},{"segmentId":"aavlzlrn5j9b"}]}}'
{
"id": "ae4c4e5d-4243-4d11-9c0a-044382161510",
"name": "test",
"description": "test-sct",
"siteGroupId": "1352607337759980390",
"node": {
"or": [
{
"and": [
{
"segmentId": "aa9o0y4vujjh"
},
{
"segmentId": "aaki3g4izc5a"
}
]
},
{
"segmentId": "aavlzlrn5j9b"
}
]
}
}