# Field format color

**URL:** <https://discuss.elastic.co/t/field-format-color/302106>\
**Category:** Kibana\
**Created:** [April 11, 2022, 1:46pm UTC](https://discuss.elastic.co/t/field-format-color/302106 "2022-04-11T13:46:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 11, 2022, 1:46pm UTC](https://discuss.elastic.co/t/field-format-color/302106/1 "2022-04-11T13:46:20Z")

</div>

Hello  
Who can help me with index color format request  
I found this api /api/saved\_objects/index-pattern/xxxxx/fields  
but i got problem with data for it request, I can't find how to do it (format and naming fields)  
my data:

```nohighlight
        "fields": {
            "log": {
                "format": "color",
                'pattern'
            }
        }
    })

```

Need like on screenshot

 ![Выделение_104](https://us1.discourse-cdn.com/elastic/original/3X/b/d/bdcc7c2d00c6d942de444d4688b66688b964a25b.png)

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [April 11, 2022, 8:44pm UTC](https://discuss.elastic.co/t/field-format-color/302106/2 "2022-04-11T20:44:10Z")

</div>

Hello @Plachey - Which version of the elastic stack are you running?

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 12, 2022, 3:55am UTC](https://discuss.elastic.co/t/field-format-color/302106/4 "2022-04-12T03:55:29Z")

</div>

Hello. I used docker image Elasticsearch 7.10.2. kibana 7.10.1

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [April 12, 2022, 4:15am UTC](https://discuss.elastic.co/t/field-format-color/302106/5 "2022-04-12T04:15:54Z")

</div>

The formatter settings vary in how they're saved. The best way to learn how they work is to use the UI to create the desired effect and then export the relevant index pattern saved object.

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 12, 2022, 4:31am UTC](https://discuss.elastic.co/t/field-format-color/302106/6 "2022-04-12T04:31:48Z")

</div>

Yes, I did it in ui, in screenshot and it work for me. Buti can't do the same using API request. If export help me, could you please send me example

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [April 12, 2022, 1:31pm UTC](https://discuss.elastic.co/t/field-format-color/302106/7 "2022-04-12T13:31:05Z")

</div>

Have you looked at **Stack Management \> Saved Objects**? [Saved Objects | Kibana Guide [8.1] | Elastic](https://www.elastic.co/guide/en/kibana/current/managing-saved-objects.html)

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 12, 2022, 4:40pm UTC](https://discuss.elastic.co/t/field-format-color/302106/8 "2022-04-12T16:40:17Z")

</div>

Yes i found it

```auto
"fieldFormatMap": {
                "log": {
                    "id": "color",
                    "params":
                        {
                            "parsedUrl":
                            {
                                "origin":"http://localhost:5601",
                                "pathname":"/app/management/kibana/indexPatterns",
                                "basePath":""
                            },
                            "fieldType": "string",
                            "colors":
                                [{"range": "-Infinity:Infinity",
                                  "regex": ".+(sERRORs).+",
                                  "text": "#FF0000",
                                  "background": "#ffffff"
                                  },
                                 {"range": "-Infinity:Infinity",
                                  "regex": ".+(sWARNINGs).+",
                                  "text": "#E3C330",
                                  "background": "#ffffff"}
                                 ]}
                }
            }
        }

```

but it don't work with api  
..../api/saved\_objects/index-pattern/my\_ndex-pattern'

I can't even change title

 ![Выделение_105](https://us1.discourse-cdn.com/elastic/original/3X/f/d/fd465908678d66769b9c089974f0ec19489f459a.png)

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [April 12, 2022, 6:52pm UTC](https://discuss.elastic.co/t/field-format-color/302106/9 "2022-04-12T18:52:23Z")

</div>

Here are the docs for that api - [Update object API | Kibana Guide [7.10] | Elastic](https://www.elastic.co/guide/en/kibana/7.10/saved-objects-api-update.html)

The error is stating that it doesn't see an 'attributes' property

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 12, 2022, 7:19pm UTC](https://discuss.elastic.co/t/field-format-color/302106/10 "2022-04-12T19:19:38Z")

</div>

So to update `fieldFormatMap` I need update kibana to 8 version?

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [April 12, 2022, 8:08pm UTC](https://discuss.elastic.co/t/field-format-color/302106/11 "2022-04-12T20:08:42Z")

</div>

No, you need to change the payload of the request

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 13, 2022, 8:24am UTC](https://discuss.elastic.co/t/field-format-color/302106/12 "2022-04-13T08:24:03Z")

</div>

i try it but after that i opened my created idex-patter and see blank white page

---

<div class="post-metadata">

**Author:** ![Plachey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/plachey/32/104237_2.png) [@Plachey](https://discuss.elastic.co/u/Plachey)\
**Post date:** [April 13, 2022, 3:58pm UTC](https://discuss.elastic.co/t/field-format-color/302106/13 "2022-04-13T15:58:39Z")

</div>

Thank you very much. I did it

---

<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 11, 2022, 3:58pm UTC](https://discuss.elastic.co/t/field-format-color/302106/14 "2022-05-11T15:58:41Z")

</div>

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