Solved API Restful
-
Hi,
I'm trying to use the API of recalbox from a local server but I'm stucked.
I have set the option
system.api.enabled = 1
and reboot the Pi but I can't do anycurl
request from my local server (curl http://192.168.0.18:1337/
-> curl: (7) Failed to connect to 192.168.0.18 port 1337: Connexion refusée.Can I see some logs on the Pi?
The developer environment is only needed if we want to modify the API and not used it, right?ping @MikaXII
-
I tried it 3 months ago, was working fine. Try 127.0.0.1eventually
-
What I want it's use the API through a local server, not the Pi itself.
I tried the command on the Pi but same thing (with local and network IP).
-
I'll try lter today and tell you how it goes
-
Looks like the start of the recalbox-api is crashing ... I'll fill in a bug
-
Ok thank you! We close this thread?
-
@DjLeChuck no, seems like there is a fix ongoing that I'd like you to test. Can you edit
/etc/init.d/S95api
and replace PM2_HOME to/var/.pm2
, reboot and retry the curl ? -
@subs : Sorry for the delay, I was mounting my bartop I can not edit the file, he his readonly. I can do something like that example for the config.txt file ?
mount -o remount, rw /boot
-
Just replace /boot by / and you can edit+save it
-
@subs : It work's! Perfect thank you. \o/
-
Thanks for finding a bug ^^will be solved in the next beta
-
Thank you for allowing me to use the API on the Pi!
P.S. : @subs Comment je marque un topic en résolu ? ^^'
EDIT : Bon bah trouvé ! -
Hey, sorry but three years later I have the exact same problem.
Should I follow the steps described above ?
Or these have been included and my problem is from another source?Ps: Same as DjLeChuck, I've set system.api.enabled = 1 , reboot the Pi and every curl requests failed to connect on local server or Pi itself with local and network addresses
-
@lepioo said in API Restful:
ow the steps described above ?
Or these have been included and my problem is from another source?
Ps: Same as DjLeChuck, I've set system.api.enabled = 1 , reboot the Pi and every curl requests failed to connect on local server or Pi itself with local and network addressesCurrently the api doesn't work anymore and DjLeChuck doesn't give a sign of life.
So we planned to rewrite an api and manager officially maintened by the core team.
But currently release first -
I wanna cry... I was preparing a recalbox second screen using this API.
I got some dev skills, maybe if you lead me in the good direction I can help coding the new API? (I have no idea where to begin). -
@lepioo In fact I've not begin the dev yet but the main goals is :
backend api in Rust or golang (I prefer golang) with a less of external lib. There are a lot of lib native for golang.
And a frontend (it will use the api) writen in VueJs or angular -
@mikaxii I'll look into Golang for the backend but I could help much more with the frontend since I'm used to nodeJS React (no Angular for me ^^).
Thanks -
@lepioo Haha I hate react but every one his preference
But the goals its the core team have the capabilities to maintained themself the manager/api, because there are already 2 versions of manager and one api not maintained anymore by their creators
-
@mikaxii Yes I understand, I'll try to make it for my own purpose and I'll let the sources opened anyway.
The API is pretty much important for bartop using (demo mode, easy save/load, etc)