200-901 APIs explained

Updated October 9, 2026

Understanding and Using APIs is the heaviest single domain of 200-901 at 20%, and the skills spill into the platform and automation domains as well. It tests whether you can build a REST request from documentation, read the response, and work out what went wrong from a status code. Expect short code fragments and error scenarios.

The anatomy of a REST request

A request has a method, a URL (with path and query parameters), headers and an optional body. A response has a status code, headers and a body, usually JSON.

MethodTypical useIdempotent
GETReadYes
POSTCreateNo
PUTReplaceYes
PATCHChange partNot guaranteed
DELETERemoveYes

Path parameters identify a resource (/devices/123), query parameters filter (?limit=10), and the headers carry metadata such as Content-Type: application/json and authentication.

Status codes

FamilyMeaningExamples
2xxSuccess200 OK, 201 Created, 204 No Content
3xxRedirect301, 302
4xxClient error400 bad request, 401 unauthenticated, 403 forbidden, 404 not found, 409 conflict, 429 too many requests
5xxServer error500, 502, 503

The difference between 401 and 403 is a frequent question: 401 means the server does not know who you are (missing or invalid credentials), and 403 means it knows and refuses. A 404 means check the URL; a 400 means check the body or parameters; a 5xx means the server failed and retrying later may help.

Troubleshooting from the response

Combine three pieces: the status code, the request you sent and the documentation. If a documented endpoint returns 404, compare the path. If it returns 400, compare the body fields and the Content-Type. If it returns 401 after working earlier, the token has probably expired.

Authentication

MechanismHow it is sent
BasicAuthorization: Basic followed by base64 of username:password
Custom token / bearerA token obtained from a login call, sent in a header
API keyA key in a header or query string, issued once from a console

Basic authentication over plain HTTP exposes the credentials, so it must use HTTPS. Base64 is encoding, not encryption.

Constraints when consuming APIs

Rate limits return 429, often with a Retry-After header. Large lists are paginated, so you follow a link header or a page parameter until the end. Requests need timeouts. Calls can fail transiently, which calls for limited retries with backoff.

Webhooks

A webhook reverses the direction: instead of polling, you give the service a URL and it sends an HTTP POST to you when an event happens. It is more efficient than polling and nearly real time. Your receiver must be reachable, should answer quickly with a 2xx code, and should verify the sender, for example with a shared secret or signature.

API styles

REST uses resources and HTTP methods. RPC calls a named procedure (JSON-RPC and gRPC are examples). A synchronous call waits for the answer; an asynchronous one returns at once and delivers the result later, for example through polling a job ID or a webhook.

Python and the requests library

import requests
r = requests.get(
    "https://api.example.com/v1/devices",
    headers={"Authorization": "Bearer TOKEN"},
    params={"limit": 10},
    timeout=10,
)
r.raise_for_status()
for d in r.json()["items"]:
    print(d["name"])

json= sends a dictionary as a JSON body and sets the content type, while .json() parses a response. raise_for_status() raises an exception on 4xx and 5xx.

Example questions

Question 1. A script calls a REST API with a valid token but receives HTTP 403. What does this indicate?

  • A. The token is missing from the request
  • B. The URL path does not exist
  • C. The authenticated account lacks permission for the action
  • D. The server has failed internally
Show answer

Answer: C

403 means the server authenticated the caller but the account is not permitted to perform the action. 401 would indicate missing or invalid credentials. 404 would indicate a wrong resource path. A 5xx code would indicate a server fault, not a permissions problem.

Want more questions like this? Full 200-901 practice tests →

Question 2. A monitoring tool polls a service every 5 seconds to find out when a build finishes, which wastes requests. Which approach is better?

  • A. Register a webhook that the service calls when the build finishes
  • B. Poll every second instead
  • C. Poll once per hour
  • D. Switch the polling calls to basic authentication
Show answer

Answer: A

A webhook lets the service call your URL when the event occurs, so there is no polling. Shortening the interval increases waste. A longer interval delays detection. Basic authentication is about credentials and does not change how events are delivered.

Want more questions like this? Full 200-901 practice tests →

Question 3. A Python script receives HTTP 429 from an API after sending many requests quickly. What is the appropriate response?

  • A. Replace the token with a new one and continue at the same speed
  • B. Change every GET to a POST
  • C. Ignore the error and continue
  • D. Wait for the time in Retry-After, then retry with backoff
Show answer

Answer: D

429 means the rate limit was exceeded, so the client should slow down, honour any Retry-After header and retry with backoff. Changing credentials does not remove a rate limit. Changing the method to POST does not avoid it. Ignoring the error and continuing keeps hitting the limit.

Want more questions like this? Full 200-901 practice tests →

Next: Cisco platforms and development. Revisit the cheat sheet for the status code table.