Hi, I'm trying to GET a filtered data from a REST API. To get those data, there's a few parameter that need to be passed. Here are some of the parameters that need to be passed in postman.
I do know that i need to just add {query} if it's a single value (skip or take)
e.g. http://test.com/Filter/skip={skip}&take={take}
But how do i pass the parameter of a list (sort and filter) into the method URL?Do i do the same thing, e.g. http://test.com/Filter/skip={skip}&take={take}&field={field}&dir={dir}or is there other way to achieve this? Best Regards,Felix
Hi,
You need to pass it in the body:
But, if you do that, the method cannot be defined as 'GET'.
Hope this can help you.
Best regards,
Ricardo
Hi Ricardo,Is there a way to send it through URL method though? Since i don't really want to change the method from 'GET' if it's possible.Best Regards,Felix
Hello Felix,
please check the following documentation!
Hope it helps.
Lourenco Matalonga
Hi Lourenco,Thanks for the documentation. Gave it a read, and given from what i've understand, seems like it's a documentation on how to design the API when exposing it? Sadly I can't really change the code behind the API, and the task is I've been given is I need to find out on how to pass the parameters into the URL using GET method.Please do tell me if you have any insights on that.Best Regards,Felix
Hi @Felix Intan Bahagia
indeed the best solution is to pass data through body but if you want to achieve this by passing query parameter then convert your list to JSON and pass it as query parameter value then when you want to use it again convert JSON to list,
I hope you are aware about these two Outsystems tool -
But i am not sure whether it'll work fine or not but lets have a try.
ThanksDeep
Have you tried this ?
Hi Deep, I haven't really tried that method yet, since I've decided to just change the method to POST, and everything work as planned.Thanks for the advice though! Best Regards,Felix