DevNet Associate (DEVASC): 200-901 Questions

Question #51  

DRAG DROP –

Drag and drop the Python code from the left onto the correct step on the right to call a REST API.

Select and Place:

Question #52  

A 401 HTTP response code is returned when calling a REST API. What is the error state identified by this response code?

A. The server cannot process the request as it has detected an issue in the request syntax or body.

B. The request has not been accepted because it requires authentication.

C. The sever accepted the request but the client is not authorized for this content.

D. The server cannot find the requested resource because the path specified is incorrect.

Correct Answer: B

Reference:

https://blog.restcase.com/rest-api-error-codes-

101/#:~:text=A%20401%20error%20response%20indicates,credentials%20or%20none%20at%20all

Question #53  

A developer is creating a script to interact with a REST API service which requires basic authentication. The credentials are “devnet:391665405” and the Base64 encoding of the credentials is “GV2bmV0dXNlcjpDaXNj=”. Which payload and header combination must be used for authentication?

A.

B.

C.

D.

Correct Answer: B

Question #54  

A developer needs a list of clients connected to a specific device in a Meraki network. After making a REST API call, the developer receives an unfamiliar response code. Which Cisco DevNet resource should be used to identify the meaning of the response code?

A. API documentation

B. Code Exchange

C. Learning Labs

D. Sandbox

Correct Answer: A

Question #55  

A developer is trying to retrieve data over a REST API. The API server responds with an HTTP client error response code. After investigating the response, the developer realizes the response has a Retry-After header. What is the root cause of this error?

A. An appliance limited the rate of requests to the transport layer.

B. The REST service is unreachable at the time of the REST request.

C. Too many requests were sent to the REST service in a given amount of time.

D. An appliance limited the rate of requests to the application layer.

Correct Answer: C

Question #56  

Refer to the exhibit.

A developer needs to upload a local file by using the REST API. The developer gathers information according to the documentation and sends the request by using the cURL command in the exhibit but gets an error code. Which action should be followed to get a valid response?

A. change content-type as JSON

B. add the authorization header with the access token

C. and a username-password combination to request command

D. change request method as GET

Correct Answer: B

Reference:

https://developer.webex.com/docs/api/basics

Question #57  

DRAG DROP –

Refer to the exhibit.

Drag and drop the descriptors from the left onto the corresponding parts of the API request and response on the right.

Select and Place:

Question #58  

Which action resolves a 401 error in response to an HTTP GET that is issued to retrieve a configuration statement using RESTCONF on a CSR 1000V?

A. Change the HTTP method to PUT.

B. Check the MIME types in the HTTP headers.

C. Change the transport protocol to HTTPS.

D. Check the authentication credentials.

Correct Answer: D

Question #59  

Refer to the exhibit.

An API call is constructed to retrieve the inventory in XML format by using the API. The response to the call is 401 Unauthorized. Which two headers must be added to the API call? (Choose two.)

A. Bearer-Token: dXNlcm5hbWU6cGFzc3dvcmQ=

B. Content-Type: application/xml

C. Authentication: Bearer dXNlcm5hbWU6cGFzc3dvcmQ=

D. Accept: application/xml

E. Authorization: Bearer dXNlcm5hbWU6cGFzc3dvcmQ=

Correct Answer: DE

Question #60  

Which HTTP response status code means `Forbidden`?

A. 500

B. 401

C. 403

D. 502

Correct Answer: C

Reference:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403

Question #61  

Which HTTP response code should be returned when the request is completed, but there is no content to send for the request?

A. 100

B. 204

C. 302

D. 402

Correct Answer: B

Reference:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#successful_responses

Question #62  

Refer to the exhibit. Which data is specified in the response header?

A. Content-Type

B. HTTP/1.1 200 OK

C. ג€type ג€: ג €switch €ג

D. { ג€id ג€: ג €a123456bcde ג€, HTTP/1.1 200 OK ג€status ג€: ג €online ג€, ג €type ג€: ג €switch { €ג

Correct Answer: A

Question #63  

What are two use cases where webhooks are effective? (Choose two.)

A. Filter out information from a response to an API call.

B. Close a session with a web server after a specific amount of time.

C. Inform a previously defined chat channel after a deployment fails.

D. Send an email to a customer of an online store after payment is complete.

E. Change the response format or content type of an API call.

Correct Answer: CD

Question #64  

In which two ways is an application characterized when interacting with a webhook? (Choose two.)

A. receiver

B. transaction monitor

C. codec

D. processor

E. listener

Correct Answer: AE

Question #65  

How does requesting a synchronous API operation differ from requesting an asynchronous API operation?

A. clients receive responses with a task ID for further processing

B. clients subscribe to a webhook for operation results

C. clients poll for the status of the execution of operations

D. clients can access the results immediately

Correct Answer: D

Question #66  

DRAG DROP –

Drag and drop the HTTP status codes from the left onto the correct descriptions on the right.

Select and Place:

Reference:

https://www.cisco.com/c/en/us/support/docs/security/web-security-appliance/118217-troubleshoot-wsa-00.html

Question #67  

Which method should be used to safely store the API keys?

A. in an environment variable unique to the system database

B. encrypted in a configuration file that is separate from the code

C. plain text in the code as a constant

D. encrypted in the code in a function

Correct Answer: A

Question #68  

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.

Correct Answer: See explanation below.

YWRtaW46Y2lzY28xMjM –

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 #69  

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?

A. Remove the ג€”H ‘Accept: application/yang-data+json’ HTTP header because it is not required.

B. Add ג€”‘u cisco:cisco’ in the end of the cURL command

C. Change the request method from ג€”X ג€GET ג€ to ג€”X ג€POST €ג

D. Add Content-Type HTTP header with ‘application/yang-data+json’ using ג€”H ‘Content-Type: application/yang-data+json’

Correct Answer: B

Question #70  

What are two benefits of managing network configuration via APIs? (Choose two.)

A. more security due to locking out manual device configuration

B. configuration on devices becomes less complex

C. eliminates the need of legacy management protocols like SNMP

D. reduction in network changes performed manually

E. increased scalability and consistency of network changes

Correct Answer: DE

Question #71  

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

Correct Answer: See explanation below.

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 #72  

Which Cisco DevNet resource allows access to products in a development lab to explore, learn, and build applications that use Cisco APIs?

A. DevNet Code Exchange

B. DevNet Sandbox

C. DevNet Communities

D. DevNet Automation Exchange

Correct Answer: B

Reference:

https://developer.cisco.com/site/sandbox/

Question #73  

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?

A. The authorization header is missing or incomplete.

B. The request body is missing or incomplete.

C. The API token specified is expired.

D. The user is not allowed to post messages from their account.

Correct Answer: A

Question #74  

Which two statements describe the traits of an asynchronous API call? (Choose two.)

A. Code execution blocks or waits for the call to an API to return.

B. A callback function typically is used to process the response from an API call.

C. A call to an API does not block the code, but rather it allows application processing to continue.

D. The end user can experience latency or performance lag while waiting for the API call to return.

E. The order in which API calls return can be guaranteed.

Correct Answer: BC

Reference:

https://medium.com/codebuddies/getting-to-know-asynchronous-javascript-callbacks-promises-and-async-await-17e0673281ee

Question #75  

Which mechanism is used to consume a RESTful API design when large amounts of data are returned?

A. data sets

B. scrolling

C. pagination

D. blobs

Correct Answer: C

Reference:

https://nordicapis.com/everything-you-need-to-know-about-api-pagination/

Question #76  

Refer to the exhibit.

What caused the error in this API request?

A. The API resource does not support the POST operation.

B. The submitted JSON payload has a formatting issue.

C. The API resource does not support JSON format payloads.

D. The submitted JSON payload includes a field that is not supported by the API resource.

Correct Answer: B

Question #77  

Which two use cases are supported by Meraki APIs? (Choose two.)

A. Build location-aware apps from Wi-Fi and LoRaWAN devices.

B. Build a custom Captive Portal for Mobile Apps.

C. Configure network devices via the Dashboard API.

D. Deploy applications onto the devices.

E. Retrieve live streams from a Meraki Camera.

Correct Answer: CE

Question #78  

Which API is used to obtain data about voicemail ports?

A. Webex Teams

B. Cisco Unified Communications Manager

C. Finesse Gadgets

D. Webex Devices

Correct Answer: B

Question #79  

DRAG DROP –

Refer to the exhibit. A developer needs to automatically retrieve all of the messages of a Webex room with the roomId of `Y2lzY29zcGFyazovL3Vz397468502YjU5NjAtNTk0Zi0xMWVhLTk0Mj`. Using the Webex API documentation shown, drag and drop the code snippets from below onto the code to complete the Python script to list all of the messages in the room. Not all options are used.

Select and Place:

Question #80  

What is a difference between a synchronous API and an asynchronous API?

A. Synchronous API calls require an authentication header to be sent while asynchronous calls do not require authentication.

B. Synchronous API calls are returned immediately while asynchronous calls do not guarantee an immediate response.

C. An asynchronous API can make offline calls while synchronous APIs do not have this capability.

D. An asynchronous API can make a larger number of calls in a specified time period than a synchronous API.

Correct Answer: D

Reference:

https://stackoverflow.com/questions/36213948/what-is-the-difference-between-asynchronous-calls-and-callbacks

Question #81  

DRAG DROP –

Refer to the exhibit. Drag and drop the code from the bottom onto the blanks in the code to construct a cURL command using the Cisco DNA

Center API, which will provide the details of a WLAN controller with Id ab123456789. Not all options are used.

Select and Place:

Correct Answer:

Question #82  

Refer to the exhibit. A network engineer must manage the network devices. The engineer prepares a Python script to authenticate to the Cisco

DNA Center API and request a device list. The device request fails and returns error code 401. Which action solves the problem?

A. Update the credentials that are already supplied and retry the request.

B. Send the request to another network in case there are reachability issues.

C. Send the Authentication header in the request with a valid configuration.

D. Update the API URL, which matched the API endpoint for device list.

Correct Answer: C

Question #83  

Refer to the exhibit. Which command needs to be placed on the box where the code is missing to output the value of page_id in the Python 3.7 script?

A. print(items.get(‘items’)[0].get(‘page_id’))

B. print(items.get(‘items’).get(‘page_id’))

C. print(items[‘items’][‘page_id’].keys())

D. print(items[‘items’][‘page_id’])

Correct Answer: A

Question #84  

Refer to the exhibit.

The documentation outlines how to use credentials for the AMP API. Which script successfully performs an API call using basic authentication?

A.

B.

C.

D.

Correct Answer: B

Question #85  

Refer to the exhibit. A developer creates a Python script that queries Cisco Webex. When the script is executed, a 401 code is returned. After troubleshooting, the developer discovers that the service is missing privileges. Which change to the header in line 4 of the script results in the code 200?

A. header = { ג€Authentication ג€: ג €Bearer YOUR_TOKEN {€ג

B. header = { ג€Authentication Bearer ג€ : ג €YOUR_TOKEN €ג

C. header = { ג€Authorization Bearer ג€ : ג €YOUR_TOKEN {€ג

D. header = { ג€Authorization ג€ : ג €Bearer YOUR_TOKEN {€ג

Correct Answer: D

Question #86  

DRAG DROP –

Drag and drop the HTTP methods from the left onto their generally accepted corresponding create, read, update, and delete operations on the right.

Select and Place:

Question #87  

DRAG DROP –

Refer to the exhibit.

Drag and drop the code from the left onto the item numbers on the right to complete the Meraki code to obtain a list of clients which have used this network.

Select and Place:

Question #88  

In Python, which expression checks whether the script returns a success status code when the Requests library is used?

A. response.status_code == requests.codes.ok

B. response.code == requests.codes.ok

C. response.status_code == requests.ok

D. response.status_code != requests.codes.ok

Correct Answer: A

Reference:

https://realpython.com/python-requests/

Question #89  

Refer to the exhibit. The script returns an output of 401. To use the supplied URL, an HTTP GET request must be sent with an Authorization header.

The header value is a base64 encoded concatenation of the username and password. Which action must be taken to return an output of 200?

A. Change the verify=False setting in the request to verify=True to enable HTTP Basic authentication.

B. Verify that the username and password values imported from the configuration file are still valid.

C. Insert an Authorization header with the values username:password from the supplied configuration file.

D. Modify the method from LOGIN to GET and supply the username:password value as JSON payload.

Correct Answer: D

Question #90  

Refer to the exhibit. A Python code has been written to query a device. The executed code results in the error shown. Which action resolves the problem?

A. import json

B. requests( ג€GET ג€, base_url + request_url, cookies=cookies)

C. pip install requests

D. import requests

Correct Answer: D

Question #91  

Which REST architectural constraint indicates that no client context should be stored on the server between requests?

A. cacheable

B. stateless

C. uniform interface

D. client-server

Correct Answer: B

Reference:

https://developer.cisco.com/docs/nx-os/#!representational-state-transfer-rest

Question #92  

Which HTTP code group is issued when a request is received successfully, understood, and processed?

A. 2xx

B. 3xx

C. 4xx

D. 5xx

Correct Answer: A

Question #93  

A developer creates a web application that receives a username and password and uses them to sync the credentials to other services through

HTTPS. API keys to services are part of the configuration files of the application, but the credentials to the database that stores the synchronization logs are obtained through an external vault service. What is the security issue in this scenario?

A. Communication between the application and the services is not encrypted.

B. The database credentials should be stored in the configuration files so that they are secured on the same server.

C. The API keys are stored in the configuration files but should be stored in the vault service.

D. The synchronization logs should be encrypted and not stored in a relational database.

Correct Answer: C

Question #94  

Refer to the exhibit. An engineer writes a Python script that uses two different API calls to query Cisco DNA Center for the number of interfaces on a device. The engineer notices that the two API calls produce different results. Why are fewer interfaces returned for the same device when the ‘get_all_interfaces’ API call is used?

A. times out

B. rate limit

C. pagination

D. invalid password

Correct Answer: C

Question #95  

DRAG DROP –

Drag and drop the code snippets from the bottom into the Python script to write API output to a csv file. Not all options are used.

Select and Place:

Correct Answer:

Question #96  

DRAG DROP –

Drag and drop the code snippets from the bottom to the blanks in the code to test the API response through the Python unittest library. Not all options are used.

Select and Place:

Correct Answer:

Question #97  

DRAG DROP –

Refer to the exhibit. A developer is creating a Python script to obtain a list of HTTP servers on a network named office_east by using the Cisco

Meraki API. The request has these requirements:

* Must time out if the response is not received within 2 seconds.

* Must utilize client certificates and SSL certificate verification.

* Must utilize basic authentication that uses a username of admin and a password of cisco.

* Must save the response to an object named response.

Drag and drop the code snippets from the bottom onto the blanks in the code to meet the requirements. Not all options are used.

Select and Place:

Correct Answer:

Question #98  

DRAG DROP –

Drag and drop the code snippets from the bottom to the blanks in the code to complete the HTTP response. Not all options are used.

Select and Place:

Correct Answer:

Question #99  

Refer to the exhibit. A collaboration engineer has developed a script to automate the gathering of information by providing the email address of the individual.

When the engineer tests the script, a 401 error is received. Which command fixes the script?

A. Add ג€Authorization ג€: ג €Bearer <WEBEX_TOKEN> ג€ to the headers.

B. Add ג€Authentication ג€: ג €Basic <WEBEX_TOKEN> ג€ in the base_url after ג€https:// .€ג

C. Add ג€<Authorization>:<password>@ ג€ in the base_url after ג€https:// .€ג

D. Add ג€Authentication ג€: ג €Bearer <WEBEX_TOKEN> ג€ to the headers.

Correct Answer: A

Question #100  

A developer is attempting to retrieve all the messages from a Cisco Webex space. The server responds by sending the first 1,000 messages. The developer must make additional requests to retrieve the rest of the messages. Which API constraint is described in this scenario?

A. payload limiting

B. throttling

C. pagination

D. rate limiting

Correct Answer: C

Pages: 1 2


Tags: