Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Thank you for an excellent module. It's working very well, but I can't seem to wrap my head around following:
I have a site with a number of taxonomy vocabularies. I would like to expose one and only one of them through and endpoint, and have been trying to do this with the Services module, however no luck yet.
Is there a way to limit (in UI or in code) which taxonomy vocabularies are exposed through an endpoint? My ideal situation would be to create an endpoint per vocabulary, would that be possible?
Thanks,
Mark.
Comments
Comment #2
tyler.frankenstein CreditAttribution: tyler.frankenstein commentedYou can use hook_services_resources_alter() to change the access callback function to your own custom function. Then in that custom function, inspect the incoming arguments, and if it is not equal to your desired vocabulary ID, then you can throw an access denied by returning
FALSE
.Comment #3
cpdp CreditAttribution: cpdp as a volunteer commentedTyler, thank you very much for your prompt reply. Will do as suggested, very clever.
Kind regards,
Mark.