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

/segment/composition-tree/create


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

siteGroupId

String

Yes

The site group identifier to store the SCT under.

name

String

Yes

Max 250 characters.

description

String

No

Max 250 characters.

node

Node Objects

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

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 objects

The segment composition tree nodes the tree consists of.

Examples

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

Last updated: