Consuming REST APIs at Scale
Unlock the complete study guide + 1,040 practice questions across 16 full exams.
Bundled into the existing Designing, Deploying and Managing Network Automation Systems premium course — no separate purchase.
14-day money-back guarantee — no questions asked.
Included in this chapter:
- At scale, a REST client is a loop
- Paginate until the stop signal
- Stay under the rate ceiling, back off when pushed
- Authenticate once, then carry the credential
- Retry only what is transient and idempotent
- What the exam stem looks like
Four concerns of consuming a REST API at scale
| Concern | What breaks at scale | The rule | Cisco signal to watch |
|---|---|---|---|
| Completeness | One response holds only the first page | Loop until the stop signal | Short page (offset/limit) or no rel=next (cursor) |
| Rate ceiling | Too many requests too fast are rejected | Throttle under the limit; honor Retry-After | 429 Too Many Requests with Retry-After |
| Authentication | Re-login on every call is wasteful | Log in once, cache and reuse; refresh on 401 | X-Auth-Token / JSESSIONID + X-XSRF-TOKEN |
| Error handling | Some failures a retry cures, some it cannot | Retry only transient AND idempotent | 2xx / 3xx / 4xx / 5xx status class |
Decision tree
Cheat sheet
Unlock with Premium — includes all practice exams and the complete study guide.
References
- https://developer.cisco.com/docs/catalyst-center/
- https://developer.cisco.com/meraki/api-v1/pagination/
- https://developer.cisco.com/docs/sdwan/authentication/
- https://developer.cisco.com/docs/catalyst-center/get-device-list/
- https://www.rfc-editor.org/rfc/rfc8288
- https://requests.readthedocs.io/en/latest/api/
- https://www.rfc-editor.org/rfc/rfc6585
- https://developer.cisco.com/meraki/api-v1/rate-limit/
- https://www.rfc-editor.org/rfc/rfc9110
- https://docs.python.org/3/library/email.utils.html
- https://docs.python.org/3/library/random.html
- https://requests.readthedocs.io/en/latest/user/quickstart/
- https://docs.python.org/3/library/asyncio-sync.html
- https://datatracker.ietf.org/doc/html/rfc6749
- https://datatracker.ietf.org/doc/html/rfc6750
- https://developer.cisco.com/docs/catalyst-center/authentication/
- https://datatracker.ietf.org/doc/html/rfc9110
- https://datatracker.ietf.org/doc/html/rfc8040
- https://requests.readthedocs.io/en/latest/user/advanced/