hardMultiple ChoiceObjective-mapped
200-901 Practice Question: A network automation team uses Ansible to manage…
A network automation team uses Ansible to manage Cisco ACI fabrics. They have a playbook that creates application profiles using the 'aci_ap' module. Recently, they started using a new Python script that directly uses the Cisco ACI REST API to perform the same tasks. The script often fails with a 403 Forbidden error, although the Ansible playbook works fine. The authentication method is the same: basic authentication over HTTPS. The API user has the same privileges. Which of the following is the most likely cause?
⚠ Common exam trap
It's easy for candidates to confuse a 403 Forbidden with a missing Content-Type or protocol mismatch, but Cisco specifically tests the understanding that APIC requires session cookie management for REST API calls beyond the initial login.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The script is not including the APIC cookie in subsequent requests
The 403 Forbidden error indicates that the APIC is rejecting the request due to authentication or authorization failure. Ansible's 'aci_ap' module automatically handles session cookies by logging in once and reusing the APIC cookie for subsequent requests. The Python script likely fails because it does not capture and include the session cookie returned by the APIC login response in its subsequent REST API calls, causing the APIC to treat each request as unauthenticated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The script is not including the APIC cookie in subsequent requests
Why this is correct
ACI requires a session cookie; missing it results in 403.
- ✗
The script is not setting the proper Content-Type header for POST requests
Why it's wrong here
Missing Content-Type typically yields 400 Bad Request.
- ✗
The script is using HTTP instead of HTTPS
Why it's wrong here
Using HTTP would likely cause a redirect or error, but the error is 403, not a connection issue.
- ✗
The API user's password was changed between runs
Why it's wrong here
If the password changed, the Ansible playbook would also fail.
Go deeper
Related to this question
About these practice questions
One of 989 original 200-901 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 200-901 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 200-901 exam.