201 Commits

Author SHA1 Message Date
Clinton Gormley
500d6f7098 [SPEC] Added cat.json 2014-01-16 15:29:49 +01:00
Clinton Gormley
e613ecf9b4 [SPEC] Added the routing and timeout params to bulk 2014-01-16 15:29:49 +01:00
Clinton Gormley
c4713b1022 [SPEC] Added human flag to:
* cluster.node_info
* cluster.node_stats
* indices.segments
* indices.stats
* indices.status
2014-01-16 12:42:02 +01:00
Britta Weber
2f115b8103 update rest spec to be consistent with recent changes
see issue #4071
2014-01-15 00:56:52 +01:00
Alexander Reelsen
a3abcdc93a Consistent APIs: Get field mapping API includes 'mappings'
The get field mapping API now includes a mappings element after the index in its JSON

Added more consistent endpoint /{index}/_mapping/{type}/field/{fields}
and added endpoint /_mapping/{type}/field/{fields}
which are also used in tests

Added rest spec tests for wildcards and _all

Relates #4071

NOTE: This is not yet complete for 1.0. We need to return an empty JSON document instead
of a 404 if the field of an existing index and type is not found. However this is not
possible with the current data structure being returned. Needs to be finished for 1.0.
2014-01-14 22:42:27 +01:00
Alexander Reelsen
349a8be4fd Consistent REST API changes for GETting data
* Made GET mappings consistent, supporting
  * /{index}/_mappings/{type}
  * /{index}/_mapping/{type}
  * /_mapping/{type}
  * Added "mappings" in the JSON response to align it with other responses
* Made GET warmers consistent, support /{index}/_warmers/{type} and /_warmer, /_warner/{name}
  as well as wildcards and _all notation
* Made GET aliases consistent, support /{index}/_aliases/{name} and /_alias, /_aliases/{name}
  as well as wildcards and _all notation
* Made GET settings consistent, added /{index}/_setting/{name}, /_settings/{name}
  as well as supportings wildcards in settings name
* Returning empty JSON instead of a 404, if a specific warmer/
  setting/alias/type is missing
* Added a ton of spec tests for all of the above
* Added a couple of more integration tests for several features

Relates #4071
2014-01-14 22:33:52 +01:00
Britta Weber
411739fe3b Make PUT and DELETE consistent for _mapping, _alias and _warmer
See issue #4071

PUT options for _mapping:

Single type can now be added with

`[PUT|POST] {index|_all|*|regex|blank}/[_mapping|_mappings]/type`

and

`[PUT|POST] {index|_all|*|regex|blank}/type/[_mapping|_mappings]`

PUT options for _warmer:

PUT with a single warmer can now be done with

`[PUT|POST] {index|_all|*|prefix*|blank}/{type|_all|*|prefix*|blank}/[_warmer|_warmers]/warmer_name`

PUT options for _alias:

Single alias can now be PUT with

`[PUT|POST] {index|_all|*|prefix*|blank}/[_alias|_aliases]/alias`

DELETE options _mapping:

Several mappings can be deleted at once by defining several indices and types with

`[DELETE] /{index}/{type}`

`[DELETE] /{index}/{type}/_mapping`

`[DELETE] /{index}/_mapping/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_mapings` can be used.

DELETE options for  _warmer:

Several warmers can be deleted at once by defining several indices and names with

`[DELETE] /{index}/_warmer/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_warmers` can be used.

DELETE options for _alias:

Several aliases can be deleted at once by defining several indices and names with

`[DELETE] /{index}/_alias/{type}`

where

`index= * | _all | glob pattern | name1, name2, …`

`type= * | _all | glob pattern | name1, name2, …`

Alternatively, the keyword `_aliases` can be used.
2014-01-14 20:02:43 +01:00
Clinton Gormley
2c647b3a82 Revert "[SPEC] Added level param to cluster.state"
This reverts commit 06e5f3dd6ff3db5c30b67e1d4eb80ff759533f93.
2014-01-13 18:07:12 +01:00
Clinton Gormley
06e5f3dd6f [SPEC] Added level param to cluster.state 2014-01-13 18:05:38 +01:00
Clinton Gormley
7779196c8a [SPEC] Updated cluster.state spec 2014-01-13 18:02:15 +01:00
Clinton Gormley
b7cddea495 [SPEC] Added level param to cluster.node_stats and indices.stats 2014-01-13 17:40:27 +01:00
Simon Willnauer
f2f4b72a12 Add missing closing '}' to indices.stats.json 2014-01-13 17:19:13 +01:00
markharwood
2795f4e55d Standardized use of “*_length” for parameter names rather than “*_len”.
Java Builder apis drop old “len” methods in favour of new “length”
Rest APIs support both old “len: and new “length” forms using new ParseField class to a) provide compiler-checked consistency between Builder and Parser classes and
b) a common means of handling deprecated syntax in the DSL.
Documentation and rest specs only document the new “*length” forms
Closes #4083
2014-01-13 15:59:15 +00:00
Clinton Gormley
ed254b56e0 [SPEC] Updated cluster.node_stats and indices.stats 2014-01-13 16:54:51 +01:00
Spencer Alger
71d77d17e1 Updated the documentation urls in the rest api spec. 2014-01-09 14:44:14 -07:00
Martijn van Groningen
eb63bb259d Added action.destructive_requires_name that controls whether wildcard expressions and _all is allowed to be used for destructive operat Also the delete index api requires always an index to be specified (either concrete index, alias or wildcard expression)
Closes #4549 #4481
2014-01-09 11:36:50 +01:00
Britta Weber
216c814a7f remove default _all for type and index if these are missing in REST tests
If a type or path is missing in the REST test yaml file, it is
automatically replaced with _all. This makes it hard to test changes
in the api, for example adding the possibility to leave the index
blank in addition to _all and * in the uri.

closes #4657
2014-01-09 10:17:42 +01:00
Martijn van Groningen
0973b2863c Added extra rest endpoint for get settings api.
Added rest test to also test the get settings' prefix option.
2014-01-09 09:44:40 +01:00
Luca Cavanna
cb3b653a55 [SPEC] added nmissing comma in cluster.node_stats api spec 2014-01-08 21:24:23 +01:00
Honza Král
6e4586fd6b [SPEC] Clarify cluster.node_stats api 2014-01-08 21:03:06 +01:00
Honza Král
fe1344107c [SPEC] refactor cluster.node_info json spec to reflect clients' apis 2014-01-08 20:19:29 +01:00
Igor Motov
bec6527312 Add support for flat_settings flag to all REST APIs that output settings
Closes #4140
2014-01-08 10:36:36 -05:00
Martijn van Groningen
6dc434822c Changed get index settings api to use new internal get index settings api instead of relying on the cluster state api.
The new internal get index settings api is more efficient when it comes to sending the index settings from the master to the client via the
Also the get index settings support now all the indices options.

Closes #4620
2014-01-08 13:18:57 +01:00
Alexander Reelsen
ad50afbec8 Simplify usage of nodes info API
Important: This breaks backwards compatibility with 0.90

* Removed endpoints: /_cluster/nodes, /_cluster/nodes/nodeId1,nodeId2
* Disallow usage of parameters, but make required metrics part of URI
* Changed NodesInfoRequest to return everything by default
* Fixed NPE in NodesInfoResponse

Closes #4055
2014-01-08 09:46:04 +01:00
Simon Willnauer
3240cc8145 Clarify options for flush request 2014-01-06 17:44:56 +01:00
Honza Král
aacb51bae7 [SPEC] Bringing back the specs for _aliases 2014-01-06 17:25:15 +01:00
Martijn van Groningen
3024cc24a6 Added missing indices options to rest spec and rest actions. 2014-01-05 23:32:44 +01:00
Martijn van Groningen
aa548f5148 Remove GET _aliases api in favour for GET _alias api
Currently there are two get aliases apis that both have the same functionality, but have a different response structure. The reason for having 2 apis is historic.

The GET _alias api was added in 0.90.x and is more efficient since it only sends the needed alias data from the cluster state between the master node and the node that received the request. In the GET _aliases api the complete cluster state is send to the node that received the request and then the right information is filtered out and send back to the client.

The GET _aliases api should be removed in favour for the alias api

Closes to #4539
2014-01-02 13:56:11 +01:00
Martijn van Groningen
f4bf0d5112 Replaced ignore_indices with ignore_unavailable, expand_wildcards and allow_no_indices.
* `ignore_unavailable` - Controls whether to ignore if any specified indices are unavailable, this includes indices that don't exist or closed indices. Either `true` or `false` can be specified.
* `allow_no_indices` - Controls whether to fail if a wildcard indices expressions results into no concrete indices. Either `true` or `false` can be specified. For example if the wildcard expression `foo*` is specified and no indices are available that start with `foo` then depending on this setting the request will fail. This setting is also applicable when `_all`, `*` or no index has been specified.
* `expand_wildcards` - Controls to what kind of concrete indices wildcard indices expression expand to. If `open` is specified then the wildcard expression if expanded to only open indices and if `closed` is specified then the wildcard expression if expanded only to closed indices. Also both values (`open,closed`) can be specified to expand to all indices.

Closes to #4436
2014-01-02 12:19:45 +01:00
Martijn van Groningen
bb01995722 Made APIs consistently accept a query in the request body's query field.
The following APIs now accept the query in a top level `query` field like:
* delete_by_query
* validate_query
* count

These APIs used to accept the query directly in the request body which was inconsistent with the search and explain APIs. For this reason t

Closes #4074
2014-01-02 10:06:01 +01:00
Honza Král
2d29bb7a63 [API] bulk request now supports timeout, see #4220 2013-11-25 11:53:32 +01:00
Karel Minarik
afcc9d52ab [API] Changed fields parameter to required in "Get Field Mapping" API
Also reworded `include_defaults` description.
2013-11-05 11:17:59 +01:00
spenceralger
5ef83b6c9a Updated "version_type" to match delete.json 2013-10-30 17:26:32 -07:00
spenceralger
d85e264d03 Fixed method name, and the doc url 2013-10-30 14:16:55 -07:00
Boaz Leskes
ebdde4ea46 Added spec + tests for the GetFieldMapping API
Introduced in https://github.com/elasticsearch/elasticsearch/issues/3941
2013-10-30 19:19:35 +01:00
spenceralger
1cfe0f32c6 Added URL to indices.get_template to match previous change
Since the name is no longer required, added a supporting path to the paths array.
2013-10-23 21:14:02 -07:00
Boaz Leskes
87df522786 updated source filtering tests and spec
Fixed id tests to be strings.
Changed the _source_* param of get_source as they have changed in core.
2013-10-08 18:18:20 +02:00
Boaz Leskes
a04bce96c7 The name parameter of indices.get_template is not required. 2013-10-08 18:16:27 +02:00
Clinton Gormley
e791f463b1 [API] cluster.health wait_for_nodes is a string, not a number 2013-10-01 19:28:46 +02:00
spenceralger
a6c9150427 Reverse course
See comment [here](2dd7f4f652 (commitcomment-4189612))
2013-09-26 09:52:23 -07:00
spenceralger
e7465fee87 Added path to exist, supporting optional "type" part
Since the type is an optional part, there needs to be a path that can be used without it.
2013-09-25 20:03:28 -07:00
Honza Kral
559d284f41 [API] formatting issues 2013-09-25 14:08:18 +02:00
Clinton Gormley
a78781cdc6 [API] Added _source,_source_include,_source_exclude to
* explain
* get
* mget
* search
* get_source
2013-09-23 13:23:25 +02:00
Clinton Gormley
653ae20603 Added the clear_scroll spec 2013-09-20 22:21:26 +02:00
Clinton Gormley
e0adae6497 completion_fields and field_data fields not support in node stats yet.
See https://github.com/elasticsearch/elasticsearch/issues/3746
2013-09-20 14:15:08 +02:00
Clinton Gormley
36b489cbc2 Added completion stats to cluster.node_stats and indices.stats 2013-09-20 13:26:04 +02:00
Karel Minarik
6cfbd2f7c4 Removed the incorrect info about _all default for index in indices.get_mapping API 2013-09-09 23:36:45 +02:00
Karel Minarik
5b8df7eba6 Fixed incorrect default JSON spec for get_source API 2013-09-09 20:59:47 +02:00
Karel Minarik
6196efa553 Fixed a typo on the get API spec 2013-09-09 17:04:50 +02:00
Karel Minarik
746bdb12b3 Added the default _all value for document type in get_source API 2013-09-09 14:00:40 +02:00