deprecation.asciidoc 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. [role="xpack"]
  2. [testenv="basic"]
  3. [[migration-api-deprecation]]
  4. === Deprecation Info APIs
  5. The deprecation API is to be used to retrieve information about different
  6. cluster, node, and index level settings that use deprecated features that will
  7. be removed or changed in the next major version.
  8. [float]
  9. ==== Request
  10. `GET /_migration/deprecations` +
  11. `GET /<index_name>/_migration/deprecations`
  12. //=== Description
  13. [float]
  14. ==== Path Parameters
  15. `index_name`::
  16. (string) Identifier for the index. It can be an index name or a wildcard
  17. expression. When you specify this parameter, only index-level deprecations for
  18. the specified indices are returned.
  19. //=== Query Parameters
  20. //=== Authorization
  21. [float]
  22. ==== Examples
  23. To see the list of offenders in your cluster, submit a GET request to the
  24. `_migration/deprecations` endpoint:
  25. [source,js]
  26. --------------------------------------------------
  27. GET /_migration/deprecations
  28. --------------------------------------------------
  29. // CONSOLE
  30. // TEST[skip:cannot assert tests have certain deprecations]
  31. Example response:
  32. ["source","js",subs="attributes,callouts,macros"]
  33. --------------------------------------------------
  34. {
  35. "cluster_settings" : [
  36. {
  37. "level" : "critical",
  38. "message" : "Cluster name cannot contain ':'",
  39. "url" : "{ref}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_cluster_name",
  40. "details" : "This cluster is named [mycompany:logging], which contains the illegal character ':'."
  41. }
  42. ],
  43. "node_settings" : [ ],
  44. "index_settings" : {
  45. "logs:apache" : [
  46. {
  47. "level" : "warning",
  48. "message" : "Index name cannot contain ':'",
  49. "url" : "{ref}/breaking-changes-7.0.html#_literal_literal_is_no_longer_allowed_in_index_name",
  50. "details" : "This index is named [logs:apache], which contains the illegal character ':'."
  51. }
  52. ]
  53. }
  54. }
  55. --------------------------------------------------
  56. // NOTCONSOLE
  57. The response breaks down all the specific forward-incompatible settings that you
  58. should resolve before upgrading your cluster. Any offending settings are
  59. represented as a deprecation warning.
  60. The following is an example deprecation warning:
  61. ["source","js",subs="attributes,callouts,macros"]
  62. --------------------------------------------------
  63. {
  64. "level" : "warning",
  65. "message" : "This is the generic descriptive message of the breaking change",
  66. "url" : "{ref-60}/breaking_60_indices_changes.html",
  67. "details" : "more information, like which nodes, indices, or settings are to blame"
  68. }
  69. --------------------------------------------------
  70. // NOTCONSOLE
  71. As is shown, there is a `level` property that describes the significance of the
  72. issue.
  73. |=======
  74. |warning | You can upgrade directly, but you are using deprecated functionality
  75. which will not be available or behave differently in the next major version.
  76. |critical | You cannot upgrade without fixing this problem.
  77. |=======
  78. The `message` property and the optional `details` property provide descriptive
  79. information about the deprecation warning. The `url` property provides a link to
  80. the Breaking Changes Documentation, where you can find more information about
  81. this change.
  82. Any cluster-level deprecation warnings can be found under the `cluster_settings`
  83. key. Similarly, any node-level warnings are found under `node_settings`. Since
  84. only a select subset of your nodes might incorporate these settings, it is
  85. important to read the `details` section for more information about which nodes
  86. are affected. Index warnings are sectioned off per index and can be filtered
  87. using an index-pattern in the query.
  88. The following example request shows only index-level deprecations of all
  89. `logstash-*` indices:
  90. [source,js]
  91. --------------------------------------------------
  92. GET /logstash-*/_migration/deprecations
  93. --------------------------------------------------
  94. // CONSOLE
  95. // TEST[skip:cannot assert tests have certain deprecations]