QUESTION:
How to use Traverse test/getStatuses Web Service endpoint?
RESOLUTION:
The Traverse test/getStatuses Web Service endpoint provides the status and other details for the tests specified. It may also be used to provide a list of tests that meet certain criteria.
For example, to list all tests with no Action Profile simply search for tests with an action profile serial number of '-1' by submitting the following request to the Web Service endpoint;
curl -k -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d @c:\post.txt http://traverse_server/api/json/test/getStatuses
where the content of 'c:\post.txt' contains the request:
<br>{"username":"superuser","password":"secret",<br> "searchCriterias":[{"searchOption":"ACTION_PROFILE_SERIAL_NUMBER","searchTerms":"-1"}]<br>}<br><br>
The output should be similar to this:
<br> {<br> "suspended": false,<br> "testScheduleName": "Default Schedule",<br> "testScheduleSerialNumber": 440102,<br> "testInterval": 180,<br> "testType": "ping",<br> "departmentSerialNumber": 440093,<br> "departmentName": "Kaseya LLC",<br> "deviceSerialNumber": 890009,<br> "deviceName": "windows client 2",<br> "testSerialNumber": 890014,<br> "testName": "Packet Loss",<br> "testStatus": 134217728,<br> "testResult": 100,<br> "testResultStr": "100 %",<br> "units": "%",<br> "timestamp": 1490378320027,<br> "timestampStr": "10:58 AM",<br> "isStale": false,<br> "isNew": false,<br> "testDetailUrl": "/html5/TestDetails/launch.jsp?deviceSerialNumber=890009&testSerialNumber=890014&departmentName=Kaseya LLC",<br> "testUpdateUrl": "/common/updateTest.jsp?testId=890014&deviceId=890009&accountId=440093&accountName_=Kaseya+LLC&noNav",<br> "category": "network",<br> "duration": 41118085590,<br> "durationStr": "475 days 21:41",<br> "warningThreshold": "60",<br> "criticalThreshold": "100",<br> "thresholdType": "SEVERITY_ASCENDS",<br> "deviceDetailUrl": "/html5/DeviceDetails/launch.jsp?deviceSerialNumber=890009&departmentName=Kaseya LLC",<br> "deviceUpdateUrl": "/common/updateTargetDevice.jsp?deviceId=890009",<br> "suppressed": false,<br> "monitorInstance": "ping"<br> },<br><br>
In Traverse 9.4 and later, you may also limit the fields included in the output. For example, the request;
<br>{"username":"superuser","password":"secret",<br> "searchCriterias":[{"searchOption":"ACTION_PROFILE_SERIAL_NUMBER","searchTerms":"-1"}],<br> "fieldsRequested":["ACTION_PROFILE_NAME","DEPARTMENT_NAME","DEVICE_NAME"]<br>}
will show these fields for each test (note Test Name is also included);
<br> {<br> "departmentName": "ACME Inc",<br> "deviceName": "Traverse Server",<br> "testSerialNumber": 970006,<br> "testName": "Work Units Processed (WmiMonitor)"<br> }<br><br>
</code></p>
<p><strong>APPLIES TO:</strong></p>
<p><code>
All versions of Traverse
</code></p>
<p><code>