# Exam Put vs POST

**URL:** <https://discuss.elastic.co/t/exam-put-vs-post/344954>\
**Category:** Kibana\
**Created:** [October 13, 2023, 12:50am UTC](https://discuss.elastic.co/t/exam-put-vs-post/344954 "2023-10-13T00:50:52Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Priscilla\_Parodi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/priscilla_parodi/32/43047_2.png) [@Priscilla\_Parodi](https://discuss.elastic.co/u/Priscilla_Parodi)\
**Post date:** [October 16, 2023, 10:24pm UTC](https://discuss.elastic.co/t/exam-put-vs-post/344954/2 "2023-10-16T22:24:05Z")

</div>

Hello @Matt_Clairmont,

This is a great answer to your question:

> [@When to use PUT versus POST?](https://discuss.elastic.co/t/when-to-use-put-versus-post/68550/2):
>
> It's all about REST semantics. POST basically that you are posting a request which is going to modify the server state. POST index/type { "foo": "bar" } will generate an \_id server side and will index the document with this \_id. PUT is used to send a resource to the server. PUT index/type/id { "foo": "bar" } will put or update a document named index/type/id in the server. Makes sense? More details here: [https://en.wikipedia.org/wiki/Representational\_state\_transfer](https://en.wikipedia.org/wiki/Representational_state_transfer)

- POST: auto-generation of ids
- PUT: specify an id

---

_[View the full topic](https://discuss.elastic.co/t/exam-put-vs-post/344954)._
