Question 45 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question 45 of 100 from exam 350-901-DEVCOR: Developing Applications Using Cisco Core Platforms and APIs

Question

DRAG DROP -

import request, time

bearer = “BEARER TOKEN HERE”

url = ‘https: //api.ciscopark.com/v1/rooms’

headers = (‘Content-Type’: ‘application/yang-datatjson’ ,
‘Accept’: ‘application/yang-data+json’ ,
‘Authorization’: Bearer ‘+ bearer_token}

while True:
response = requests.get(url, headers=headers, verify=False)
status =
if(status 200):
print (“Success”)
break
elif (status ==
sleep_time = int (
print(‘Too Many requests. Sleeping for ‘ + str(sleep_time) + \itamAl)’)
time. sleep (sleep_time)
else:
print (“Error code” + str(status) + “detected.”)

break

Refer to the exhibit.

A developer is creating a Python script to use the Webex Teams REST API to list joined spaces, retry after the server-specified amount of time if a 'Too many requests' response is received, and print any other error that is received.

Drag and drop the code snippets from the left onto the item numbers on the right that match the missing sections in the exhibit to complete the script.

Not all code snippets are used.

Select and Place:

Answer Area

405 <item 1>
429 <item 2>
minutes <item 3>
seconds <item 4>

response headers[ Retry-After’]

response.header

response status_code

response status

Explanations

Answer Area

405 response status_code
429 429
minutes response headers[ Retry-After]
seconds seconds

response headers[ Retry-After’]

response.header

response status_code

response status