vault/website/content/api-docs/system/sealwrap-rewrap.mdx
Erica Thompson 0660ea6fac
Update README (#31244)
* Update README

Let contributors know that docs will now be located in UDR

* Add comments to each mdx doc

Comment has been added to all mdx docs that are not partials

* chore: added changelog

changelog check failure

* wip: removed changelog

* Fix content errors

* Doc spacing

* Update website/content/docs/deploy/kubernetes/vso/helm.mdx

Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>

---------

Co-authored-by: jonathanfrappier <92055993+jonathanfrappier@users.noreply.github.com>
Co-authored-by: Tu Nguyen <im2nguyen@users.noreply.github.com>
2025-07-22 08:12:22 -07:00

76 lines
2.0 KiB
Plaintext

---
layout: api
page_title: /sys/sealwrap/rewrap - HTTP API
description: >-
The `/sys/sealwrap/rewrap` endpoint is used to rewrap all seal wrapped
entries.
---
> [!IMPORTANT]
> **Documentation Update:** Product documentation, which were located in this repository under `/website`, are now located in [`hashicorp/web-unified-docs`](https://github.com/hashicorp/web-unified-docs), colocated with all other product documentation. Contributions to this content should be done in the `web-unified-docs` repo, and not this one. Changes made to `/website` content in this repo will not be reflected on the developer.hashicorp.com website.
# `/sys/sealwrap/rewrap`
@include 'alerts/enterprise-only.mdx'
@include 'alerts/restricted-root.mdx'
The `/sys/sealwrap/rewrap` endpoint is used to rewrap all seal wrapped entries.
This is useful when you want to upgrade seal wrapped entries to use the latest
key, for example, after a seal migration or after rotating the remote keyring.
## Read rewrap status
This endpoint reports whether a seal rewrap process is currently running.
| Method | Path |
| :----- | :--------------------- |
| `GET` | `/sys/sealwrap/rewrap` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/sealwrap/rewrap
```
### Sample response
```json
{
"data": {
"entries": {
"failed": 0,
"processed": 30,
"succeeded": 30
},
"is_running": false
}
}
```
## Start a seal rewrap process
This endpoint starts a seal rewrap process if one is not currently running.
The process will run in the background. Check the vault server logs for status
and progress updates.
| Method | Path |
| :----- | :--------------------- |
| `POST` | `/sys/sealwrap/rewrap` |
The default status codes are:
- `200` if a seal rewrap process is already running
- `204` if a seal rewrap process was started
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
http://127.0.0.1:8200/v1/sys/sealwrap/rewrap
```