Courseiva
easyMultiple Choice

200-901 Practice Question: When designing a RESTful API for a network…

When designing a RESTful API for a network automation tool, which status code indicates that a resource has been created successfully?

⚠ Common exam trap

Cisco often tests the distinction between 201 Created and 204 No Content. A common trap is to think that 204 No Content is appropriate for creation if the API returns no body, but the standard HTTP semantics require 201 for successful resource creation. 204 should be used for operations like DELETE that do not return a body.

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

✓

201 Created

(201 Created). According to HTTP semantics and RESTful API best practices, a successful POST request that creates a new resource should return the 201 Created status code. This indicates that the request has been fulfilled and a new resource has been created, often with a Location header pointing to the resource's URI. 204 No Content (option A) is used for successful requests that have no response body, such as DELETE or when an update returns no content, but not for creation.

Answer analysis

Option-by-option breakdown

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

  • ✗

    204 No Content

    Why it's wrong here

    204 No Content confirms success but returns no body, used for DELETE or PUT updates where nothing needs returning. Creation requires 201 Created with a Location header pointing to the new resource. 204 suits operations where the client needs no representation back.

  • ✗

    200 OK

    Why it's wrong here

    200 OK signals a successful request generally, typically for GET or PUT returning a representation. Creation specifically requires 201 Created, which also carries a Location header identifying the new resource. 200 is correct when returning existing resource data without creating anything.

  • ✓

    201 Created

    Why this is correct

    201 Created confirms a new resource now exists at the URI returned in the Location header, satisfying the stem's requirement for successful creation. Unlike 200 OK, which merely reports general success, 201 explicitly signals that the POST persisted a new entity — the precise semantic REST expects after resource creation.

  • ✗

    202 Accepted

    Why it's wrong here

    202 Accepted means the request was accepted for asynchronous processing, not that a resource exists yet, so no created resource is confirmed. It tempts because provisioning APIs often queue work and return 202 — correct when the operation is deferred, but resource creation requires 201 Created with a Location header.

About these practice questions

One of 975 original 200-901 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 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.