# Update index pattern fields via Kibana REST API fails

**URL:** <https://discuss.elastic.co/t/update-index-pattern-fields-via-kibana-rest-api-fails/303035>\
**Category:** Kibana\
**Created:** [April 22, 2022, 12:49pm UTC](https://discuss.elastic.co/t/update-index-pattern-fields-via-kibana-rest-api-fails/303035 "2022-04-22T12:49:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mpjjonker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mpjjonker/32/95796_2.png) [@mpjjonker](https://discuss.elastic.co/u/mpjjonker)\
**Post date:** [April 22, 2022, 12:49pm UTC](https://discuss.elastic.co/t/update-index-pattern-fields-via-kibana-rest-api-fails/303035/1 "2022-04-22T12:49:32Z")

</div>

Hi  
We are using Kibana version 7.17.  
When I follow the instructions here ([Update index pattern fields API | Kibana Guide [7.17] | Elastic](https://www.elastic.co/guide/en/kibana/7.17/index-patterns-fields-api-update.html)) to update fields via the REST API , I get the error

> [request.body.fields]: defintion for this key is missing

These are the request details:

```auto

curl --location --request POST '<KIBANA_HOST>/api/index_patterns/index_pattern/df51c920-a6a0-11ec-a5d1-87582857b04a#/fields/' \
--header 'Authorization: ApiKey xyz' \
--header 'kbn-xsrf: true' \
--header 'Content-Type: application/json' \
--data-raw '{
    "fields" : {
        "objectid": {
            "count": 100
        }
    }
}

```

Get requests on this endpoint do work , we get al the fields in the indexpattern.

---

<div class="post-metadata">

**Author:** ![mpjjonker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mpjjonker/32/95796_2.png) [@mpjjonker](https://discuss.elastic.co/u/mpjjonker)\
**Post date:** [April 26, 2022, 12:14pm UTC](https://discuss.elastic.co/t/update-index-pattern-fields-via-kibana-rest-api-fails/303035/2 "2022-04-26T12:14:30Z")

</div>

Tsss  
Somehow there is a # added after the index-pattern ID.  
When I remove this character, it works !

---

<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:** [May 24, 2022, 12:14pm UTC](https://discuss.elastic.co/t/update-index-pattern-fields-via-kibana-rest-api-fails/303035/3 "2022-05-24T12:14:59Z")

</div>

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