VA-003 Utilize Vault CLI and API Practice Question
A DevOps engineer needs to create a token with a specific policy attached using the Vault API. Which API endpoint and request should they use?
⚠ Common exam trap
HashiCorp often tests the exact API path and JSON key naming conventions, tricking candidates who confuse 'policy' (singular) with 'policies' (array) or omit the 'auth' segment in the endpoint path.
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
✓
POST /v1/auth/token/create with JSON body {"policies":["my-policy"]}
The Vault API endpoint for creating tokens with specific policies is POST /v1/auth/token/create, and the JSON body must include the 'policies' key as an array of strings. This endpoint is part of the token auth method and allows attaching policies at token creation time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
POST /v1/auth/token/create with JSON body {"policies":["my-policy"]}
Why this is correct
POST /v1/auth/token/create accepts a JSON body whose "policies" array binds named policies directly to the issued token, satisfying the stem's requirement for a token with a specific policy attached. The token auth method's create endpoint is the documented mechanism for policy-scoped token issuance via the Vault API.
- ✗
POST /v1/auth/token/create-orphan with JSON body {"policies":["my-policy"]}
Why it's wrong here
The create-orphan endpoint produces a token with no parent, which is not what was requested; it exists to prevent revocation cascading from a parent token. It is tempting because it accepts a policies array, but the standard endpoint for attaching a policy is /v1/auth/token/create.
- ✗
POST /v1/token/create with JSON body {"policy":"my-policy"}
Why it's wrong here
The token creation endpoint is /v1/auth/token/create, and the body field is the plural policies array, not a singular policy string. It is tempting because the shorter path and singular key look natural, but Vault rejects the unrecognised field and the route does not exist.
- ✗
POST /v1/sys/token with JSON body {"policy":"my-policy"}
Why it's wrong here
Token creation uses POST /v1/auth/token/create; /v1/sys/token is not a Vault endpoint, so the request returns 404. It is tempting because sys/ paths handle many administrative operations, and attaching a policy at creation is genuinely done via the policies array in the token create payload.
Go deeper
Related to this question
About these practice questions
One of 366 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 →
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.