API Maker
The backend engine for the AI era
HooksEpisode 18 6:01 11 chapters October 2026
A rule written once, for a whole database, one table or one API: pre hooks run before the API, post hooks after it. Watch the hooks of Calm Home cap reads at fifty rows, keep their order, mask phone numbers in answers, get tested alone with Test Hooks, and see a loop between hooks stopped by API Maker.
In the playlists The complete course Custom APIs & code
Code before and after every API : a rule written once, for a whole database, one table or one API. In this video, the hooks of Calm Home : reads capped, orders sorted, phones masked, and a loop stopped.
A rule for every endpoint usually means the same check pasted into every handler, one handler forgotten, and the rule broken there, and a change made in twenty places. With API Maker, a hook is written once, for a database, a table or one API, it runs for every caller of those APIs, the ones of today and the ones added later, and you try it alone before it runs for everyone.
In this video : where hooks run, a hook for a whole database, the order of the hooks, a hook which changes the answer, a hook of one API and Test Hooks, and a loop, stopped.
Hooks have four levels : an instance, a database, a table, and one API. Pre hooks run before the API, from the outside in : they see the request, change it, answer in its place, or refuse it. Post hooks run after it, from the inside out, with the answer in g.res.output.
Instance API, mysql : the database sales, and its pre hooks. Add Hook, Cap reads, Hook Code. A read of any table of sales gives at most fifty rows, and order_events holds a million. Your own code is trusted, only Get all is capped, and a log line says so. Save. The row of sales counts one pre hook. API Testing, mysql, sales, order_events, Get all, with no limit. Send : fifty rows, not a million.
The Logs tab : the line of Cap reads.
Now orders, Get all. Two pre hooks of this table sort the newest first and leave cancelled orders out. Send : CH-2026-0180, the newest order, first, and no cancelled order. The Logs : the hook of the database ran first, then the two hooks of the table, in their order. That order is set in one place. API Testing, Collection Hooks : mysql, sales, orders, and the hook Newest first, with its code.
Change Hook Orders : the hooks of a list run from the top to the bottom. Arrows move a hook, a tick skips it, and Save keeps the order. Close.
A post hook now. postgres, crm, the post hooks of customers. Add Hook, Mask phone, its code : the answer is in g.res.output, and every phone keeps its last four digits. Save, and close. API Testing, postgres, crm, customers, Get all. Send : every phone masked, for every application which calls an API of this table.
One level down : the hooks of one API, Get all of customers, in its Post Hooks tab. The hook of the table shows there too, in the order the hooks run. Add New, Full name, its code : a full name on every row, and a log line. Saved. Send : the full name, and the phone still masked. The hook of the API ran, then the hook of the table.
Test Hooks : a version, and one hook. Its code, which you can change here and try without saving. Send : only the hook ran. No API, so no rows : data is null, and its log line says zero rows.
A last hook, with a mistake. Customer count adds the total to every answer of customers. It asks for the count with skipHookRunning false : the hooks of the count run too, this hook among them. And it has no isApiRequestFromUser guard : it would count, and count again, for ever. API Testing, postgres, crm, customers, Get all. Send : five hundred. The same count was called again while the first one still ran : duplicate API calls or cycle detected, with the sequence of the calls.
The rows of the Get all stay, and the loop stops at its second turn.
A pre hook which returns a value answers in the place of the API, and a hook which throws refuses the call. Calls from your own code skip hooks, unless skipHookRunning is false. Active turns a hook off, and Groups run it for some applications only : video twenty six. An answer from the cache runs no hook, and an API and all its hooks are one language.
A rule in one place, for every API of a database or a table, today and tomorrow. Logs which say what each hook did, in the order it ran. So an endpoint written by an AI assistant gets the same caps and the same masks, without knowing about them.
To sum up. Four levels, before and after the API. A rule for a whole database, in one hook. Answers reshaped after the API. A hook tried alone with Test Hooks. And loops stopped by API Maker. Next : system APIs, ready-made building blocks. API Maker. Build faster, spend smarter, deliver better.
Length 4:31System APIs
Length 4:48Utility classes
Length 5:14Custom APIs
Length 9:04Custom APIs