Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cisco 200-901 Exam - Topic 5 Question 99 Discussion

Refer to the exhibit.ORAn administrator attempts to perform a GET using the Cisco IOS XE RESTOCNF API to return the hostname of a device. The sequence diagram illustrated the HTTP message observed. Which change to the API request resolves the issue?
B) Use -u cisco: cisco instead of -u 'cisco: cisco'.
A) Add Content-Type HTTP header with 'application/yang-data+json' using --H 'Content-Type: application/yang-data+json'.
C) Change the request method from -X 'GET'' to- X' POST''.
D) Remove the -H 'Accept: application/yang-data^/son' HTTP header because it is not required.

Cisco 200-901 Exam - Topic 5 Question 99 Discussion

Actual exam question for Cisco's 200-901 exam
Question #: 99
Topic #: 5
[All 200-901 Questions]

Refer to the exhibit.

OR

An administrator attempts to perform a GET using the Cisco IOS XE RESTOCNF API to return the hostname of a device. The sequence diagram illustrated the HTTP message observed. Which change to the API request resolves the issue?

Show Suggested Answer Hide Answer
Suggested Answer: B

The issue shown in the sequence diagram is an HTTP 401 Unauthorized response. This suggests that the authentication credentials provided are incorrect or improperly formatted. The correct format for the credentials in a cURL command should be without quotes around the username and password. Hence, changing -u 'cisco

' to -u cisco

resolves the issue.


Contribute your Thoughts:

0/2000 characters
Rebecka
8 months ago
Surprised that D is even an option!
upvoted 0 times
...
Darrel
9 months ago
I think B makes more sense, though.
upvoted 0 times
...
Tiera
9 months ago
A is definitely the right choice!
upvoted 0 times
...
Eun
9 months ago
A seems like the most logical fix here.
upvoted 0 times
...
Lazaro
9 months ago
C is totally wrong, we need GET for this.
upvoted 0 times
...
Winfred
9 months ago
I vaguely recall that unnecessary headers can sometimes cause issues, so maybe removing the Accept header in option D could help?
upvoted 0 times
...
Mari
10 months ago
I feel like changing the request method to POST is not the right approach here. GET should be fine for retrieving data, right?
upvoted 0 times
...
Lacresha
10 months ago
I'm not entirely sure, but I think using the correct authentication format is important too. Option B sounds familiar from a practice question.
upvoted 0 times
...
Avery
10 months ago
I remember something about the Content-Type header being crucial for REST APIs, so maybe option A is the right choice?
upvoted 0 times
...
Nohemi
10 months ago
This is a good question to practice. I think I'll start by trying option A, adding the Content-Type header, and see if that resolves the issue. If not, I'll move on to the other options.
upvoted 0 times
...
Phyliss
11 months ago
I'm a bit confused by the different header options. I'll need to double-check the documentation on the Cisco IOS XE RESTCONF API to make sure I understand the correct headers to use.
upvoted 0 times
...
Basilia
11 months ago
Okay, the key here seems to be the Content-Type header. I'm pretty sure I'll need to add that to get the API request to work properly.
upvoted 0 times
...
Elvis
11 months ago
Hmm, the question mentions a GET request, but the options talk about changing the request method to POST. That seems a bit odd, I'll have to think through that one.
upvoted 0 times
...
Mike
11 months ago
This looks like a tricky question. I'll need to carefully review the sequence diagram and the API request details to figure out what's causing the issue.
upvoted 0 times
...
Albert
1 year ago
I see your point, but I still think A) makes more sense because it specifies the correct Content-Type.
upvoted 0 times
...
Vincent
1 year ago
I disagree, I believe the correct answer is C) Change the request method from -X 'GET' to -X 'POST'.
upvoted 0 times
...
Jamal
1 year ago
Wait, we're changing the request method from GET to POST? That's like trying to put a square peg in a round hole. Might as well just throw the whole API out the window and start over.
upvoted 0 times
Diane
1 year ago
User3: Removing the Accept HTTP header could also help.
upvoted 0 times
...
Stefania
1 year ago
User2: I think adding the Content-Type HTTP header might be the solution.
upvoted 0 times
...
Kimbery
1 year ago
User1: Maybe changing the request method will fix the issue.
upvoted 0 times
...
...
Albert
1 year ago
I think the answer is A) Add Content-Type HTTP header with 'application/yang-data+json'.
upvoted 0 times
...
Miesha
1 year ago
Okay, so we need to add the 'Content-Type' header to the request. Seems like a pretty straightforward fix. As long as I don't accidentally type 'application/yang-data*json' instead, I should be good to go.
upvoted 0 times
...
Shaun
1 year ago
Haha, the 'cisco: cisco' username and password combo? Really? That's like the 'admin: admin' of network devices. I bet the security team would have a field day with that one.
upvoted 0 times
Bok
1 year ago
User 2: Definitely, using default credentials is a big no-no.
upvoted 0 times
...
Dan
1 year ago
User 1: Yeah, that's a major security risk.
upvoted 0 times
...
...

Save Cancel