Get Autopilot Logs via REST calls


#1

Hello,

Is there an API that allows us to download autopilot logs via REST Calls? Since FlytOS uses mavlink protocol to communicate with the flight controller, it would be useful to have an RESTful endpoint to download logs from the autopilot.

Also, I do not know why but I can’t get the logs using the Logs tab at my.flytbase.com. I have upload logs checked on flight console, but on my real device it do not show any log available to download. I’ve tried turning it on, after completed flights, armed, disarmed, tried everything.


#2

Hello @Marcello,

Sorry for the delayed response.
Let me try to respond to your queries inline:

Yes, the Rest APIs are indeed available.
The API URLs are:
/flytos/mavros/log/log_list
/flytos/mavros/log/log_download
/flytos/mavros/log/log_erase

We will try to send you the API definition soon.
In the meantime, you can call these APIs using CLI - rosservice call, to checkout expected arguments and try it out.

Thanks for pointing out the bug. We are looking into it and will fix it soon.


#3

Can you please confirm that you have downloaded log files from the log viewer web app.
For more info, click here - http://docs.flytbase.com/docs/FlytOS/GettingStarted/FlytOSLogs.html#autopilot-logs


#4

Yes, I can download logs via the log viewer web app.
I will test the REST APIs today, and give you a feedback.


#5

I need this REST APIs available at cloud server, currently they are giving 404 not found error


#6

Hi @Marcello,

This would take us some time to implement. I will update this thread when it is done.
Moreover, you may have figured it out anyway, but calling these REST APIs from the cloud would still download the logs into the SBC and a separate service must be running to push the logs into the cloud.