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

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

Question

DRAG DROP -

import requests

url = “https: //api.ciscospark.com/v1/rooms’
bearer “BEARER_TOKEN_ HERE”
headers = {“content-type”: “application/json”, “Authorization”: “Bearer ” + bearer}

response = requests.get (url, headers-headers, verify-False)

response
tem) 3S) requests.exceptions.HTTPError as err:
if response.status code — //item! 4):
print (“Check Bearer Token”)
elif response.status_code item 5:
print (“Check API Endpoint uri”)
elif response.status_code — 500:
print (“Server Error, Try again Later”)
else:
print ((“HTTP Error”) + str(err))

A developer is creating a Python script to use the Webex Teams REST API to list joined spaces, and gracefully handle and print the errors it receives.

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.

Select and Place:

Answer Area

401 <item 1>
404 <item 2>
ty <item 3>
except <item 4>

raise_for_status()

<item 5>

Explanations

Answer Area

401 try

404 raise_for_status()

try except
except aan

raise_for_status()

404