exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 422 discussion

Actual exam question from Cisco's 200-901
Question #: 422
Topic #: 1
[All 200-901 Questions]

DRAG DROP
-

Drag and drop the code from the bottom onto the box where the code is missing to retrieve the RESTCONF running configuration for an interface named TwentyFiveGigabitEthernet 1/1/2. Not all options are used.

Show Suggested Answer Hide Answer
Suggested Answer:

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
tonko
Highly Voted 1 year, 8 months ago
1. import 2. dict() 3. return 4. text Can anyone comment on this?
upvoted 11 times
nicovl
1 year, 8 months ago
Almost correct: 1. import 2. dict() 3. return 4. Json
upvoted 9 times
lmqnam
1 year ago
4 should be response.text If use json, it should have () after json like response.json() https://www.geeksforgeeks.org/response-text-python-requests/ https://www.geeksforgeeks.org/response-json-python-requests/
upvoted 6 times
Muste
10 months ago
plus he would need to import the json first
upvoted 3 times
...
...
...
...
jbmac
Most Recent 8 months, 4 weeks ago
import requests, getpass # This fills the first blank with 'import' url = 'https://<ipaddress>/restconf/data/Cisco-IOS-XE-native:native/interface/TwentyFiveGigE=1%2F1%2F2' def askCredentials(): user = input('Username: ') password = getpass.getpass('Password: ') return (user, password) # 'return' is already correctly placed in the function def getRequest(url, credentials): headers = dict() # This fills in with 'dict()' to initialize the headers dictionary headers['Accept'] = 'application/yang-data+json' return requests.get(url, headers=headers, auth=credentials, verify=False) # This fills in with 'return' creds = askCredentials() response = getRequest(url, creds) if response.status_code == 200: print(response.text) # This fills in with 'text' to print the response body
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...