Create document #
Creates a new document.
Examples #
Insert a JSON document into the my-collection
collection:
POST /my-collection/_doc
{
"message": "GET /search HTTP/1.1 200 1070000",
"org": {
"id": "infini"
}
}
The API returns the following result:
{
"_id": "0,0",
"_version": 1,
"_namespace": "default",
"_collection": "my-collection",
"result": "created",
...
}
Request #
POST /<target>/_doc
Path parameters #
<target>
(Required, string) Name of the collection to target.
Request body #
<fields>
(Required, string) Request body contains the JSON source for the document data.