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 =…
The correct answer is A. devnetuser, requests, header. The script requires 'devnetuser' as the username string, 'requests' as the HTTP library, and 'header' as the headers variable to complete the APIC-EM service ticket POST request.
Question
Options
- Adevnetuser, requests, header
How the community answered
(41 responses)- A100% (41)
Why each option
The script requires 'devnetuser' as the username string, 'requests' as the HTTP library, and 'header' as the headers variable to complete the APIC-EM service ticket POST request.
The first blank is 'devnetuser', matching the username specified in the question and used as the credential in the payload dictionary. The second blank is 'requests', the imported HTTP library whose .post() method sends the API call. The third blank is 'header', the variable defined earlier in the script holding the Content-type dictionary passed to the headers argument.
Concept tested: Python requests library usage for APIC-EM REST API authentication
Source: https://developer.cisco.com/docs/apic-em/
Topics
Community Discussion
No community discussion yet for this question.