API esios ree - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: API esios ree (/showthread.php?tid=2496) Pages:
1
2
|
RE: API esios ree - admin - 23.06.2021 Use grp.create: https://openrb.com/docs/lua.htm#grp.create RE: API esios ree - JRP - 23.06.2021 thanks for the reply. Would it be possible to do it automatically, specifying a minimal virtual object up to a maximum? regards RE: API esios ree - jose_dli - 16.02.2023 hello, esios change the header for autentification in their API, from Code: curl "https://api.esios.ree.es/indicators" -X GET Code: curl "https://api.esios.ree.es/archives" -X GET \ In the script of this post I try to change: Quote:--Token=('Token token=\34'..token..'\34') Code: body, code, hdrs, stat = https.request ({ --Llamada HTTP formada por URL+metodo+cabecera but, the return code is 401, error with authentification Anyone was able to update the request to new way? thanks for your help RE: API esios ree - admin - 16.02.2023 Does it work if you send the same request using curl? RE: API esios ree - jose_dli - 16.02.2023 yes, old curl (valid until end of this month) and new curl return the json. But I am not able make it works properly curl "https://api.esios.ree.es/indicators/1001?start_date=15-02-2023T00%3A00&end_date=15-02-2023T23%3A50&geo_ids[]=8741" -X GET \ -H "Accept: application/json; application/vnd.esios-api-v1+json" \ -H "Content-Type: application/json" \ -H "Host: api.esios.ree.es" \ -H "Authorization: Token token=\"xxxxxxxxxxxxxxxxxxxxx\"" \ -H "Cookie: " curl "https://api.esios.ree.es/indicators/1001?start_date=15-02-2023T00%3A00&end_date=15-02-2023T23%3A50&geo_ids[]=8741" -X GET \ -H "Accept: application/json; application/vnd.esios-api-v1+json" \ -H "Content-Type: application/json" \ -H "Host: api.esios.ree.es" \ -H "x-api-key:\"xxxxxxxxxxxxxxxxxxxxx\"" \ -H "Cookie: " (16.02.2023, 14:33)jose_dli Wrote: yes, old curl (valid until end of this month) and new curl return the json. But I am not able to make it works properly RE: API esios ree - admin - 16.02.2023 Can you send your access token via PM? RE: API esios ree - admin - 17.02.2023 Thanks. It seems that their API does not accept the key when there's a space in the key header: x-api-key: "...". HTTP library always sends headers this way. Can you contact them and ask if they can fix it on their side? RE: API esios ree - jose_dli - 17.02.2023 thanks a lot, I'll write them, if any news, I'll come back RE: API esios ree - jose_dli - 21.02.2023 the problem was the quotes in the token and that esios had two servers to make test. The way is as follow: Code: token='xxxxxxxxxxxxxx' |