API Foundations
What an API actually is, learned by calling real ones. Requests, JSON, keys, methods and errors, with every concept tied to a call you make yourself.
API Foundations badgeComplete all 5 lessons to earn it. About 1.7 hours.
0 of 5 lessonsStart course
What you'll be able to do
- Make a real API request from the terminal, the browser and code
- Read a JSON response and pull out the field you need
- Authenticate with an API key, and keep that key out of public code
- Choose between GET and POST, and send parameters the right way
- Diagnose a failed call from its status code and error message
This course is one of three skill areas on exam APV-100, APIVerve Certified Developer: API Fundamentals: 10 of its 30 questions. See the full path
Syllabus
- Make your first API callStart hereHow to make your first API call, step by step: send a real request with curl, then from Node fetch, and read the JSON response that comes back.
- Reading JSON responsesHow to read a JSON API response: the six JSON types, nested objects, arrays, picking one field out of data, and the difference between null and missing.
- API keys and authenticationAPI key authentication explained with real calls: send a key in a header, read what a missing or wrong key returns, and keep keys out of front-end code and git.
- GET vs POST, and sending parametersGET vs POST requests with real API calls: build query strings safely, URL-encode special characters, send a JSON body, and know which method an API expects.
- Status codes and errorsAPI status codes explained with real failures: what 400, 401, 403, 404, 429 and 5xx mean, how to read the error message, and which errors are worth retrying.