# Returning a List of Nodes via an Attribute

**URL:** <https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405>\
**Category:** Elasticsearch\
**Created:** [March 14, 2019, 6:42pm UTC](https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405 "2019-03-14T18:42:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sometimes](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Sometimes](https://discuss.elastic.co/u/Sometimes)\
**Post date:** [March 14, 2019, 6:42pm UTC](https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405/1 "2019-03-14T18:42:23Z")

</div>

Howdy, everyone! I've spent a while searching through the API endpoint documentation, but I haven't really gotten anywhere, so figured I'd ask the experts.

Basically, I'm trying to programmatically get a list of all nodes configured in our hot cluster. I can parse this out of "/\_nodes/settings" since "attributes" contains "box\_type" but this is a bit clunky due to the sheer size of the JSON response. Seems like searching for nodes via an attribute presence or value is likely something someone else has wanted to do before, so thought I'd check here before I spend more time hacking together my own solution.

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![DavidTurner](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/davidturner/32/22453_2.png) [@DavidTurner](https://discuss.elastic.co/u/DavidTurner)\
**Post date:** [March 14, 2019, 7:29pm UTC](https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405/2 "2019-03-14T19:29:32Z")

</div>

I think the page you're looking for is this one:

[https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster.html)

You can describe nodes with the string `attribute:value`, e.g. `box_type:hot`, in various APIs. So for instance

```auto
GET /_nodes/box_type:hot/process

```

will get you a small amount of information about the hot nodes.

---

<div class="post-metadata">

**Author:** ![Sometimes](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Sometimes](https://discuss.elastic.co/u/Sometimes)\
**Post date:** [March 14, 2019, 7:45pm UTC](https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405/3 "2019-03-14T19:45:45Z")

</div>

That’s perfect! Thank you so much!

---

<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:** [April 11, 2019, 7:45pm UTC](https://discuss.elastic.co/t/returning-a-list-of-nodes-via-an-attribute/172405/4 "2019-04-11T19:45:49Z")

</div>

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