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

cpdp created an issue. See original summary.

tyler.frankenstein’s picture

You 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.

cpdp’s picture

Status: Active » Closed (works as designed)

Tyler, thank you very much for your prompt reply. Will do as suggested, very clever.

Kind regards,
Mark.