# Node Stats API in 7.15 broken?

**URL:** <https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212>\
**Category:** Elasticsearch\
**Created:** [September 27, 2021, 9:31am UTC](https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212 "2021-09-27T09:31:31Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![oliver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oliver/32/44851_2.png) [@oliver](https://discuss.elastic.co/u/oliver)\
**Post date:** [September 27, 2021, 9:31am UTC](https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212/1 "2021-09-27T09:31:31Z")

</div>

Hello!

In [#75433](https://github.com/elastic/elasticsearch/pull/75433) you added a shard count structure to the Node Stats API. That results in a new JSON key named `shards`. However, if you run the Node Stats API with `level=shards`, you already have a JSON key named `shards`.

```auto
$ curl -H 'Content-Type: application/json' -XGET 'http://localhost:9200/_nodes/stats?level=shards&human=true&pretty=true'

```

yields

```json
...
      "indices" : {
        "docs" : {
          "count" : 48,
          "deleted" : 0
        },
        "shards" : { // <--
          "total_count" : 2
        },
...
        "shards" : { // <--
          ".tasks" : [
            {
              "0" : {
                "routing" : {
                  "state" : "STARTED",
                  "primary" : true,
                  "node" : "f8Z10TwPSKqTNsnnJiFRtg",
                  "relocating_node" : null
                },
                "docs" : {
                  "count" : 5,
                  "deleted" : 0
                },
          "memory_size_in_bytes" : 0,
          "evictions" : 0
        },
...

```

Best,  
Oliver

---

<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:** [September 27, 2021, 10:11am UTC](https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212/2 "2021-09-27T10:11:26Z")

</div>

Seems like a bug, would you report it on Github rather than here?

---

<div class="post-metadata">

**Author:** ![oliver](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oliver/32/44851_2.png) [@oliver](https://discuss.elastic.co/u/oliver)\
**Post date:** [September 27, 2021, 10:12am UTC](https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212/3 "2021-09-27T10:12:22Z")

</div>

Sure. Will do.

---

<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:** [October 25, 2021, 10:13am UTC](https://discuss.elastic.co/t/node-stats-api-in-7-15-broken/285212/4 "2021-10-25T10:13:12Z")

</div>

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