espressif / esp-insights

ESP Insights: A remote diagnostics/observability framework for connected devices
Apache License 2.0
101 stars 27 forks source link

Upload firmware package .zip with API? #32

Open ftab opened 1 year ago

ftab commented 1 year ago

Is it possible to automate the uploading of the firmware package generated at build time? It would be helpful if our CI/CD could do that during the deploy process so we don't have to manually do it.

shahpiyushv commented 1 year ago

@ftab , since ESP Insights and ESP RainMaker have a common login, you can refer to the RainMaker user management APIs to get the refresh and access tokens, which can then be used for Insights APIs. To upload an image you can check out the OTA Image Upload Request and OTA Image Upload Confirm APIs.

You can also refer to the RainMaker CLI which has the user login and token management. You can extend it to upload the images to Insights.