Cisco
200-901 · Question #72
FILL BLANK Fill in the blanks to complete the Python script to request a service ticket using the APIC-EM REST API for the user "devnetuser". import requests import json controller = 'devnetapi.cisco.
Sign in or unlock 200-901 to reveal the answer and full explanation for question #72. The question stem and answer options stay visible for context.
Understanding and Using APIs
Question
FILL BLANK Fill in the blanks to complete the Python script to request a service ticket using the APIC-EM REST API for the user "devnetuser". import requests import json controller = 'devnetapi.cisco.com/sandbox/apic_em' url = "https://" + controller + "api/va/ticket" payload = {'username': '_________________', 'password': '370940885'} header = {'Content-type': 'application.json'} response = _______________________.post(url, data=json.dumps(payload), \ headers= ______________________, verify=False) r_json = response.json() print(r_json) ticket = r_json["response"]["serviceTicket"] print(ticket) Answer: See explanation below
Options
- Adevnetuser, requests, header
Unlock 200-901 to see the answer
You've previewed enough free 200-901 questions. Unlock 200-901 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#Python scripting#REST API#requests library#API authentication