r/agentico • u/larebelionlabs • Oct 21 '26
REST APIs for Beginners: From Your First Request to an AI That Can Use It
https://youtube.com/watch?v=wLME3KJ97PM&si=fRoGOgvwHtsd06CGYou build a tiny, fictional coffee-shop order API from an OpenAPI contract with the HAPI CLI, call it, break it on purpose, and then open a second door for AI with one flag: `hapi serve --mcp`.
In this video, you learn:
- What an API is, explained with a restaurant waiter
- The five parts of a request: method, URL, query parameters, headers and body
- Status codes (200, 201, 400, 401, 404, 500) and JSON bodies
- Why you start with the contract (OpenAPI, which many people still call Swagger)
- From contract to code: `hapi init` generates a controller; you add a small service
- Reads vs. writes, and why real APIs need authentication and input validation
- What an AI still needs to use your API, and how MCP (Model Context Protocol) fills the gap
- How your
operationIdsbecome MCP tools, with read-only hints, on the same code
Starter repo: https://github.com/la-rebelion/rest-apis-for-beginners
HAPI CLI: https://hapi.mcp.com.ai
Video built using Qontent Tube Studio: https://qontent.tube
1
Upvotes