# Agent List

**URL:** <https://discuss.elastic.co/t/agent-list/318673>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [November 10, 2022, 4:45pm UTC](https://discuss.elastic.co/t/agent-list/318673 "2022-11-10T16:45:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![branden.heifner](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@branden.heifner](https://discuss.elastic.co/u/branden.heifner)\
**Post date:** [November 10, 2022, 4:45pm UTC](https://discuss.elastic.co/t/agent-list/318673/1 "2022-11-10T16:45:36Z")

</div>

Hello,

Is there an API or some other method to export a list of agents enrolled with the fleet server and their status (Healthy, Offline, etc.)? What I need to do is audit the agents currently enrolled with fleet with our list of computers joined to our domain.

Thank you!

---

<div class="post-metadata">

**Author:** ![Krishna\_Teja](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/krishna_teja/32/104976_2.png) [@Krishna\_Teja](https://discuss.elastic.co/u/Krishna_Teja)\
**Post date:** [November 10, 2022, 5:36pm UTC](https://discuss.elastic.co/t/agent-list/318673/2 "2022-11-10T17:36:57Z")

</div>

Hello Branden

You can try

```auto
curl --location --request GET 'https://{kibana_url}:{kibana_port}/api/endpoint/metadata' \
--header 'kbn-xsrf: metadata' \
--header 'Authorization: {Authorization}' \
--header 'Content-Type: application/json' \
--data-raw ''

```

---

<div class="post-metadata">

**Author:** ![Cristina\_Amico](https://avatars.discourse-cdn.com/v4/letter/c/9fc29f/32.png) [@Cristina\_Amico](https://discuss.elastic.co/u/Cristina_Amico)\
**Post date:** [November 14, 2022, 9:36am UTC](https://discuss.elastic.co/t/agent-list/318673/3 "2022-11-14T09:36:36Z")

</div>

Hello @branden.heifner,

If you are on 8.4.x you can get the list of all agents with the status with this command:

```auto
curl --location --request GET 'https://{kibana_url}:{kibana_port}/api/fleet/agents' \
--header 'kbn-xsrf: metadata' \
--header 'Authorization: {Authorization}' \
--header 'Content-Type: application/json' \
--data-raw ''

```

Or you can go to "Management \> Dev Tools" in Kibana and execute the following command:

```auto
GET kbn:/api/fleet/agents

```

They both query the same Fleet endpoint. Let me know if you need further information.

Cristina

---

<div class="post-metadata">

**Author:** ![branden.heifner](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@branden.heifner](https://discuss.elastic.co/u/branden.heifner)\
**Post date:** [November 14, 2022, 6:20pm UTC](https://discuss.elastic.co/t/agent-list/318673/4 "2022-11-14T18:20:56Z")

</div>

Thank you Cristina! I was able to get both of them to work.

---

<div class="post-metadata">

**Author:** ![branden.heifner](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@branden.heifner](https://discuss.elastic.co/u/branden.heifner)\
**Post date:** [November 14, 2022, 6:21pm UTC](https://discuss.elastic.co/t/agent-list/318673/5 "2022-11-14T18:21:40Z")

</div>

Thank you Krishna! I was able to get the query to work

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 12, 2022, 6:22pm UTC](https://discuss.elastic.co/t/agent-list/318673/6 "2022-12-12T18:22:25Z")

</div>

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