# Create filed with type and format by api

**URL:** <https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853>\
**Category:** Kibana\
**Created:** [January 24, 2023, 3:18pm UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853 "2023-01-24T15:18:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ased13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ased13/32/116338_2.png) [@Ased13](https://discuss.elastic.co/u/Ased13)\
**Post date:** [January 24, 2023, 3:18pm UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853/1 "2023-01-24T15:18:19Z")

</div>

hi  
can create a field with the following request?

```auto
{"mappings":
    {"properties":
        {"address": 
            {"type":"text","format":"url"}
}
}
}

```

If not,How can it be created by request with specifying the format?  
It can be created manually in Kibana But I want it to be created by request

below request:

```auto
PUT index_name { "mappings": { "properties": { "address": { "type": "text", "format": "url" } } } }

```

answer given in Dev tools:

```auto
{ "error" : { "root_cause" : [{ "type" : "mapper_parsing_exception", "reason" : "unknown parameter [format] on mapper [address] of type [text]" } ], "type" : "mapper_parsing_exception", "reason" : "Failed to parse mapping [_doc]: unknown parameter [format] on mapper [address] of type [text]", "caused_by" : { "type" : "mapper_parsing_exception", "reason" : "unknown parameter [format] on mapper [address] of type [text]" } }, "status" : 400 }

```

Thank you for your kind look 🙂

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 24, 2023, 3:33pm UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853/2 "2023-01-24T15:33:49Z")

</div>

I think that you are referring to the Kibana interface where you can define some UI properties on an existing field in Elasticsearch.

The `PUT index_name` command creates the index in Elasticsearch but not anything related in Kibana.

To do what you want, you probably need to call the Kibana REST API.  
Which you can not do from the Kibana Dev Console as it's running against Elasticsearch only.

May be look at this: [Create data view API | Kibana Guide [8.6] | Elastic](https://www.elastic.co/guide/en/kibana/current/data-views-api-create.html)

---

<div class="post-metadata">

**Author:** ![Ased13](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ased13/32/116338_2.png) [@Ased13](https://discuss.elastic.co/u/Ased13)\
**Post date:** [January 25, 2023, 8:06am UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853/3 "2023-01-25T08:06:03Z")

</div>

![Screenshot from 2023-01-25 11-30-47](https://us1.discourse-cdn.com/elastic/original/3X/c/7/c72aba8b376f3a201c2740ed0b9167b47de90522.png)  
I think I should ask my question more simply!  
How to do the above settings with API?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [January 25, 2023, 8:56am UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853/4 "2023-01-25T08:56:11Z")

</div>

That's basically what I said with:

> [@dadoonet](#):
>
> May be look at this: [Create data view API | Kibana Guide [8.6] | Elastic](https://www.elastic.co/guide/en/kibana/current/data-views-api-create.html)

I'm moving your question to #Kibana

---

<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:** [February 22, 2023, 8:56am UTC](https://discuss.elastic.co/t/create-filed-with-type-and-format-by-api/323853/5 "2023-02-22T08:56:55Z")

</div>

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