summaryrefslogtreecommitdiff
path: root/rest-api-spec/api/update.json
diff options
context:
space:
mode:
Diffstat (limited to 'rest-api-spec/api/update.json')
-rw-r--r--rest-api-spec/api/update.json91
1 files changed, 91 insertions, 0 deletions
diff --git a/rest-api-spec/api/update.json b/rest-api-spec/api/update.json
new file mode 100644
index 0000000..35a158f
--- /dev/null
+++ b/rest-api-spec/api/update.json
@@ -0,0 +1,91 @@
+{
+ "update": {
+ "documentation": "http://www.elasticsearch.org/guide/en/elasticsearch/reference/1.x/docs-update.html",
+ "methods": ["POST"],
+ "url": {
+ "path": "/{index}/{type}/{id}/_update",
+ "paths": ["/{index}/{type}/{id}/_update"],
+ "parts": {
+ "id": {
+ "type" : "string",
+ "required" : true,
+ "description" : "Document ID"
+ },
+ "index": {
+ "type" : "string",
+ "required" : true,
+ "description" : "The name of the index"
+ },
+ "type": {
+ "type" : "string",
+ "required" : true,
+ "description" : "The type of the document"
+ }
+ },
+ "params": {
+ "consistency": {
+ "type" : "enum",
+ "options" : ["one", "quorum", "all"],
+ "description" : "Explicit write consistency setting for the operation"
+ },
+ "fields": {
+ "type": "list",
+ "description" : "A comma-separated list of fields to return in the response"
+ },
+ "lang": {
+ "type" : "string",
+ "description" : "The script language (default: mvel)"
+ },
+ "parent": {
+ "type" : "string",
+ "description" : "ID of the parent document"
+ },
+ "refresh": {
+ "type" : "boolean",
+ "description" : "Refresh the index after performing the operation"
+ },
+ "replication": {
+ "type" : "enum",
+ "options" : ["sync","async"],
+ "default" : "sync",
+ "description" : "Specific replication type"
+ },
+ "retry_on_conflict": {
+ "type" : "number",
+ "description" : "Specify how many times should the operation be retried when a conflict occurs (default: 0)"
+ },
+ "routing": {
+ "type" : "string",
+ "description" : "Specific routing value"
+ },
+ "script": {
+ "description" : "The URL-encoded script definition (instead of using request body)"
+ },
+ "timeout": {
+ "type" : "time",
+ "description" : "Explicit operation timeout"
+ },
+ "timestamp": {
+ "type" : "time",
+ "description" : "Explicit timestamp for the document"
+ },
+ "ttl": {
+ "type" : "duration",
+ "description" : "Expiration time for the document"
+ },
+ "version" : {
+ "type" : "number",
+ "description" : "Explicit version number for concurrency control"
+ },
+ "version_type": {
+ "type" : "enum",
+ "options" : ["internal","external"],
+ "description" : "Specific version type"
+ }
+ }
+ },
+ "body": {
+ "description" : "The request definition using either `script` or partial `doc`"
+ }
+ }
+}