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

/segment/metadata

Reads the metadata associated with the segment. Setting these metadata values can only be done by Piano.

The user must be authenticated and have read access to the sitegroup.

Request

The request object has the following fields:

Name

Type

Required

Description

segmentId

String

No

Segment id

siteGroupId

String

No

Site group id

Only one element 'siteGroupId' or 'segmentId' must have non empty value.

The read request will return all segment metadata objects for the user if no parameters are given.

Response

The response object for a successful query has the following fields:

Name

Type

Description

segments

Array of object

Array of segments metadata objects

The segment metadata object contains the following fields:

Name

Type

Description

id

String

Segment id

category

String

Category name

group

String

Group name

item

String

Item name

Example

Bash
$ cx.py /segment/metadata?admin=true ''{"siteGroupId":"1135172"}''
{
 "segments": [
 {
 "id": "8nex2ub5bh", 
 "category": "Sociodemographic", 
 "group": "Age", 
 "item": "45-54"
 }, 
 {
 "id": "8nexbj4f90", 
 "category": "Interest", 
 "group": "User Interest", 
 "item": "Travel"
 }
 ]
}

Last updated: