DEV Community

Mallikarjun H T
Mallikarjun H T

Posted on

ES - Node APIs

# If no filters are given, the default is to select all nodes
curl -X GET "localhost:9200/_nodes?pretty"
# Explicitly select all nodes
curl -X GET "localhost:9200/_nodes/_all?pretty"
# Select just the local node
curl -X GET "localhost:9200/_nodes/_local?pretty"
# Select the elected master node
curl -X GET "localhost:9200/_nodes/_master?pretty"
# Select nodes by name, which can include wildcards
curl -X GET "localhost:9200/_nodes/node_name_goes_here?pretty"
curl -X GET "localhost:9200/_nodes/node_name_goes_*?pretty"
# Select nodes by address, which can include wildcards
curl -X GET "localhost:9200/_nodes/10.0.0.3,10.0.0.4?pretty"
curl -X GET "localhost:9200/_nodes/10.0.0.*?pretty"
# Select nodes by role
curl -X GET "localhost:9200/_nodes/_all,master:false?pretty"
curl -X GET "localhost:9200/_nodes/data:true,ingest:true?pretty"
curl -X GET "localhost:9200/_nodes/coordinating_only:true?pretty"
# Select nodes by custom attribute (e.g. with something like `node.attr.rack: 2` in the configuration file)
curl -X GET "localhost:9200/_nodes/rack:2?pretty"
curl -X GET "localhost:9200/_nodes/ra*:2?pretty"
curl -X GET "localhost:9200/_nodes/ra*:2*?pretty"
Enter fullscreen mode Exit fullscreen mode

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay