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 |
|---|---|---|---|
|
|
String |
No |
Segment id |
|
|
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 |
|---|---|---|
|
|
Array of object |
Array of segments metadata objects |
The segment metadata object contains the following fields:
|
Name |
Type |
Description |
|---|---|---|
|
|
String |
Segment id |
|
|
String |
Category name |
|
|
String |
Group name |
|
|
String |
Item name |
Example
$ 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"
}
]
}