Score:0

How can I get multiple results from the same filter with the REST API?

us flag
jfc

I am using the Drupal REST API UI module to create filters I can search. I have one for a page type called Category. If I want to search for category 52 I can use api/resources/?category_id=52.

I have some scenarios where I need to populate results from different categories. So for example I want all pages with category 52 and 57 to appear. If I try api/resources/?category_id=52&category_id=57, it only loads the results from the last filter, which is 57.

Is there a way to show results from more than 1 category?

id flag
Does this work? `api/resources/?category_id[]=52&category_id[]=57`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.