From da4ec58dc30eb2150a962f663162d2d14d624ce4 Mon Sep 17 00:00:00 2001 From: Karel Minarik Date: Sun, 26 May 2013 18:53:39 +0200 Subject: [PATCH] Added the API definition for getting a document The `_mget` API was extracted to a separate file --- rest-api-spec/api/get.json | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/rest-api-spec/api/get.json b/rest-api-spec/api/get.json index 5edf55308f0..a428a7dbd04 100644 --- a/rest-api-spec/api/get.json +++ b/rest-api-spec/api/get.json @@ -4,31 +4,48 @@ "methods": ["GET", "HEAD", "POST"], "url": { "path": "/{index}/{type}/{id}", - "paths": ["/{index}/{type}/{id}", "/{index}/{type}/{id}/_source", "/_mget", "/{index}/_mget", "/{index}/{type}/_mget"], + "paths": ["/{index}/{type}/{id}", "/{index}/{type}/{id}/_source"], "parts": { "id": { + "type" : "string", + "required" : true, + "description" : "The document ID" }, "index": { + "type" : "string", + "required" : true, + "description" : "The name of the index" }, "type": { + "type" : "string", + "required" : true, + "description" : "The type of the document (use `_all` to fetch the first document matching the ID across all types)" } }, "params": { "fields": { - }, - "id": { + "type": "list", + "description" : "A comma-separated list of fields to return in the response" }, "parent": { + "type" : "string", + "description" : "The ID of the parent document" }, "preference": { + "type" : "string", + "description" : "Specify the shards the operation should be performed on (default: random shard)" }, "realtime": { + "type" : "boolean", + "description" : "Specify whether to perform the operation in realtime or search mode" }, "refresh": { + "type" : "boolean", + "description" : "Refresh the shard containing the document before performing the operation" }, "routing": { - }, - "type": { + "type" : "string", + "description" : "Specific routing value" } } },