API Call for servicestatus filter on last_state_change
API Call for servicestatus filter on last_state_change
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?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API Call for servicestatus filter on last_state_change
Yes, you can append something like the following to the URL
this would show all services that have a last_state_change greater than 2020-10-01
Code: Select all
&last_state_change=gt:2020-10-01Re: API Call for servicestatus filter on last_state_change
I will test, but I'm assuming I can also specify a time to it? so 2020-10-30 09:55:00 ?
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: API Call for servicestatus filter on last_state_change
correctdh0125e wrote:I will test, but I'm assuming I can also specify a time to it? so 2020-10-30 09:55:00 ?