Vault: API Design โ Secrets Engines & Auth Methods
Docs-backedHTTP API at {vault-addr}/v1/ with a consistent path-based model. Every secrets engine is mounted at a path: /v1/secret/data/{key} for KV, /v1/database/creds/{role} for dynamic database credentials, /v1/aws/creds/{role} for AWS credentials, etc. The API is REST-like with JSON payloads. Reading a secret: GET /v1/{mount}/data/{path}. Writing: POST/PUT. Dynamic credential generation: GET /v1/{engine}/creds/{role} returns temporary credentials with a lease_id and TTL. Lease renewal: POST /v1/sys/leases/renew. Auth methods (token, AppRole, Kubernetes, AWS, LDAP, OIDC) each have their own login endpoint returning a Vault token. The path-based model is elegant: everything is a path, and policies grant access to path patterns. Batch operations via /v1/sys/tools/hash and transit bulk operations.