2013-05-24 06:02:42 -04:00
|
|
|
{
|
|
|
|
"index": {
|
2015-03-24 12:03:35 -04:00
|
|
|
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
|
2013-05-24 06:02:42 -04:00
|
|
|
"methods": ["POST", "PUT"],
|
|
|
|
"url": {
|
|
|
|
"path": "/{index}/{type}",
|
2013-06-04 07:27:25 -04:00
|
|
|
"paths": ["/{index}/{type}", "/{index}/{type}/{id}"],
|
2013-05-24 06:02:42 -04:00
|
|
|
"parts": {
|
2013-05-26 06:20:43 -04:00
|
|
|
"id": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "string",
|
|
|
|
"description" : "Document ID"
|
2013-05-26 06:20:43 -04:00
|
|
|
},
|
2013-05-24 06:02:42 -04:00
|
|
|
"index": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "string",
|
|
|
|
"required" : true,
|
|
|
|
"description" : "The name of the index"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
|
|
|
"type": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "string",
|
|
|
|
"required" : true,
|
|
|
|
"description" : "The type of the document"
|
2013-05-24 06:02:42 -04:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"params": {
|
2013-05-26 06:20:43 -04:00
|
|
|
"consistency": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "enum",
|
|
|
|
"options" : ["one", "quorum", "all"],
|
|
|
|
"description" : "Explicit write consistency setting for the operation"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"op_type": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "enum",
|
|
|
|
"options" : ["index", "create"],
|
|
|
|
"default" : "index",
|
|
|
|
"description" : "Explicit operation type"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
|
|
|
"parent": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "string",
|
|
|
|
"description" : "ID of the parent document"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"refresh": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "boolean",
|
|
|
|
"description" : "Refresh the index after performing the operation"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"routing": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "string",
|
|
|
|
"description" : "Specific routing value"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"timeout": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "time",
|
|
|
|
"description" : "Explicit operation timeout"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"timestamp": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "time",
|
|
|
|
"description" : "Explicit timestamp for the document"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"ttl": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "duration",
|
|
|
|
"description" : "Expiration time for the document"
|
|
|
|
},
|
|
|
|
"version" : {
|
|
|
|
"type" : "number",
|
|
|
|
"description" : "Explicit version number for concurrency control"
|
2013-05-24 06:02:42 -04:00
|
|
|
},
|
2013-05-26 06:20:43 -04:00
|
|
|
"version_type": {
|
2013-05-26 13:44:03 -04:00
|
|
|
"type" : "enum",
|
2014-01-31 08:38:21 -05:00
|
|
|
"options" : ["internal", "external", "external_gte", "force"],
|
2013-05-26 13:44:03 -04:00
|
|
|
"description" : "Specific version type"
|
2013-05-24 06:02:42 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2013-05-26 13:44:03 -04:00
|
|
|
"body": {
|
|
|
|
"description" : "The document",
|
|
|
|
"required" : true
|
|
|
|
}
|
2013-05-24 06:02:42 -04:00
|
|
|
}
|
|
|
|
}
|