Extension Hook System Collections
System Collections
<system-collection>should be replaced with the system collection name without thedirectus_prefix. For example, listening for new records in thedirectus_userscollection becomesusers.create.
- The
collectionsandfieldssystem collections do not emit areadevent. Thefilescollection does not emit acreateorupdateevent on file upload. Therelationscollection does not emit adeleteevent.
Get once-a-month release notes & real‑world code tips...no fluff. 🐰
Extension Hook Footguns
Directus reads system collections to operate. Be careful when modifying the output of system collection read or query events. Also ensure not to directly or indirectly emit the same event your hook is handling or you will create an infinite loop.
Extensions Api
This extension type is loaded into the Directus process. They can use the provided services exported by the @directus/extensions-sdk package and can be written in JavaScript or TypeScript.