Created
December 15, 2015 05:41
-
-
Save StevenMMortimer/edfb701d84b100b13be7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# request the report | |
# this returns a reportID that's used for retrieving the results | |
curl https://api5.omniture.com/admin/1.4/rest/?method=Report.Queue \ | |
-H "Accept: application/json" \ | |
-H 'Authorization: WSSE profile="UsernameToken"' \ | |
-H 'X-WSSE: UsernameToken Username="my.username:My Company", PasswordDigest="{sha1 encrypted password goes here}", Nonce="1450112360.27583", Created="2015-12-14T16:59:20Z"' \ | |
-X POST \ | |
-d '{ | |
"reportDescription":{ | |
"dateFrom":"2015-11-01", | |
"dateTo":"2015-11-01", | |
"reportSuiteID":"myreportsuite", | |
"metrics":[ | |
{ | |
"id":"pageviews" | |
} | |
], | |
"elements":[ | |
{ | |
"id":"evar2", | |
"top":2, | |
"startingWith":0 | |
}, | |
{ | |
"id":"evar4", | |
"top":"50000" | |
} | |
] | |
} | |
}' | |
# get the report | |
curl https://api5.omniture.com/admin/1.4/rest/?method=Report.Get \ | |
-H "Accept: application/json" \ | |
-H 'Authorization: WSSE profile="UsernameToken"' \ | |
-H 'X-WSSE: UsernameToken Username="my.username:My Company", PasswordDigest="{sha1 encrypted password goes here}", Nonce="1450112566.69183", Created="2015-12-14T17:02:46Z"' \ | |
-X POST \ | |
-d '{ "reportID":"999999" }' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment