QuestionQ483

Using APIs

Refer to the exhibit.

Question Image

Drag the code snippets onto the Python-script blanks to list all rooms and use pagination to limit the results to five through the Cisco Webex API. Not every option is used.

Drag & Drop
{}
access-code
GET
POST
max=5
limit=5
Bearer
import requests

url = "https://api.ciscospark.com/v1/rooms?"

payload=

headers = {
    'Authorization': ' #fbhkvkfflijhiqfy?2878-vzojby-eavohjiavy-534c-
4556-9cf8-df9df90f516e'
}

response = requests.request("", url, headers=headers, data=payload)
print(response.text)
Explanation

Listing rooms is a GET operation. The max query parameter controls the number of results per page, so max=5 limits the response to five rooms. Webex API requests authenticate with an Authorization: Bearer <access token> header; no request-body data is needed for this retrieval operation.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!