Hi, could anyone point me in the right direction with regards to creating a custom method using the silverstripe-restfulapi module. I have a Categories DataObject with many_many Venues DataObject relationship. I'd like to get all the related Venues.
I can get the related Venue IDs - {"ID":6,"CategoryName":"Spend the Night","Venues":[3,4]}] but I don't want to have to make too many requests in order to get all the Venues. It would be easier if I could just retrieve them by calling a custom method, something like api/Category/GetVenues(6).
Or maybe there is a much simpler way that I'm missing?
Thanks in advance.
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.