You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We want to build our own custom API that will serve the data in a similar structure as the built in Statamic REST API. The easiest way for us would be to just be able to call the Statamic API from our own controllers and then perform different actions on the data before serving it to our Frontend. It could be to remove or append data according to some parameters.
The Statamic API is great at serving tree structures, collections etc. But we really need a more granular control of what comes back. Also we need to use some custom models in conjunction with entries and collections.
Before I dig any deeper. What would be the preferred way to do this?
Should we the Statamic API programmatically and then perform actions on the data before serving it.
Fetch data and completely build the response ourselves.
Either way. Could anyone point me in any direction how to easily serve custom structured json representations of the content and structure created with Statamic?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We want to build our own custom API that will serve the data in a similar structure as the built in Statamic REST API. The easiest way for us would be to just be able to call the Statamic API from our own controllers and then perform different actions on the data before serving it to our Frontend. It could be to remove or append data according to some parameters.
The Statamic API is great at serving tree structures, collections etc. But we really need a more granular control of what comes back. Also we need to use some custom models in conjunction with entries and collections.
Before I dig any deeper. What would be the preferred way to do this?
Either way. Could anyone point me in any direction how to easily serve custom structured json representations of the content and structure created with Statamic?
Beta Was this translation helpful? Give feedback.
All reactions