# API Events Request

**URL:** <https://community.graylog.org/t/api-events-request/33183>\
**Category:** Graylog Central (peer support)\
**Created:** [August 2, 2024, 12:27pm UTC](https://community.graylog.org/t/api-events-request/33183 "2024-08-02T12:27:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hebval](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/hebval/32/12473_2.png) [@hebval](https://community.graylog.org/u/hebval)\
**Post date:** [August 2, 2024, 12:27pm UTC](https://community.graylog.org/t/api-events-request/33183/1 "2024-08-02T12:27:49Z")

</div>

Hey everyone, this isn’t an issue, just asking for assistance to learn API basics… I’m trying to retrieve the events from my Graylog Server with the following command :

curl -u \<api\_token\> -H ‘X-Requested-By: cli’ -H ‘Accept: application/json’ -X POST ‘[http://127.0.0.1:9000/api/events/search?pretty=true](http://127.0.0.1:9000/api/events/search?pretty=true)’

Where my api\_token is a token I generated with my superadmin account, who created the alerts and can see the events.

Now is my problem, I don’t understand how to use the model to filter what I want to get. Ideally, I’d like to retrieve the events from the last 10 minutes, with the event message and the source.

Can someone please give me an example ? I think I just need to see what it looks like first, then I’ll be able to adapt myself after.

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [August 16, 2024, 12:28pm UTC](https://community.graylog.org/t/api-events-request/33183/2 "2024-08-16T12:28:23Z")

</div>

Closed on August 16, 2024, 12:28pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
