Courseiva
Question 439 of 498
Utilize Vault CLI and APIhardMultiple SelectObjective-mapped

How to Read a Secret from KV v2 Using the Vault API

Which THREE of the following are correct about using the Vault API to read a secret from KV v2 engine?

Quick Answer

The correct answer involves three key points: the API path is /v1/secret/data/mysecret, the HTTP method must be GET, and the response nests the secret under a 'data' key. This structure exists because the KV v2 engine deliberately separates secret values from metadata like version and creation time, placing the actual data under `data.data` in the JSON response. On the HashiCorp Vault Associate VA-003 exam, this question tests your understanding of the KV v2 API path convention, which requires `/data/` after the mount point to distinguish read operations from metadata or delete calls. A common trap is confusing the KV v1 path (which uses `/secret/mysecret`) with the v2 path, or forgetting that the response is not flat. To remember, think of the path as "mount/data/secret" and the response as "data.data" — the extra 'data' in both the URL and the JSON is your clue that you are working with version 2.

⚠ Common exam trap

HashiCorp often tests the distinction between KV v1 and KV v2 API paths, and the trap here is that candidates assume the bare path /v1/secret/mysecret works for both versions, forgetting that KV v2 requires the '/data/' segment for read operations.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

The response JSON contains a 'data' key with the secret values

The KV v2 engine returns secret data nested under a 'data' key in the JSON response. This is a deliberate design to separate metadata (e.g., version, created_time) from the actual secret values, which are placed under 'data.data'. The Vault API always uses GET for reading secrets from KV v2, making option B correct. Option E is correct because the KV v2 engine requires the path to include '/data/' after the mount point (e.g., /v1/secret/data/mysecret) to distinguish read operations from metadata or delete operations.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The response JSON contains a 'data' key with the secret values

    Why this is correct

    Correct; the secret data is nested under 'data.data'.

  • The HTTP method used is GET

    Why this is correct

    Correct; reading a secret uses GET.

  • The API path is /v1/secret/mysecret

    Why it's wrong here

    Incorrect; that path is for KV v1.

  • The HTTP method used is POST

    Why it's wrong here

    Incorrect; POST is for creating/updating secrets.

  • The API path is /v1/secret/data/mysecret

    Why this is correct

    Correct; for KV v2, the path includes /data/.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on VA-003

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. Refer to the exhibit. A developer ran the command and received the JSON output. Which command would retrieve only the value of 'api_key' in plain text?

medium
  • A.vault read -field=api_key secret/team
  • B.vault read -field=api_key secret/data/team
  • C.vault read -field=data.api_key secret/data/team
  • D.vault read secret/data/team

Why C: The `vault read` command with `-field=data.api_key` uses dot notation to navigate the nested JSON structure returned by the KV v2 secrets engine at `secret/data/team`. The KV v2 engine wraps the actual data under a `data` key, so to extract the `api_key` value directly, you must specify the full path `data.api_key`. Without this, the command would either fail or return the entire JSON object.

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This VA-003 practice question is part of Courseiva's free HashiCorp certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the VA-003 exam.