200-901 exam dumps

200-901 practice question 37 of 204

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

200-901 Question 37

Single answer

You are working with a network device that provides a REST API to retrieve the list of VLANs configured on the device. The API documentation specifies the following details for the request:

  • Endpoint: GET /api/v1/vlans
  • Authentication: Bearer token in the Authorization header

Which HTTP request would correctly retrieve the VLAN list?

  1. A

    GET /api/v1/vlans HTTP/1.1 Authorization: Bearer Host: 192.168.1.1

  2. B

    POST /api/v1/vlans HTTP/1.1 Authorization: Bearer Host: 192.168.1.1

  3. C

    GET /api/v1/vlans HTTP/1.1 Host: 192.168.1.1

  4. D

    GET /api/v1/vlans HTTP/1.1 Authorization: Basic Host: 192.168.1.1

Show answer and explanation

Correct answer: A

Explanation

To construct a REST API request, it is essential to carefully follow the API documentation. In this case, the API specifies the GET method, the /api/v1/vlans endpoint, and the use of a Bearer token in the Authorization header for authentication. Only the first option adheres to all these requirements, making it the correct answer.

  • A. Correct.

    This is the correct answer because it matches the API documentation, using the GET method, the correct endpoint, and a Bearer token in the Authorization header.

  • B. Incorrect.

    This is incorrect because the POST method is not specified in the documentation for retrieving VLANs. The correct method is GET.

  • C. Incorrect.

    This is incorrect because it does not include the Bearer token in the Authorization header, which is required for authentication according to the API documentation.

  • D. Incorrect.

    This is incorrect because it uses Basic authentication instead of the Bearer token, which does not align with the API 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