Hacker News new | ask | show | jobs
by prog5 1597 days ago
This looks amazing thank you. I'm curious about the REST API part. Have you used that before? How configureable is it? It sounds like a scaffold of some sort... but, what if I needed to do some custom data processing on the data before returning it in the API, are there hooks for that?
2 comments

I'm not an expert since I used it for a few projects about a year ago. But the web hooks are mostly for when items are added/updated/deleted.

They have pretty useful API parameters for transforming images. But my initial instinct is to say that you'll have to do custom data processing in the front end or somewhere else, since the API it generates just mirrors the structure of your database. The nice thing about this approach is that you can always remove Directus from a project and your database will function as normal.

They also have pretty use docs which you can check out for your usecase:

https://docs.directus.io/reference/introduction/

edit: I should also add that you can add your own custom modules, but I never really explored that too much.

Hey prog5, you should check out Payload CMS if you need that type of flexibility and extensibility. Payload has Hooks that allow you to do exactly what you're saying.