Retrieving segment definitions via API
We want to document and track versions of SiteCatalyst segment definitions outside of the system.
The way we do this now is copy/pasting from the information window in SiteCatalyst but it's inefficient and prone to errors (e.g. marking exclusion blocks).
Looking a bit further into it I can see that when the information icon is clicked to view the segment definition it actually retrieves a json object from an appservice:
https://appservice1.omniture.com/analytics/1.0/segments/?expansion=definition
Which looks like this (apologies for this formatting):
- "id": "53aaaf4ce4b0acd00fa0563b",
- "name": "",
- "description": null,
- "rsid": "",
- "owner":{
- "id": 440376
- "definition":{
- "container":{
- "context": "hits",
- "func": "container",
- "pred":{
- "val":{
- "description": "Pages (Conversion) (evar7)",
- "name": "variables/evar7",
- "func": "attr"
- "str": "",
- "func": "streq"
- "val":{
- "func": "segment",
- "version":[
- 1,
- 0,
- 0
- "container":{