Courseiva
Utilize Vault CLI and APImediumMultiple ChoiceObjective-mapped

VA-003 Utilize Vault CLI and API Practice Question

Exhibit

$ vault read -format=json secret/data/team
{
  "data": {
    "data": {
      "api_key": "abc123"
    },
    "metadata": {
      "created_time": "2023-01-01T00:00:00Z",
      "deletion_time": "",
      "destroyed": false,
      "version": 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?

⚠ Common exam trap

HashiCorp often tests the distinction between KV v1 and KV v2 engines, and the trap here is that candidates forget the `data.` prefix required for KV v2, leading them to choose Option B which looks correct but fails due to the nested structure.

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

vault read -field=data.api_key secret/data/team

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.

Answer analysis

Option-by-option breakdown

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

  • vault read -field=api_key secret/team

    Why it's wrong here

    Incorrect; path should be 'secret/data/team' for KV v2.

  • vault read -field=api_key secret/data/team

    Why it's wrong here

    Incorrect; api_key is nested under data, so you need 'data.api_key'.

  • vault read -field=data.api_key secret/data/team

    Why this is correct

    Correct; -field=data.api_key extracts the nested value.

  • vault read secret/data/team

    Why it's wrong here

    Incorrect; this would output the full JSON, not just the api_key value.

About these practice questions

One of 498 original VA-003 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.