Browse Source

Add Accept & Content-Type headers to rest api spec (#53979)

Co-authored-by: Russ Cam <russ.cam@elastic.co>
Martijn Laarman 4 years ago
parent
commit
8d3def3e1f
100 changed files with 325 additions and 0 deletions
  1. 3 0
      modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/api/scripts_painless_context.json
  2. 3 0
      plugins/examples/rest-handler/src/yamlRestTest/resources/rest-api-spec/api/cat.example.json
  3. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json
  4. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.aliases.json
  5. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.allocation.json
  6. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.count.json
  7. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.fielddata.json
  8. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.health.json
  9. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.help.json
  10. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.indices.json
  11. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.master.json
  12. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodeattrs.json
  13. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.nodes.json
  14. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.pending_tasks.json
  15. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.plugins.json
  16. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.recovery.json
  17. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.repositories.json
  18. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.segments.json
  19. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.shards.json
  20. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.snapshots.json
  21. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.tasks.json
  22. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.templates.json
  23. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cat.thread_pool.json
  24. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json
  25. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.allocation_explain.json
  26. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.delete_component_template.json
  27. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.delete_voting_config_exclusions.json
  28. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.exists_component_template.json
  29. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_component_template.json
  30. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_settings.json
  31. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.health.json
  32. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.pending_tasks.json
  33. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.post_voting_config_exclusions.json
  34. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_component_template.json
  35. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_settings.json
  36. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.remote_info.json
  37. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.reroute.json
  38. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.state.json
  39. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/cluster.stats.json
  40. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/count.json
  41. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/create.json
  42. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete_dangling_index.json
  43. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import_dangling_index.json
  44. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list_dangling_indices.json
  45. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/delete.json
  46. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json
  47. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query_rethrottle.json
  48. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json
  49. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/exists.json
  50. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json
  51. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/explain.json
  52. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json
  53. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/get.json
  54. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json
  55. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/get_script_context.json
  56. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/get_script_languages.json
  57. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/get_source.json
  58. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/index.json
  59. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.add_block.json
  60. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.analyze.json
  61. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.clear_cache.json
  62. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.clone.json
  63. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.close.json
  64. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.create.json
  65. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete.json
  66. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_alias.json
  67. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_index_template.json
  68. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_template.json
  69. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists.json
  70. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_alias.json
  71. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_index_template.json
  72. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_template.json
  73. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_type.json
  74. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush.json
  75. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json
  76. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json
  77. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_alias.json
  78. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_field_mapping.json
  79. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_index_template.json
  80. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_mapping.json
  81. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_settings.json
  82. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_template.json
  83. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.open.json
  84. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_alias.json
  85. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_index_template.json
  86. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json
  87. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_settings.json
  88. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_template.json
  89. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.recovery.json
  90. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.refresh.json
  91. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.resolve_index.json
  92. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.rollover.json
  93. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.segments.json
  94. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.shard_stores.json
  95. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.shrink.json
  96. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.simulate_index_template.json
  97. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.simulate_template.json
  98. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.split.json
  99. 3 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json
  100. 4 0
      rest-api-spec/src/main/resources/rest-api-spec/api/indices.update_aliases.json

+ 3 - 0
modules/lang-painless/src/yamlRestTest/resources/rest-api-spec/api/scripts_painless_context.json

@@ -5,6 +5,9 @@
       "url": "https://www.elastic.co/guide/en/elasticsearch/painless/master/painless-contexts.html",
       "description": "Returns the painless contexts"
     },
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url": {
       "paths": [
         {

+ 3 - 0
plugins/examples/rest-handler/src/yamlRestTest/resources/rest-api-spec/api/cat.example.json

@@ -5,6 +5,9 @@
       "description": "Example"
     },
     "stability" : "stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url": {
       "paths": [
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/bulk.json

@@ -5,6 +5,10 @@
       "description":"Allows to perform multiple index/update/delete operations in a single request."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/x-ndjson"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Shows information about currently configured aliases to indices including filter and routing infos."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Provides quick access to the document count of the entire cluster, or individual indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Shows how much heap memory is currently being used by fielddata on every data node in the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns a concise representation of the cluster health."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns help for the Cat APIs."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain" ]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about indices: number of primaries and replicas, document counts, disk size, ..."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about the master node."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about custom node attributes."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns basic statistics about performance of cluster nodes."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns a concise representation of the cluster pending tasks."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about installed plugins across nodes node."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about index shard recoveries, both on-going completed."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about snapshot repositories registered in the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Provides low-level information about the segments in the shards of an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Provides a detailed view of shard allocation on nodes."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns all snapshots in a specific repository."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about the tasks currently executing on one or more nodes in the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns information about existing templates."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns cluster-wide thread pool statistics per node.\nBy default the active, queue and rejected statistics are returned for all thread pools."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "text/plain", "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/clear_scroll.json

@@ -5,6 +5,10 @@
       "description":"Explicitly clears the search context for a scroll."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json","text/plain"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,10 @@
       "description":"Provides explanations for shard allocations in the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.delete_component_template.json

@@ -5,6 +5,9 @@
       "description":"Deletes a component template"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.delete_voting_config_exclusions.json

@@ -5,6 +5,9 @@
       "description":"Clears cluster voting config exclusions."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.exists_component_template.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular component template exist"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.get_component_template.json

@@ -5,6 +5,9 @@
       "description":"Returns one or more component templates"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns cluster settings."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns basic information about the health of the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns a list of any cluster-level changes (e.g. create index, update mapping,\nallocate or fail shard) which have not yet been executed."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.post_voting_config_exclusions.json

@@ -5,6 +5,9 @@
       "description":"Updates the cluster voting config exclusions by node ids or node names."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/cluster.put_component_template.json

@@ -5,6 +5,10 @@
       "description":"Creates or updates a component template"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,10 @@
       "description":"Updates the cluster settings."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns the information about configured remote clusters."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,10 @@
       "description":"Allows to manually change the allocation of individual shards in the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns a comprehensive information about the state of the cluster."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

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

@@ -5,6 +5,9 @@
       "description":"Returns high-level overview of cluster statistics."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/count.json

@@ -5,6 +5,10 @@
       "description":"Returns number of documents matching a query."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/create.json

@@ -5,6 +5,10 @@
       "description":"Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.delete_dangling_index.json

@@ -5,6 +5,9 @@
       "description": "Deletes the specified dangling index"
     },
     "stability": "stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url": {
       "paths": [
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.import_dangling_index.json

@@ -5,6 +5,9 @@
       "description": "Imports the specified dangling index"
     },
     "stability": "stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url": {
       "paths": [
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/dangling_indices.list_dangling_indices.json

@@ -5,6 +5,9 @@
       "description": "Returns all dangling indices."
     },
     "stability": "stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url": {
       "paths": [
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/delete.json

@@ -5,6 +5,9 @@
       "description":"Removes a document from the index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query.json

@@ -5,6 +5,10 @@
       "description":"Deletes documents matching the provided query."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/delete_by_query_rethrottle.json

@@ -5,6 +5,9 @@
       "description":"Changes the number of requests per second for a particular Delete By Query operation."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/delete_script.json

@@ -5,6 +5,9 @@
       "description":"Deletes a script."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/exists.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a document exists in an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/exists_source.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a document source exists in an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/explain.json

@@ -5,6 +5,10 @@
       "description":"Returns information about why a specific matches (or doesn't match) a query."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/field_caps.json

@@ -5,6 +5,9 @@
       "description":"Returns the information about the capabilities of fields among multiple indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/get.json

@@ -5,6 +5,9 @@
       "description":"Returns a document."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/get_script.json

@@ -5,6 +5,9 @@
       "description":"Returns a script."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/get_script_context.json

@@ -5,6 +5,9 @@
       "description":"Returns all script contexts."
     },
     "stability":"experimental",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/get_script_languages.json

@@ -5,6 +5,9 @@
       "description":"Returns available script types, languages and contexts"
     },
     "stability":"experimental",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/get_source.json

@@ -5,6 +5,9 @@
       "description":"Returns the source of a document."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/index.json

@@ -5,6 +5,10 @@
       "description":"Creates or updates a document in an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.add_block.json

@@ -5,6 +5,9 @@
       "description":"Adds a block to an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.analyze.json

@@ -5,6 +5,10 @@
       "description":"Performs the analysis process on a text and return the tokens breakdown of the text."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.clear_cache.json

@@ -5,6 +5,9 @@
       "description":"Clears all or specific caches for one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.clone.json

@@ -5,6 +5,10 @@
       "description": "Clones an index"
     },
     "stability": "stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url": {
       "paths": [
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.close.json

@@ -5,6 +5,9 @@
       "description":"Closes an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.create.json

@@ -5,6 +5,10 @@
       "description":"Creates an index with optional settings and mappings."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete.json

@@ -5,6 +5,9 @@
       "description":"Deletes an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_alias.json

@@ -5,6 +5,9 @@
       "description":"Deletes an alias."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_index_template.json

@@ -5,6 +5,9 @@
       "description":"Deletes an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.delete_template.json

@@ -5,6 +5,9 @@
       "description":"Deletes an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular index exists."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_alias.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular alias exists."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_index_template.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular index template exists."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_template.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular index template exists."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.exists_type.json

@@ -5,6 +5,9 @@
       "description":"Returns information about whether a particular document type exists. (DEPRECATED)"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.flush.json

@@ -5,6 +5,9 @@
       "description":"Performs the flush operation on one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.forcemerge.json

@@ -5,6 +5,9 @@
       "description":"Performs the force merge operation on one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get.json

@@ -5,6 +5,9 @@
       "description":"Returns information about one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_alias.json

@@ -5,6 +5,9 @@
       "description":"Returns an alias."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_field_mapping.json

@@ -5,6 +5,9 @@
       "description":"Returns mapping for one or more fields."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_index_template.json

@@ -5,6 +5,9 @@
       "description":"Returns an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_mapping.json

@@ -5,6 +5,9 @@
       "description":"Returns mappings for one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_settings.json

@@ -5,6 +5,9 @@
       "description":"Returns settings for one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.get_template.json

@@ -5,6 +5,9 @@
       "description":"Returns an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.open.json

@@ -5,6 +5,9 @@
       "description":"Opens an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_alias.json

@@ -5,6 +5,10 @@
       "description":"Creates or updates an alias."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_index_template.json

@@ -5,6 +5,10 @@
       "description":"Creates or updates an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_mapping.json

@@ -5,6 +5,10 @@
       "description":"Updates the index mappings."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_settings.json

@@ -5,6 +5,10 @@
       "description":"Updates the index settings."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.put_template.json

@@ -5,6 +5,10 @@
       "description":"Creates or updates an index template."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.recovery.json

@@ -5,6 +5,9 @@
       "description":"Returns information about ongoing index shard recoveries."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.refresh.json

@@ -5,6 +5,9 @@
       "description":"Performs the refresh operation in one or more indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.resolve_index.json

@@ -5,6 +5,9 @@
       "description":"Returns information about any matching indices, aliases, and data streams"
     },
     "stability":"experimental",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.rollover.json

@@ -5,6 +5,10 @@
       "description":"Updates an alias to point to a new index when the existing index\nis considered to be too large or too old."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.segments.json

@@ -5,6 +5,9 @@
       "description":"Provides low-level information about segments in a Lucene index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.shard_stores.json

@@ -5,6 +5,9 @@
       "description":"Provides store information for shard copies of indices."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.shrink.json

@@ -5,6 +5,10 @@
       "description":"Allow to shrink an existing index into a new index with fewer primary shards."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.simulate_index_template.json

@@ -5,6 +5,10 @@
       "description": "Simulate matching the given index name against the index templates in the system"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.simulate_template.json

@@ -5,6 +5,10 @@
       "description": "Simulate resolving the given template name or body"
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.split.json

@@ -5,6 +5,10 @@
       "description":"Allows you to split an existing index into a new index with more primary shards."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

+ 3 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.stats.json

@@ -5,6 +5,9 @@
       "description":"Provides statistics on operations happening in an index."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"]
+    },
     "url":{
       "paths":[
         {

+ 4 - 0
rest-api-spec/src/main/resources/rest-api-spec/api/indices.update_aliases.json

@@ -5,6 +5,10 @@
       "description":"Updates index aliases."
     },
     "stability":"stable",
+    "headers":{
+      "accept": [ "application/json"],
+      "content_type": ["application/json"]
+    },
     "url":{
       "paths":[
         {

Some files were not shown because too many files changed in this diff