Correct usage of 'starttime' to query objects/statehistory?
Posted: Thu May 06, 2021 3:27 pm
Hi all,
Trying to look at the API in order to have a better idea of how ServiceNow's Event Management module is collecting data from Nagios.
In querying the objects/statehistory endpoint, what is the correct use of 'starttime'?
I have an example based on what arguments ServiceNow uses, and I am adding in pretty=1 so I can read the output when I try to query the API:
By setting my start time to 1620331491, I am under the belief that I would expect results from Thu May 06 2021 20:04:51 GMT and newer. However, I am confused because I am seeing results that go further back than expected, here's the oldest result from the request above:
Just looking for clarification, or if something with our Nagios installation is not correct.
Thank you in advance!
Trying to look at the API in order to have a better idea of how ServiceNow's Event Management module is collecting data from Nagios.
In querying the objects/statehistory endpoint, what is the correct use of 'starttime'?
I have an example based on what arguments ServiceNow uses, and I am adding in pretty=1 so I can read the output when I try to query the API:
Code: Select all
https://nagiosxi.domain.com/nagiosxi/api/v1/objects/statehistory?starttime=1620331491&orderby=state_time:d&pretty=1&records=3000&apikey=MyAPIKeyHereCode: Select all
"state_time": "2021-05-06 15:06:36"Thank you in advance!