Field format color

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:

        "fields": {
            "log": {
                "format": "color",

Need like on screenshot

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

Hello. I used docker image Elasticsearch 7.10.2. kibana 7.10.1

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.

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

Have you looked at Stack Management > Saved Objects ? Saved Objects | Kibana Guide [8.1] | Elastic

Yes i found it

"fieldFormatMap": {
                "log": {
                    "id": "color",
                            "fieldType": "string",
                                [{"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

I can't even change title

Here are the docs for that api - Update object API | Kibana Guide [7.10] | Elastic

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

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

No, you need to change the payload of the request

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

Thank you very much. I did it

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