Hello,
I would like to test an external api.
For example : https://re.jrc.ec.europa.eu/api/PVcalc?lat=45&lon=8&peakpower=1&loss=14&outputformat=json
I have trying to receive an response but without success…
Could you help me ?
Regards
Hello,
I would like to test an external api.
For example : https://re.jrc.ec.europa.eu/api/PVcalc?lat=45&lon=8&peakpower=1&loss=14&outputformat=json
I have trying to receive an response but without success…
Could you help me ?
Regards
The API-URL you want to use does not provide the needed CORS headers. Thats why you don’t get a result. A temporary fix might be adding a new “Data resource” and use as “Resource URL” the following: https://cors-anywhere.herokuapp.com/re.jrc.ec.europa.eu/api adjust the other values to this screen
you now might get the json data on the test tab.
Oh thanks for your help.
But if I understand the link that you have give to me is just for testing or can I use it as long as I want?
Yes, it’s just for testing purpose.
Ok, and if I want to use it longer, what should I put in place?
Maybe you could tell the API owner to add the needed CORS header data or maybe using a CORS proxy. I’m not into this, maybe google might be your friend.
If you’re making an iOS/Android app and don’t need web, you can work around CORS. This will however require you to construct the schema of your data by hand if you want to benefit from having the schema in Composer UI, but technically you can use the API.