When using the statehistory API command /nagiosxi/api/v1/objects/statehistory it seems to go back 24 hours by default - is it possible to tell it to look further back?
There doesn't appear to be any additional arguments listed in the help...
API statehistory timeframe
Re: API statehistory timeframe
Hello @optionstechnology
Thanks for reaching out, there is an option to set 'starttime' by adjusting the date code to the date you want to start from.
Example:
Thanks,
Perry
Thanks for reaching out, there is an option to set 'starttime' by adjusting the date code to the date you want to start from.
Example:
The api example:starttime <timestamp> (Default: -24 hours) objects/statehistory?starttime=1644273476 - Displays the last week of data until now.
Code: Select all
curl -XGET "https://yourhostaddresshere/nagiosxi/api/v1/objects/statehistory?starttime=1644273476&apikey=yourapikeyhere&pretty=1"Perry