verify-repo-api.asciidoc 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. [[verify-snapshot-repo-api]]
  2. === Verify snapshot repository API
  3. ++++
  4. <titleabbrev>Verify snapshot repository</titleabbrev>
  5. ++++
  6. Verifies that a snapshot repository is functional.
  7. ////
  8. [source,console]
  9. ----
  10. PUT /_snapshot/my_repository
  11. {
  12. "type": "fs",
  13. "settings": {
  14. "location": "my_backup_location"
  15. }
  16. }
  17. ----
  18. // TESTSETUP
  19. ////
  20. [source,console]
  21. ----
  22. POST /_snapshot/my_repository/_verify
  23. ----
  24. [[verify-snapshot-repo-api-request]]
  25. ==== {api-request-title}
  26. `POST /_snapshot/<repository>/_verify`
  27. [[verify-snapshot-repo-api-prereqs]]
  28. ==== {api-prereq-title}
  29. * If the {es} {security-features} are enabled, you must have the `manage`
  30. <<privileges-list-cluster,cluster privilege>> to use this API.
  31. [[verify-snapshot-repo-api-desc]]
  32. ==== {api-description-title}
  33. By default, <<put-snapshot-repo-api,put snapshot repository API>> requests
  34. verify that a snapshot is functional on all master and data nodes in the
  35. cluster.
  36. You can skip this verification using the put snapshot repository API's `verify`
  37. parameter. You can then use the verify snapshot repository API to manually
  38. verify the repository.
  39. If verification is successful, the verify snapshot repository API returns a list
  40. of nodes connected to the snapshot repository. If verification failed, the API
  41. returns an error.
  42. [[verify-snapshot-repo-api-path-params]]
  43. ==== {api-path-parms-title}
  44. `<repository>`::
  45. (Required, string)
  46. Name of the snapshot repository to verify.
  47. [[verify-snapshot-repo-api-query-params]]
  48. ==== {api-query-parms-title}
  49. `master_timeout`::
  50. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  51. a connection to the master node. If no response is received before the timeout
  52. expires, the request fails and returns an error. Defaults to `30s`.
  53. `timeout`::
  54. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  55. a response. If no response is received before the timeout expires, the request
  56. fails and returns an error. Defaults to `30s`.
  57. [role="child_attributes"]
  58. [[verify-snapshot-repo-api-response-body]]
  59. ==== {api-response-body-title}
  60. `nodes`::
  61. (object)
  62. +
  63. .Properties of `nodes` objects
  64. [%collapsible%open]
  65. ====
  66. `<node_id>`::
  67. (object)
  68. Contains information about a node connected to the snapshot repository.
  69. +
  70. The key is the ID of the node.
  71. +
  72. .Properties of `<node_id>`
  73. [%collapsible%open]
  74. =====
  75. `name`::
  76. (string)
  77. Human-readable name for the node.
  78. +
  79. You can set this name using the <<node-name,`node.name`>> property in
  80. `elasticsearch.yml`. Defaults to the machine's hostname.
  81. =====
  82. ====