exam questions

Exam 200-901 All Questions

View all questions & answers for the 200-901 exam

Exam 200-901 topic 1 question 118 discussion

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

FILL BLANK -
Fill in the blanks to complete the Python script to retrieve a list of network devices using the Cisco DNA Center API. my_token=
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzl1NiJ9.ey.JzdWliOil1ZDE0OWZkMjhlZTY2
MmQ3NGM5YzE5ZTliLmYzMClslmV4cCI6MTU3MjM3ODE5MCwidXNlcm5hbWUiOiJraX
N370940885.zhK5LPQd501ZUpZI0IH_qrgOXttlNbxSFFF7JOEtRls'
import requests
url = `https://myDNAserver/dna/intent/api/v1/network-device`
payload = {}
headers = {'x-auth-token': my_token}
response = requests.request( _______________________ , url,
headers = _________________________, data = _______________________ ) print(response.text.encode('utf8'))

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
response = requests.request( method , url,
headers = headers, data = request.get_data )
print(response.text.encode('utf8'))
Reference:
https://www.programcreek.com/python/example/64946/flask.request.get_data

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
Dave513
Highly Voted 1 year, 3 months ago
"GET" : headers : payload
upvoted 6 times
Dave513
1 year, 3 months ago
response = requests.request( "GET", url, headers = headers, data = payload)
upvoted 8 times
...
...
macxsz
Most Recent 10 months, 3 weeks ago
"GET" headers payload
upvoted 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago