CiscoCisco
200-901 · Question #201
200-901 Question #201: Real Exam Question with Answer & Explanation
Sign in or unlock 200-901 to reveal the answer and full explanation for question #201. The question stem and answer options stay visible for context.
Understanding and Using APIs
Question
Refer to the exhibit. The documentation outlines how to use credentials for the AMP API. Which script successfully performs an API call using basic authentication? A. B. C. D.
Options
- Aimport requests amp_auth_token = 'albc2c3d4e5f6g7h8i9j0_k1l2m3n4o5p6' url = 'https://api.amp.cisco.com/v1/version' request = requests.get(url, auth=(amp_auth_token)) print(request.json())
- Bimport requests amp_client_id = 'albc2c3d4e5f6g7h8i9j0' amp_api_key = 'albc2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6' url = 'https://api.amp.cisco.com/v1/version' request = requests.get(url, auth=(amp_client_id, amp_api_key)) print(request.json())
- Cimport requests amp_client_id = 'albc2c3d4e5f6g7h8i9j0' amp_api_key = 'albc2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6' url = 'https://api.amp.cisco.com/v1/version' request = requests.get(url), auth=(amp_client_id, amp_api_key)) print(request.json())
- Dimport requests amp_client_id = 'albc2c3d4e5f6g7h8i9j0' amp_login_password = 'l0g1n_p@ssw0rd' url = 'https://api.amp.cisco.com/v1/version' request = requests.get(url, auth=(amp_client_id, amp_login_password)) print(request.json())
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
#API Authentication#Basic Authentication#HTTP Requests#Scripting