QuestionQ16
Network Automation FoundationDrag the appropriate code snippets into the Python code to create a new WebApp application profile by using the ACI REST API. Not every option is used.
Drag & Drop
import requests response = requests.post( 'https://apic/api/aaaLogin.json', json={"aaaUser": {"attributes": {"name": "admin","pwd": "ciscop@dt"}}}, verify=False) token = response.json()['imdata'][0]['aaaLogin']['attributes']['token'] url = 'https://apic/api/mo/uni/tn-MyCompany.xml' headers = {'Content-Type': 'text/xml'} cookie = {'APIC-cookie': token} response = print(response.text)
Community Discussion