Courseiva

200-901 Understanding and Using APIs Practice Question

A developer is testing a REST API that returns a JSON response with a 'Location' header when a new resource is created. The developer wants to capture the URL of the newly created resource from the response. Which HTTP status code and header should the developer look for?

⚠ Common exam trap

The trap here is assuming that any success code like 200 OK or any header like Content-Location will provide the new resource URI, when specifically 201 Created and the Location header are the correct indicators.

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

✓

HTTP 201 Created and the Location header

When a REST API creates a resource, it should return HTTP 201 Created along with a Location header that specifies the URI of the new resource. This allows the client to know where the resource can be accessed. Other status codes like 200, 204, or 302 do not serve this purpose. The developer should check for 201 and extract the Location header value.

Answer analysis

Option-by-option breakdown

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

  • ✗

    HTTP 204 No Content and the ETag header

    Why it's wrong here

    HTTP 204 No Content indicates that the request was successful but there is no body to return. It is often used for updates or deletions, not for creating resources where a URI is returned. The ETag header is used for caching and conditional requests, not for providing the location of a new resource.

  • ✗

    HTTP 200 OK and the Content-Location header

    Why it's wrong here

    HTTP 200 OK is a generic success status but does not specifically indicate that a new resource was created. The Content-Location header is used to indicate the location of the resource corresponding to the entity in the response, but it is not the standard header for providing the URI of a newly created resource. The correct status is 201 and the header is Location.

  • ✓

    HTTP 201 Created and the Location header

    Why this is correct

    A successful resource creation typically returns HTTP 201 Created. The response includes a Location header that contains the URI of the newly created resource. This is a standard REST convention. The developer should check for the 201 status and then read the Location header to obtain the resource URL.

  • ✗

    HTTP 302 Found and the Location header

    Why it's wrong here

    HTTP 302 Found is a redirection status, indicating that the resource resides temporarily under a different URI. While it includes a Location header, it is not used for successful resource creation. The appropriate status for creation is 201, and the Location header in that context provides the new resource's URI.

About these practice questions

This 200-901 question is part of Courseiva's 975-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Cisco exam blueprint

This 200-901 practice question is part of Courseiva's free Cisco 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 200-901 exam.