diff --git a/CHANGELOG.md b/CHANGELOG.md index 70a7f60bc4bf..279be379e052 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ FEATURES: narrowly scope the set of domains for which a CA can issue or sign child certificates. * **Plugin Backend Reload Endpoint**: Plugin backends can now be triggered to - reload using the `sys/plugins/backend/reload` endpoint and providing either + reload using the `sys/plugins/reload/backend` endpoint and providing either the plugin name or the mounts to reload. * **Self-Reloading Plugins**: The plugin system will now attempt to reload a crashed or stopped plugin, once per request. diff --git a/vault/logical_system.go b/vault/logical_system.go index e8e9331b7753..25a41f5097bd 100644 --- a/vault/logical_system.go +++ b/vault/logical_system.go @@ -830,7 +830,7 @@ func NewSystemBackend(core *Core) *SystemBackend { HelpDescription: strings.TrimSpace(sysHelp["plugin-catalog"][1]), }, &framework.Path{ - Pattern: "plugins/backend/reload$", + Pattern: "plugins/reload/backend$", Fields: map[string]*framework.FieldSchema{ "plugin": &framework.FieldSchema{ diff --git a/vault/logical_system_integ_test.go b/vault/logical_system_integ_test.go index 8ddd8eb75c99..bc1e0547ebf5 100644 --- a/vault/logical_system_integ_test.go +++ b/vault/logical_system_integ_test.go @@ -98,7 +98,7 @@ func testSystemBackend_PluginReload(t *testing.T, reqData map[string]interface{} } // Perform plugin reload - resp, err := client.Logical().Write("sys/plugins/backend/reload", reqData) + resp, err := client.Logical().Write("sys/plugins/reload/backend", reqData) if err != nil { t.Fatalf("err: %v", err) } diff --git a/website/source/api/system/plugins-backend-reload.html.md b/website/source/api/system/plugins-reload-backend.html.md similarity index 64% rename from website/source/api/system/plugins-backend-reload.html.md rename to website/source/api/system/plugins-reload-backend.html.md index 68b36f58a87f..ea4bd28b2d9c 100644 --- a/website/source/api/system/plugins-backend-reload.html.md +++ b/website/source/api/system/plugins-reload-backend.html.md @@ -1,14 +1,14 @@ --- layout: "api" -page_title: "/sys/plugins/backend/reload - HTTP API" -sidebar_current: "docs-http-system-plugins-backend-reload" +page_title: "/sys/plugins/reload/backend - HTTP API" +sidebar_current: "docs-http-system-plugins-reload-backend" description: |- - The `/sys/plugins/backend/reload` endpoint is used to reload plugin backends. + The `/sys/plugins/reload/backend` endpoint is used to reload plugin backends. --- -# `/sys/plugins/backend/reload` +# `/sys/plugins/reload/backend` -The `/sys/plugins/backend/reload` endpoint is used to reload mounted plugin +The `/sys/plugins/reload/backend` endpoint is used to reload mounted plugin backends. Either the plugin name (`plugin`) or the desired plugin backend mounts (`mounts`) must be provided, but not both. In the case that the plugin name is provided, all mounted paths that use that plugin backend will be reloaded. @@ -19,14 +19,14 @@ This endpoint reloads mounted plugin backends. | Method | Path - | Produces | | :------- | :---------------------------- | :--------------------- | -| `PUT` | `/sys/plugins/backend/reload` | `204 (empty body)` | +| `PUT` | `/sys/plugins/reload/backend` | `204 (empty body)` | ### Parameters - `plugin` `(string: "")` – The name of the plugin to reload, as registered in the plugin catalog. -- `mounts` `(slice: [])` – Array or comma separated string mount paths +- `mounts` `(slice: [])` – Array or comma-separated string mount paths of the plugin backends to reload. ### Sample Payload @@ -43,5 +43,5 @@ This endpoint reloads mounted plugin backends. $ curl \ --header "X-Vault-Token: ..." \ --request PUT - https://vault.rocks/v1/sys/plugins/backend/reload -``` \ No newline at end of file + https://vault.rocks/v1/sys/plugins/reload/backend +``` diff --git a/website/source/layouts/api.erb b/website/source/layouts/api.erb index cb4821c725f3..d5c3dd3152b5 100644 --- a/website/source/layouts/api.erb +++ b/website/source/layouts/api.erb @@ -199,8 +199,8 @@ > /sys/mounts - > - /sys/plugins/backend/reload + > + /sys/plugins/reload/backend > /sys/plugins/catalog