QuestionQ275

Understanding and Using APIs

Drag the code options into the missing boxes to obtain a list of network devices by using the Cisco Meraki API. Not all options are used.

Drag & Drop
teams
networks
devices
GET
POST
encrypt
encode
import requests

url = "https://api.meraki.com/api/v0//{{networkId}}/"

payload = {}
headers = {
    'Accept': '*/*'
}

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

print(response.text.('utf8'))
Explanation

Cisco Meraki’s network-device listing operation uses GET /networks/{networkId}/devices. Python’s encode('utf8') converts the response text to UTF-8 bytes; encrypt is not the relevant string operation.

Learn more

Community Discussion

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