verify-repo-api.asciidoc 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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-desc]]
  28. ==== {api-description-title}
  29. By default, <<put-snapshot-repo-api,put snapshot repository API>> requests
  30. verify that a snapshot is functional on all master and data nodes in the
  31. cluster.
  32. You can skip this verification using the put snapshot repository API's `verify`
  33. parameter. You can then use the verify snapshot repository API to manually
  34. verify the repository.
  35. If verification is successful, the verify snapshot repository API returns a list
  36. of nodes connected to the snapshot repository. If verification failed, the API
  37. returns an error.
  38. [[verify-snapshot-repo-api-path-params]]
  39. ==== {api-path-parms-title}
  40. `<repository>`::
  41. (Required, string)
  42. Name of the snapshot repository to verify.
  43. [[verify-snapshot-repo-api-query-params]]
  44. ==== {api-query-parms-title}
  45. `master_timeout`::
  46. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  47. a connection to the master node. If no response is received before the timeout
  48. expires, the request fails and returns an error. Defaults to `30s`.
  49. `timeout`::
  50. (Optional, <<time-units, time units>>) Specifies the period of time to wait for
  51. a response. If no response is received before the timeout expires, the request
  52. fails and returns an error. Defaults to `30s`.
  53. [role="child_attributes"]
  54. [[verify-snapshot-repo-api-response-body]]
  55. ==== {api-response-body-title}
  56. `nodes`::
  57. (object)
  58. +
  59. .Properties of `nodes` objects
  60. [%collapsible%open]
  61. ====
  62. `<node_id>`::
  63. (object)
  64. Contains information about a node connected to the snapshot repository.
  65. +
  66. The key is the ID of the node.
  67. +
  68. .Properties of `<node_id>`
  69. [%collapsible%open]
  70. =====
  71. `name`::
  72. (string)
  73. Human-readable name for the node.
  74. +
  75. You can set this name using the <<node-name,`node.name`>> property in
  76. `elasticsearch.yml`. Defaults to the machine's hostname.
  77. =====
  78. ====