REST API Answer not filtering
Application Type
Reactive

Hi guys,

I am trying to return data from an API (comic vine) and I am unable to filter it by the input I want. 

When debugging, the text input of the server action, where I have the GET from API, is correctly passing the text value I want but the get method from API always return a full list of  results (like I wasn't passing the filter value).

Note: the text I am passing as input is a filter for the tittle of the comic, so that the API GET method should return only the comics with that text on it. 

When I run the test of the REST action, the response is a 200 and I get the result I want, with the proper filter. 

I have tested returning JASON or just plain text and then deserialising it, and always end with the same result.

Please let me know if you need more info. 

Thank you so much!

Solution

Then I would suggest keep the parameter as {Title} only  "filter={Title}"

and append the word "name:" in in the filter Parameter, so when you want to filter by batman you enter "name:batman"

Totally was missing it! Thank you so much :) 

Hello Bruno, 

I think I got it to work!

I only changed the way the filter was being sent on your .oml like what Noun suggested.

Hope it works for you too!

Paulo Rosário

Hi


are you sure about the filter part?  should it be "filter={Title}" without "name:"


Yeah it has to have the name on it, otherwise it won´'t work (not even in the test field).

Attached a screenshot of the API

Screenshot 2022-02-23 at 13.24.46.png

Solution

Then I would suggest keep the parameter as {Title} only  "filter={Title}"

and append the word "name:" in in the filter Parameter, so when you want to filter by batman you enter "name:batman"

Totally was missing it! Thank you so much :) 

Hello Bruno ,

I tested the API and was able to apply the filter. 

Im attaching the oml so you can take a look. 

Cool API by the way :D

Hope it helps! 

Paulo Rosário

ComicVineAPI.oml

Hi guys,


thank you so much for all of the work. 

So my problem is not with the API itself. Tests of the API work perfectly and returns all the issues I want. The problem is when I pass to the action side. Meaning I try to send an input to the API request of Batman (for instance). It receives it but then it always returns all the results like I have no filter applying. 


Please have a look into the file I attached. 

(note that I have removed the key on purpose, but I am testing it with my own) 

ComicVineAPI.oml

Hello Bruno, 

I think I got it to work!

I only changed the way the filter was being sent on your .oml like what Noun suggested.

Hope it works for you too!

Paulo Rosário

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.