nerdexam
Cisco

200-901 · Question #40

Refer to the exhibit. An administrator attempts to perform a GET using the Cisco IOS XE RESTCONF API to return the hostname of a device. The sequence diagram illustrates the HTTP messages observed…

The correct answer is B. Use -u cisco:cisco instead of -u 'cisco:cisco'. In bash, we can use either convention: 'cisco:cisco' or cisco:cisco (without quotes). However, 401 auth error mostly points to either an authentication header missing or that credentials are incorrect. Hence B is probably the closes choice in this case.

Understanding and Using APIs

Question

Refer to the exhibit. An administrator attempts to perform a GET using the Cisco IOS XE RESTCONF API to return the hostname of a device. The sequence diagram illustrates the HTTP messages observed. Which change to the API request resolves the issue?

Exhibit

200-901 question #40 exhibit

Options

  • AAdd Content-Type HTTP header with 'application/yang-data+json' using -H 'Content-Type:
  • BUse -u cisco:cisco instead of -u 'cisco:cisco'
  • CChange the request method from -X "GET" to-X' POST".
  • DRemove the -H 'Accept: application/yang-data+json' HTTP header because it is not required.

How the community answered

(36 responses)
  • A
    8% (3)
  • B
    72% (26)
  • C
    6% (2)
  • D
    14% (5)

Explanation

In bash, we can use either convention: 'cisco:cisco' or cisco:cisco (without quotes). However, 401 auth error mostly points to either an authentication header missing or that credentials are incorrect. Hence B is probably the closes choice in this case.

Topics

#RESTCONF#API Request#curl#Authentication

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice