# Question about API Filtering

**URL:** <https://discourse.sensu.io/t/question-about-api-filtering/1843>\
**Category:** Sensu Go\
**Created:** [June 2, 2020, 8:53pm UTC](https://discourse.sensu.io/t/question-about-api-filtering/1843 "2020-06-02T20:53:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luc\_Dandoy](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/luc_dandoy/32/150_2.png) [@Luc\_Dandoy](https://discourse.sensu.io/u/Luc_Dandoy)\
**Post date:** [June 2, 2020, 8:53pm UTC](https://discourse.sensu.io/t/question-about-api-filtering/1843/1 "2020-06-02T20:53:49Z")

</div>

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:

```bash
curl -H "Authorization: Bearer $SENSU_ACCESS_TOKEN" http://192.168.1.34:8080/api/core/v2/namespaces/default/events -G --data-urlencode 'fieldSelector=check.name == "keepalive"'
[]

```

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

```bash
curl -H "Authorization: Bearer $SENSU_ACCESS_TOKEN" http://192.168.1.34:8080/api/core/v2/namespaces/default/events -| jq .[].check.metadata.name"keepalive"
"linux-load-utilisation"
"keepalive"
"linux-load-utilisation"

```

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

---

<div class="post-metadata">

**Author:** ![todd](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.sensu.io/todd/32/936_2.png) [@todd](https://discourse.sensu.io/u/todd)\
**Post date:** [June 2, 2020, 8:55pm UTC](https://discourse.sensu.io/t/question-about-api-filtering/1843/2 "2020-06-02T20:55:11Z")

</div>

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

[List of field selectors](https://docs.sensu.io/sensu-go/latest/api/overview/#field-selector)
