QUESTION
How do I use the getRawHistoricalData web service?
RESOLUTION
Below are example requests for historical data using the Traverse web services.
First, in SOAP XML Format (suitable for use with the tool SoapUI):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:test="http://traverse.zyrion.com/05/06/test"> <soapenv:Header/> <soapenv:Body> <test:getRawHistoricalData> <testRawHistoricalRequest> <password>traverse</password> <username>superuser</username> <searchCriterias> <searchOption>TEST_NAME</searchOption> <searchTerms>Packet Loss</searchTerms> </searchCriterias> <searchCriterias> <searchOption>DEVICE_NAME</searchOption> <searchTerms>Traverse Server</searchTerms> </searchCriterias> <endTimeExp>now</endTimeExp> <startTimeExp>1-hours-ago</startTimeExp> </testRawHistoricalRequest> </test:getRawHistoricalData> </soapenv:Body> </soapenv:Envelope>
and the same request using JSON format and the 'curl' command:
Note: replace }' http://traverse_server/api with your Traverse server URL
curl -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{ "username":"superuser", "password":"traverse", "startTimeExp":"1-hours-ago", "endTimeExp":"now", "searchCriterias": [ { "searchOption": "TEST_NAME", "searchTerms": "Packet Loss" }, { "searchOption": "DEVICE_NAME", "searchTerms": "Traverse Server" } ] }' http://traverse_server/api/json/test/getRawHistoricalData
APPLIES TO
All Traverse releases
REFERENCE
See Traverse Developers Guide (also ensure to review the most current versions)