Page 1 of 1

API Call for servicestatus filter on last_state_change

Posted: Fri Oct 30, 2020 8:52 am
by dh0125e
Is there any guidance on how to add a filter to the API call api/v1/objects/servicestatus for the last_state_change value to pull only services that have only had a state update since the datetime value provided?

Re: API Call for servicestatus filter on last_state_change

Posted: Fri Oct 30, 2020 9:20 am
by scottwilkerson
Yes, you can append something like the following to the URL

Code: Select all

&last_state_change=gt:2020-10-01
this would show all services that have a last_state_change greater than 2020-10-01

Re: API Call for servicestatus filter on last_state_change

Posted: Fri Oct 30, 2020 9:25 am
by dh0125e
I will test, but I'm assuming I can also specify a time to it? so 2020-10-30 09:55:00 ?

Re: API Call for servicestatus filter on last_state_change

Posted: Fri Oct 30, 2020 9:27 am
by scottwilkerson
dh0125e wrote:I will test, but I'm assuming I can also specify a time to it? so 2020-10-30 09:55:00 ?
correct