I have a table with several URLs for each record, and these URLs have the same base URL and return a JSON with another URL inside, as in the example:
I used *** to hide some data.
I cannot access directly via the URL, as this would expose the data to users. So I'm doing it via API.
However, I am having a problem with my endpoint. The problem apparently lies in the use of brackets within this request. Outsystems doesn't seem to identify the brackets when I make the API call.
The only parameter I use is everything that comes after the "cf" parameter. (Used the function Subst() to get the content after "cf=213").
In the print, the test result don't identifies the "dados=" parameter. When i remove the brackets, the test result identifies, but don't works anyway.
Hi,
{} are characters amongst the list of unsafe characters for an URL.
You need to encode them:
Here is the list of Unsafe characters:
[ ] { } | \ ” % ~ # < >
{ should be encoded as %7B
} should be encoded as %7D
For more information, see:
Regards,
Daniel
Interesting, thanks for the return. It is now returning successfully the URL within the API test.
However, this API is still returning empty. I double-checked, and the parameter that the variable is taking before the request is identical to the one I used in the test.
So I believe the problem is in the API/Server Action structure.
just so you are aware, in the previous question, I had placed everything within the URL parameter, now I divided it into "URL" and "JSON data"
Could you help me, please?
The API is "GetLinkEtapaPublica" and the Server Action is GetLinkEtapaPublicaV2
Server Action:
Server Action Structure (URLEtapaPublica is a text variable)
API SettingsAPI Settings
Server Action Debug
Api Return Example (the link that i want)