vault/api
helenfufu abac619e0a
Vault 36295 Improve plugin mgmt ux in api and cli (#30811)
* cli: only set default command parameter to plugin name if sha256 is provided

* api: write warnings to RegisterPluginResponse, propagate up to cli

* api: filter out 'Endpoint replaced the value of these parameters' warning before returning in RegisterPluginWithContext

* docs

* add TODO on filtering that links to api type parameter deprecation ticket

* fix tests

* allocate filteredWarning slice only if there are warnings

* improve deferred resp close and early error return conditionals in RegisterPluginWithContext

* refer to sha256 as cli option -sha256 in command cli usage

* break up ui error lines for sha256 and version flag check

* consolidate if statements for sha256 and command, oci_image check in cli

* consolidate if statements for sha256 and command, oci_image check in api

* new RegisterPluginV2 and RegisterPluginWithContextV2 api client functions for backward compatibility

* add changelog

* more descriptive changelog

* rename RegisterPluginV2 to RegisterPluginDetailed and RegisterPluginWithContextV2 to RegisterPluginWithContextDetailed

* return nil, nil if no warnings to preserve status code

* fix eof from decoding (check if no content before decoding)

* doc for RegisterPluginResponse

* only validate plugin.Command in plugin catalog set for downloaded and binary plugins, which rely on plugin.Command input; extracted artifact plugins don't rely on plugin.Command input

* Update website/content/api-docs/system/plugins-catalog.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/system/plugins-catalog.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/system/plugins-catalog.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/commands/plugin/register.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/commands/plugin/register.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/commands/plugin/register.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/commands/plugin/register.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* move up enterprise note on plugin register command doc

* [DOCS] Editorial suggestions for PR #30811 (#31111)

* suggestions

* move common reqs to a partial

* fix typo

* tweak reqs

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/partials/plugins/prepare-plugin.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* tweak feedback

* remove deprecation

* Update website/content/partials/plugins/common-requirements.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* save

* Update website/content/docs/plugins/rollback.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* Update website/content/docs/plugins/upgrade.mdx

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

* fix formatting

---------

Co-authored-by: helenfufu <25168806+helenfufu@users.noreply.github.com>

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
2025-06-30 10:00:54 -07:00
..
auth update vault auth submodules to api/v1.20.0 (#30851) 2025-06-05 11:04:45 -07:00
cliconfig VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386) 2025-05-23 16:02:07 -03:00
test-fixtures VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386) 2025-05-23 16:02:07 -03:00
tokenhelper Directly exec ExternalTokenHelper rather than using a SHELL (#29653) 2025-04-04 14:34:26 -04:00
.copywrite.hcl [DO NOT MERGE UNTIL EOY] update year in LICENSE and copywrite files (#24368) 2024-01-02 13:22:15 -08:00
api_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
auth_token.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
client.go VAULT-36112: Better handling for Retry-After rate limit header. (#30887) 2025-06-19 11:22:11 +02:00
client_test.go Specify headers by environment variable (#21993) 2024-06-19 16:51:24 -04:00
go.mod VAULT-36112: Better handling for Retry-After rate limit header. (#30887) 2025-06-19 11:22:11 +02:00
go.sum VAULT-36112: Better handling for Retry-After rate limit header. (#30887) 2025-06-19 11:22:11 +02:00
hcl_dup_attr_deprecation.go VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386) 2025-05-23 16:02:07 -03:00
help.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv.go docs: Update outdated vaultproject.io/docs/ links (#22162) 2023-08-15 12:59:34 -04:00
kv_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv_v1.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
kv_v2.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
LICENSE [COMPLIANCE] License changes (#22290) 2023-08-10 18:14:03 -07:00
lifetime_watcher.go Bump backoff/v3 to backoff/v4 (#26868) 2024-05-29 12:04:46 -04:00
logical.go VAULT-36198: Add API/CLI support for reading, listing, recovering from a snapshot (#30701) 2025-05-21 15:10:20 +02:00
output_policy.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
output_policy_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
output_string.go explain how -output-curl-string works in comments to avoid confusion (#28576) 2024-10-04 11:14:21 -07:00
plugin_helpers.go Upgrade api package go-jose to v4 (#26527) 2024-04-19 12:17:41 +01:00
plugin_runtime_types.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
plugin_types.go New root namespace plugin reload API sys/plugins/reload/:type/:name (#24878) 2024-01-17 15:46:27 +00:00
plugin_types_test.go New root namespace plugin reload API sys/plugins/reload/:type/:name (#24878) 2024-01-17 15:46:27 +00:00
pluginruntimetype_enumer.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
README.md docs: Update outdated vaultproject.io/docs/ links (#22162) 2023-08-15 12:59:34 -04:00
renewbehavior_enumer.go Use enumer to generate String() methods for most enums (#25705) 2024-04-17 11:14:14 -07:00
renewer_test.go VAULT-25341 Address issue where having no permissions to renew caused auto-auth to attempt to renew with no backoff (#26844) 2024-05-09 11:12:42 -04:00
replication_status.go CE part of https://github.com/hashicorp/vault-enterprise/pull/4269 (#26406) 2024-04-15 20:08:57 +00:00
request.go chore: fix deprecated ioutil nopcloser (#27650) 2024-07-03 13:38:34 -04:00
request_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
response.go chore: fix deprecated ioutil nopcloser (#27650) 2024-07-03 13:38:34 -04:00
secret.go Prepare code base for Go 1.24 update. (#29412) 2025-01-27 14:34:07 -05:00
secret_test.go Relplat 897 copywrite fixes for mutliple licenses (#23722) 2023-10-20 08:40:43 -07:00
ssh.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
ssh_agent.go VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386) 2025-05-23 16:02:07 -03:00
ssh_agent_test.go VAULT-32657 deprecate duplicate attributes in HCL configs and policies (#30386) 2025-05-23 16:02:07 -03:00
sudo_paths.go Add non-root access with filtering support to activity export API (#27846) 2024-07-24 09:21:52 -04:00
sudo_paths_test.go add plugin runtime API (#22469) 2023-08-31 13:37:04 -07:00
sys.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_audit.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_auth.go api: do not require sudo for GetAuth wrapper (#25968) 2024-03-15 14:40:22 -07:00
sys_capabilities.go Command: token capabilities using accessor (#24479) 2023-12-13 11:15:21 -05:00
sys_config_cors.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_generate_root.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_hastatus.go CE part of https://github.com/hashicorp/vault-enterprise/pull/4269 (#26406) 2024-04-15 20:08:57 +00:00
sys_health.go VAULT-31755: Add removed and HA health to the sys/health endpoint (#28991) 2024-12-04 11:09:10 +01:00
sys_init.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_leader.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_leases.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_mfa.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_monitor.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_mounts.go Support trimming trailing slashes via a mount tuneable to support CMPv2 (#28752) 2024-10-24 10:47:17 -05:00
sys_mounts_test.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_plugins.go Vault 36295 Improve plugin mgmt ux in api and cli (#30811) 2025-06-30 10:00:54 -07:00
sys_plugins_runtimes.go Support rootless plugin containers (#24236) 2023-11-28 14:07:07 +00:00
sys_plugins_runtimes_test.go add plugin runtime API (#22469) 2023-08-31 13:37:04 -07:00
sys_plugins_test.go Vault 36295 Improve plugin mgmt ux in api and cli (#30811) 2025-06-30 10:00:54 -07:00
sys_policy.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_raft.go [VAULT-35076] Add methods for loading and unloading snapshots to the sys raft API client (#30719) 2025-05-22 16:54:26 +01:00
sys_rekey.go VAULT-36229: Nonce for rekey cancellations (#30794) 2025-06-05 19:55:41 +02:00
sys_rotate.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_seal.go VAULT-31751, VAULT-31752: removed_from_cluster in vault status (#28938) 2024-11-19 11:13:10 +01:00
sys_stepdown.go adding copyright header (#19555) 2023-03-15 09:00:52 -07:00
sys_ui_custom_message.go VAULT-22504: Support Custom Messages in api Package (#24959) 2024-01-23 13:20:58 -05:00
sys_ui_custom_message_test.go VAULT-22504: Support Custom Messages in api Package (#24959) 2024-01-23 13:20:58 -05:00
sys_utilization_report.go VAULT-34541 CE changes (#29920) 2025-03-18 16:01:59 -04:00

Vault API

This provides the github.com/hashicorp/vault/api package which contains code useful for interacting with a Vault server.

For examples of how to use this module, see the vault-examples repo. For a step-by-step walkthrough on using these client libraries, see the developer quickstart.

GoDoc