Cisco 200-901 Practice Test - Questions Answers, Page 6

List of questions
Question 51

Which way should be used to safely store the API keys?
in an environment variable unique to the system database
encrypted in a configuration file that is separate from the code
plain text in the code as a constant
encrypted in the code in a function
Question 52

FILL BLANK Fill in the blanks to complete the statement.
Given a username of βdevnetβ and a password of βcisco123β, applications must create a base64 encoding of the string β_______________β when sending HTTP requests to an API that uses__________________authentication.
Answer: A
Explanation:
YWRtaW46Y2lzY2 8xMjM Basic
Reference: https://www.cisco.com/c/en/us/td/docs/net_mgmt/elastic_services_controller/4-1/install/guide/Cisco-Elastic- Services-Controller-Install-Upgrade-Guide-4-1/Cisco-Elastic-Services-Controller- Install-Upgrade-Guide-3-0_chapter_01011 .html
Question 53

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?
Remove the -H βAccept: application/yang-data+json' HTTP header because it is not required.
Add -βu cisco:cisco' in the end of the cURL command
Change the request method from -X βGETβ to -X βPOSTβ
Add Content-Type HTTP header with βapplication/yang-data+jsonβ using -H βContent-Type: application/yang-data+jsonβ
Question 54

What are two benefits of managing network configuration via APIs? (Choose two.)
more security due to locking out manual device configuration
configuration on devices becomes less complex
eliminates the need of legacy management protocols like SNMP
reduction in network changes performed manually
increased scalability and consistency of network changes
Question 55

FILL BLANK Fill in the blanks to complete the cURL command that invokes a RESTful API to retrieve a resource in JSON format using OAuth.
curl -X_____________ -H β___________: application/jsonβ \
-H β __________ : Bearer AbCdEf123456β https://localhost/api/myresource
Answer: A
Explanation:
GET Accept Authorization
Reference:
https://webcache.googleusercontent.com/search?q=cache:Se6d2trvMsEJ:https://blogs.cisco.com/developer/security-api- best-practices+&cd=4&hl=en&ct=clnk&gl=pk&client=firefox-b-d
Question 56

Which Cisco DevNet resource allows access to products in a development lab to explore, learn, and build applications that use Cisco APIs?
DevNet Code Exchange
DevNet Sandbox
DevNet Communities
DevNet Automation Exchange
Reference: https://developer.cisco.com/site/sandbox/
Question 57

Refer to the exhibits.
A developer is troubleshooting an API with the given API documentation and cURL command. What is the cause of this problem?
The authorization header is missing or incomplete.
The request body is missing or incomplete.
The API token specified is expired.
The user is not allowed to post messages from their account.
Question 58

Which two statements describe the traits of an asynchronous API call? (Choose two.)
Code execution blocks or waits for the call to an API to return.
A callback function typically is used to process the response from an API call.
A call to an API does not block the code, but rather it allows application processing to continue.
The end user can experience latency or performance lag while waiting for the API call to return.
The order in which API calls return can be guaranteed.
Reference: https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-callbacks-promises-and-async-await- 17e0673281ee
Question 59

Which mechanism is used to consume a RESTful API design when large amounts of data are returned?
data sets
scrolling
pagination
blobs
Reference: https://nordicapis.com/everything-you-need-to-know-about-api-pagination/
Question 60

Refer to the exhibit.
What caused the error in this API request?
The API resource does not support the POST operation.
The submitted JSON payload has a formatting issue.
The API resource does not support JSON format payloads.
The submitted JSON payload includes a field that is not supported by the API resource.
Question