PYTHON REST API INTEGRATION,
AUTHENTICATION & SECURE DATA
EXCHANGE
20 tested labs | 60 original scenarios | 5 integrated projects
UNOFFICIAL INDEPENDENT EDUCATIONAL PRACTICE. Not affiliated with, endorsed by, or sponsored by Western Governors
University. No official WGU assessment questions, rubrics, or ready-to-submit solutions.
2026/2027 study edition • Fictional services and sample data • Python 3.11+ recommended
WGU D522 • UNOFFICIAL INDEPENDENT PRACTICE • 2026/2027 1
, How to use this workbook
• Read the concept section before attempting labs.
• For each lab, predict output, run the script, then compare the verified result.
• All example HTTP responses are local simulations: no external credentials or network access required.
• Use a dedicated virtual environment; never put real tokens into screenshots or Git repositories.
• For each scenario, select one best answer before consulting the yellow answer panel.
• Project datasets are fictional and intended for repeatable practice.
Accuracy boundary: OAuth concepts are explained using safe simulations, not a live identity provider. Production OAuth integrations
require provider documentation, TLS validation, token lifecycle controls, and security review.
WGU D522 • UNOFFICIAL INDEPENDENT PRACTICE • 2026/2027 2
, Contents and skill map
• Pages 5–16: Twelve concept and decision-reference lessons
• Pages 17–56: Twenty labs, two pages each
• Pages 57–71: Five integrated fictional projects, three pages each
• Pages 72–89: Sixty distinct scenario questions and answer explanations
• Pages 90–94: Quick references, troubleshooting, testing and progress tracker
Core skills: HTTP semantics, JSON validation, secure authentication, pagination, error classification, CSV export, test doubles,
safe automation, observability.
WGU D522 • UNOFFICIAL INDEPENDENT PRACTICE • 2026/2027 3
, Prerequisites and testing approach
Install Python 3.11 or newer. Standard-library-only examples run offline. Each lab has a self-contained runnable script, local
fixtures, and assert-based tests. Use python -m unittest or pytest for your own extensions.
python --version
python -m venv .venv
# activate the environment for your OS
python -m pip install pytest requests
Do not execute unfamiliar commands on production systems. Use fictional credentials and sample datasets only. All project
scripts operate on in-memory objects or temporary directories.
Verification record: The 20 code samples and five project examples are executed as standalone scripts during PDF production; this
validates the illustrated local behavior, not external API interoperability.
WGU D522 • UNOFFICIAL INDEPENDENT PRACTICE • 2026/2027 4