Use case:

example.com/taxonomy_term.json?bundle=product

is not possible, neither is filtering by vid.

Daring to raise prio as no workaround.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

axel.rutz created an issue. See original summary.

geek-merlin’s picture

Status: Active » Needs review
FileSize
1.67 KB

Patch flying in that works for me.

m.stenta’s picture

FYI: it is actually possible to filter by vocabulary ID, but you need to use "?vocabulary=1" instead of "?vid=1".

So when I want to filter terms to a specific vocabulary's machine name, I will first make a request to /taxonomy_vocabulary.json to get a list of vocabularies, search for the machine name I want to get the vid, and then do a second request for terms filtered by that vid.

A general purpose bundle filter would allow this to be done with a single request. So I support this. :-)

m.stenta’s picture

Status: Needs review » Reviewed & tested by the community

I tested this patch with two different entity types and it seems to work perfectly. The actual code change is dead simple, so I think we can mark this RTBC.