Skip to content

Commit 61c34bb

Browse files
authored
Introduce stability description to the REST API specification (#38413)
* introduce state to the REST API specification * change state over to stability * CCR is no GA updated to stable * SQL is now GA so marked as stable * Introduce `internal` as state for API's, marks stable in terms of lifetime but unstable in terms of guarantees on its output format since it exposes internal representations * make setting a wrong stability value, or not setting it at all an error that causes the YAML test suite to fail * update spec files to be explicit about their stability state * Document the fact that stability needs to be defined Otherwise the YAML test runner will fail (with a nice exception message) * address check style violations * update rest spec unit tests to include stability * found one more test spec file not declaring stability, made sure stability appears after documentation everywhere * cluster.state is stable, mark response in some way to denote its a key value format that can be changed during minors * mark data frame API's as beta * remove internal and private as states for an API * removed the wrong enum values in the Stability Enum in the previous commit
1 parent ef8f90c commit 61c34bb

File tree

266 files changed

+326
-8
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

266 files changed

+326
-8
lines changed

modules/lang-painless/src/test/resources/rest-api-spec/api/scripts_painless_context.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"scripts_painless_context": {
3+
"stability": "experimental",
34
"methods": ["GET"],
45
"url": {
56
"paths": ["/_scripts/painless/_context"],

plugins/examples/rest-handler/src/test/resources/rest-api-spec/api/cat.example.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.example": {
33
"documentation": "",
4+
"stability" : "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/example"],

rest-api-spec/README.markdown

Lines changed: 21 additions & 0 deletions

rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"bulk": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-bulk.html",
4+
"stability": "stable",
45
"methods": ["POST", "PUT"],
56
"url": {
67
"paths": ["/_bulk", "/{index}/_bulk", "/{index}/{type}/_bulk"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.aliases": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-alias.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/aliases", "/_cat/aliases/{name}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.allocation": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-allocation.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/allocation", "/_cat/allocation/{node_id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.count": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-count.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/count", "/_cat/count/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.fielddata": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-fielddata.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/fielddata", "/_cat/fielddata/{fields}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.health": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-health.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/health"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.help.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.help": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.indices.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.indices": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-indices.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/indices", "/_cat/indices/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.master": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-master.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/master"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.nodeattrs": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodeattrs.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/nodeattrs"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodes.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.nodes": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-nodes.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/nodes"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.pending_tasks": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-pending-tasks.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/pending_tasks"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.plugins": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-plugins.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/plugins"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.recovery.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.recovery": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-recovery.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/recovery", "/_cat/recovery/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.repositories": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-repositories.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/repositories"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.segments": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-segments.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/segments", "/_cat/segments/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.shards.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.shards": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-shards.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/shards", "/_cat/shards/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.snapshots": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-snapshots.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": [

rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.tasks": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/tasks.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/tasks"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.templates": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-templates.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/templates", "/_cat/templates/{name}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cat.thread_pool": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cat-thread-pool.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cat/thread_pool","/_cat/thread_pool/{thread_pool_patterns}"],

rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"clear_scroll": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-request-scroll.html",
4+
"stability": "stable",
45
"methods": ["DELETE"],
56
"url": {
67
"paths": [ "/_search/scroll"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.allocation_explain.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.allocation_explain": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-allocation-explain.html",
4+
"stability": "stable",
45
"methods": ["GET", "POST"],
56
"url": {
67
"paths": ["/_cluster/allocation/explain"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.get_settings": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cluster/settings"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.health.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.health": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-health.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cluster/health", "/_cluster/health/{index}"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.pending_tasks.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.pending_tasks": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-pending.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cluster/pending_tasks"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.put_settings": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-update-settings.html",
4+
"stability": "stable",
45
"methods": ["PUT"],
56
"url": {
67
"paths": ["/_cluster/settings"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.remote_info.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.remote_info": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_remote/info"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.reroute": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-reroute.html",
4+
"stability": "stable",
45
"methods": ["POST"],
56
"url": {
67
"paths": ["/_cluster/reroute"],

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.state": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-state.html",
4+
"stability" : "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": [
@@ -56,6 +57,9 @@
5657
}
5758
}
5859
},
59-
"body": null
60+
"body": null,
61+
"response": {
62+
"treat_json_as_key_value" : true
63+
}
6064
}
6165
}

rest-api-spec/src/main/resources/rest-api-spec/api/cluster.stats.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"cluster.stats": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-stats.html",
4+
"stability": "stable",
45
"methods": ["GET"],
56
"url": {
67
"paths": ["/_cluster/stats", "/_cluster/stats/nodes/{node_id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/count.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"count": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html",
4+
"stability": "stable",
45
"methods": ["POST", "GET"],
56
"url": {
67
"paths": ["/_count", "/{index}/_count"],

rest-api-spec/src/main/resources/rest-api-spec/api/create.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"create": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html",
4+
"stability": "stable",
45
"methods": ["PUT","POST"],
56
"url": {
67
"paths": ["/{index}/_create/{id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/delete.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"delete": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete.html",
4+
"stability": "stable",
45
"methods": ["DELETE"],
56
"url": {
67
"paths": ["/{index}/_doc/{id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"delete_by_query": {
33
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-delete-by-query.html",
4+
"stability": "stable",
45
"methods": ["POST"],
56
"url": {
67
"paths": ["/{index}/_delete_by_query"],

rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query_rethrottle.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"delete_by_query_rethrottle": {
33
"documentation": "https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html",
4+
"stability": "stable",
45
"methods": ["POST"],
56
"url": {
67
"paths": ["/_delete_by_query/{task_id}/_rethrottle"],

rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"delete_script": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html",
4+
"stability": "stable",
45
"methods": ["DELETE"],
56
"url": {
67
"paths": [ "/_scripts/{id}" ],

rest-api-spec/src/main/resources/rest-api-spec/api/exists.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"exists": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
4+
"stability": "stable",
45
"methods": ["HEAD"],
56
"url": {
67
"paths": ["/{index}/_doc/{id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"exists_source": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html",
4+
"stability": "stable",
45
"methods": ["HEAD"],
56
"url": {
67
"paths": ["/{index}/_source/{id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/explain.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"explain": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-explain.html",
4+
"stability": "stable",
45
"methods": ["GET", "POST"],
56
"url": {
67
"paths": ["/{index}/_explain/{id}"],

rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"field_caps": {
33
"documentation": "http://www.elastic.co/guide/en/elasticsearch/reference/master/search-field-caps.html",
4+
"stability": "stable",
45
"methods": ["GET", "POST"],
56
"url": {
67
"paths": [

0 commit comments

Comments
 (0)