vault/website/content/api-docs/system/plugins-pins.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

158 lines
4.1 KiB
Plaintext
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
layout: api
page_title: /sys/plugins/pins - HTTP API
description: The `/sys/plugins/pins` endpoint is used to manage pinned plugin versions.
---
> [!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/plugins/pins`
Use the `/sys/plugins/pins` endpoint to read, create, update, and delete pinned
plugin versions in your Vault catalog.
When you pin a plugin version, Vault starts all instances of that name and type
with the configured version, even if the mount was originally configured with a
different version.
<Note tile="Behavioral notes">
- You must register a plugin version before pinning it.
- You must delete a pin before deleting the associated plugin version.
- You must [reload](/vault/api-docs/system/plugins-reload) any plugins currently
in use for the pinned version to take effect.
</Note>
## Create/update pinned version
Create a pinned version for a plugin with the given type and name.
| Method | Path |
| :----- | :------------------------------ |
| `POST` | `/sys/plugins/pins/:type/:name` |
### Parameters
- `type` `(string: <required>)`  Path parameter specifying the target plugin
type for the pinned version. May be "auth", "database", or "secret".
- `name` `(string: <required>)`  Path parameter specifying the plugin name for
the pinned version.
- `version` `(string: <required>)` - Specifies the semantic version of the plugin
to pin. Cannot be a builtin version and must already exist in the catalog.
### Sample payload
```json
{
"version": "v1.0.0"
}
```
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request POST \
--data @payload.json \
http://127.0.0.1:8200/v1/sys/plugins/pins/auth/github
```
## List pinned versions
This endpoint lists all pinned versions.
| Method | Path |
| :----- | :------------------ |
| `GET` | `/sys/plugins/pins` |
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
http://127.0.0.1:8200/v1/sys/plugins/pins
```
### Sample response
```json
{
"data": {
"pinned_versions": [
{
"name": "github",
"type": "auth",
"version": "v1.0.0"
}
]
}
}
```
## Read pinned version
Read the pinned version for a plugin with the given type and name.
| Method | Path |
| :----- | :------------------------------ |
| `GET` | `/sys/plugins/pins/:type/:name` |
### Parameters
- `type` `(string: <required>)`  Path parameter specifying the target plugin
type for the pinned version. May be "auth", "database", or "secret".
- `name` `(string: <required>)`  Path parameter specifying the plugin name for
the pinned version.
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request GET \
http://127.0.0.1:8200/v1/sys/plugins/pins/auth/github
```
### Sample response
```json
{
"data": {
"name": "github",
"type": "auth",
"version": "v1.0.0"
}
}
```
## Delete pinned version
Delete any pinned version for a plugin with the given type and name.
| Method | Path |
| :------- | :----------------------------- |
| `DELETE` | `/sys/plugins/pins/:type/:name |
### Parameters
- `type` `(string: <required>)`  Path parameter specifying the target plugin
type for the pinned version. May be "auth", "database", or "secret".
- `name` `(string: <required>)`  Path parameter specifying the plugin name for
the pinned version.
### Sample request
```shell-session
$ curl \
--header "X-Vault-Token: ..." \
--request DELETE \
http://127.0.0.1:8200/v1/sys/plugins/pins/auth/github
```