nerdexam
Cisco

350-201 · Question #14

What is the HTTP response code when the REST API information requested by the authenticated user cannot be found?

The correct answer is D. 404. HTTP 404 is returned when a requested resource cannot be found on the server, even when the request is properly authenticated.

Fundamentals

Question

What is the HTTP response code when the REST API information requested by the authenticated user cannot be found?

Options

  • A401
  • B402
  • C403
  • D404
  • E405

How the community answered

(25 responses)
  • A
    8% (2)
  • B
    4% (1)
  • D
    88% (22)

Why each option

HTTP 404 is returned when a requested resource cannot be found on the server, even when the request is properly authenticated.

A401

401 Unauthorized indicates the request lacks valid authentication credentials, not that the resource is missing.

B402

402 Payment Required is reserved for future use and is not a standard response for missing resources.

C403

403 Forbidden means the server understood the request but refuses to authorize it - the user is authenticated but lacks permission, which is a different scenario from a resource not being found.

D404Correct

HTTP 404 Not Found is the standard response code indicating the server could not locate the requested resource. Authentication status is irrelevant to this code - it specifically signals that the endpoint or resource does not exist at the given URI, which directly matches the scenario described.

E405

405 Method Not Allowed indicates the HTTP method used (GET, POST, etc.) is not supported for the target resource, not that the resource is absent.

Concept tested: HTTP REST API response status codes

Source: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404

Topics

#HTTP status codes#404 not found#REST API#authentication

Community Discussion

No community discussion yet for this question.

Full 350-201 Practice