Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

HashiCorp Vault KV V2 API

Key/Value version 2 secrets engine

HashiCorp Vault KV V2 API is one of 28 APIs that HashiCorp Vault publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include KV V2. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and authentication docs.

This API exposes 12 operations across 7 paths, and defines 4 schemas. It is described by OpenAPI 3.1.0, at version 1.0.

Requests are made against a single base URL, https://vault.example.com/v1.

12 operations 7 paths 4 schemas 2 DELETE4 GET6 POST

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.1.0
API Version
1.0
Base URL
https://vault.example.com/v1/sys
Authentication
API Key
Resource Areas
1

Authentication & Security 1

HashiCorp Vault KV V2 API declares 1 security scheme for authenticating requests. An API key is passed in the header as X-Vault-Token (vaultToken). By default, every request must be authenticated.

  • vaultToken — Vault authentication token

Paths & Operations 12

Across 7 paths, the API surfaces 12 operations — 2 DELETE, 4 GET, 6 POST. Each is listed below with its method, path, parameters, and response codes.

KV V2 12

Key/Value version 2 secrets engine

GET
/{mount}/config
HashiCorp Vault Read KV v2 engine configuration
readKvV2Config 1 param → 200403
POST
/{mount}/config
HashiCorp Vault Configure KV v2 engine
updateKvV2Config 1 param body → 204403
GET
/{mount}/data/{path}
HashiCorp Vault Read KV v2 secret
readKvV2Secret 3 params → 200403404
POST
/{mount}/data/{path}
HashiCorp Vault Create or update KV v2 secret
createOrUpdateKvV2Secret 2 params body → 200403
DELETE
/{mount}/data/{path}
HashiCorp Vault Delete latest version of KV v2 secret
deleteLatestKvV2Secret 2 params → 204403
POST
/{mount}/delete/{path}
HashiCorp Vault Delete specific versions of KV v2 secret
deleteKvV2SecretVersions 2 params body → 204403
POST
/{mount}/undelete/{path}
HashiCorp Vault Undelete versions of KV v2 secret
undeleteKvV2SecretVersions 2 params body → 204403
POST
/{mount}/destroy/{path}
HashiCorp Vault Destroy versions of KV v2 secret
destroyKvV2SecretVersions 2 params body → 204403
GET
/{mount}/metadata/{path}
HashiCorp Vault Read KV v2 secret metadata
readKvV2Metadata 2 params → 200403404
POST
/{mount}/metadata/{path}
HashiCorp Vault Update KV v2 secret metadata
updateKvV2Metadata 2 params body → 204403
DELETE
/{mount}/metadata/{path}
HashiCorp Vault Delete KV v2 secret metadata and all versions
deleteKvV2Metadata 2 params → 204403
GET
/{mount}/metadata/
HashiCorp Vault List KV v2 secrets
listKvV2Secrets 1 param → 200403

Schemas 4

The contract defines 4 schemas that model the data the API accepts and returns. The most detailed are KvV2VersionMetadata (5 properties), KvV2Config (3 properties), KvV2MetadataResponse (1 property), KvV2ReadResponse (1 property). Each schema is shown below with its type and property counts.

KvV2ReadResponse
object
1 property
KvV2Config
object
3 properties
KvV2VersionMetadata
object
5 properties
KvV2MetadataResponse
object
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

hvault-kv-v2-api-openapi.yml Raw ↑

Other APIs HashiCorp Vault publishes across the network.

HashiCorp Vault AppRole API
HashiCorp Vault Audit API
HashiCorp Vault Auth API
HashiCorp Vault AWS API
HashiCorp Vault Configuration API
HashiCorp Vault Database API
HashiCorp Vault Entity Alias API
HashiCorp Vault Entity API
HashiCorp Vault GitHub API
HashiCorp Vault Group Alias API
HashiCorp Vault Group API
HashiCorp Vault Health API