200-901 exam dumps

200-901 practice question 38 of 204

Cisco DevNet Associate. Associate level, Cisco. Free question with the correct answer and a full explanation.

200-901 Question 38

Single answer

You are tasked with creating a REST API request to retrieve a list of all devices from a network management system. According to the API documentation, the endpoint for fetching devices is /api/v1/devices, and it requires an HTTP GET method. Additionally, you must include an Authorization header with a bearer token for authentication. Which of the following is the correct API request to accomplish this?

  1. A

    GET /api/v1/devices HTTP/1.1\nAuthorization: Bearer <your_token>

  2. B

    POST /api/v1/devices HTTP/1.1\nAuthorization: Bearer <your_token>

  3. C

    GET /api/v1/devices HTTP/1.1\nContent-Type: application/json

  4. D

    GET /api/v1/devices HTTP/1.1\nAuthorization: Basic <your_token>

Show answer and explanation

Correct answer: A

Explanation

The correct API request uses the GET method to retrieve data, includes the correct endpoint /api/v1/devices, and specifies the Authorization header with a bearer token for authentication. The other options either use the wrong HTTP method, incorrect header, or lack necessary authentication.

  • A. Correct.

    Correct. The HTTP GET method is specified in the API documentation, and the Authorization header with a bearer token is required for authentication.

  • B. Incorrect.

    Incorrect. The HTTP POST method is used for creating or modifying resources, not retrieving data.

  • C. Incorrect.

    Incorrect. While the HTTP GET method is correct, the Content-Type header is irrelevant for a GET request, and the required Authorization header is missing.

  • D. Incorrect.

    Incorrect. The Authorization header must use a bearer token, not basic authentication, as specified in the documentation.

Timed practice exam

Take a 200-901 practice test under exam conditions

75 questions in 120 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam