nerdexam
Cisco

200-901 · Question #335

Refer to the exhibit. A developer writes a script to create a new network by using the Cisco DNA Center API. After running the script for the first time, the developer observes that HTTP code 404 is…

The correct answer is B. The API URL must be changed with a valid URL. An HTTP 404 Not Found error indicates that the server could not find the requested resource.

Understanding and Using APIs

Question

Refer to the exhibit. A developer writes a script to create a new network by using the Cisco DNA Center API. After running the script for the first time, the developer observes that HTTP code 404 is printed to the console. Which action resolves the problem?

Exhibit

200-901 question #335 exhibit

Options

  • AThe x-auth-token value must be changed to a valid token.
  • BThe API URL must be changed with a valid URL.
  • CThe requested payload must be fixed to include missing parts.
  • DInternal errors on the code of API server must be fixed.

How the community answered

(25 responses)
  • B
    96% (24)
  • D
    4% (1)

Why each option

An HTTP 404 Not Found error indicates that the server could not find the requested resource.

AThe x-auth-token value must be changed to a valid token.

An invalid `x-auth-token` would typically result in an HTTP 401 Unauthorized or 403 Forbidden error, not 404.

BThe API URL must be changed with a valid URL.Correct

An HTTP 404 Not Found status code specifically means that the server could not find a resource at the specified URL. This typically points to an incorrect or malformed API endpoint URL in the script, and changing it to a valid URL will resolve the issue.

CThe requested payload must be fixed to include missing parts.

An incorrect or missing payload would usually result in an HTTP 400 Bad Request error.

DInternal errors on the code of API server must be fixed.

Internal server errors are indicated by HTTP 5xx status codes, such as 500 Internal Server Error, not 404.

Concept tested: HTTP status codes (404 Not Found)

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

Topics

#HTTP Status Codes#API Troubleshooting#API Endpoints#Cisco DNA Center API

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice