Question about API Filtering

Might be a stupid question with the Sensu Go API filtering stuff…
I’m trying to do a request to get only keepalive events. So I try something like this:

curl -H "Authorization: Bearer $SENSU_ACCESS_TOKEN" -G --data-urlencode ' == "keepalive"'

But I do not get any result…Still when I’m not using any filter, I can see I have keepalive events:

curl -H "Authorization: Bearer $SENSU_ACCESS_TOKEN" -| jq .[]"keepalive"

Can anyone spot what did I do wrong with the fieldSelector?

Since you are hitting the /events API endpoint, you need to use the event field selector

List of field selectors

1 Like