SonicOS-API Firmware Upload
CTaylor
Newbie ✭
I am trying to use the firmware/download
endpoint to upload new firmware to devices.
The documentation shows the body should just be the file binary.
There is no mention of encoding or anything. When I use UTF-8 I get an error response.
No boundary found
I try to adjust the ContentType from:
multipart/form-data
to
multipart/form-data; boundary="b22798e2-a752-44d5-9280-56f1d9d79360"
and the body is:
--b22798e2-a752-44d5-9280-56f1d9d79360 <Firmware> --b22798e2-a752-44d5-9280-56f1d9d79360--
But this just gives me The underlying connection was closed: An unexpected error occurred on a send.
Category: Developer Hub
0
Answers
sorry I am trying to use
/import/firmware
as pictured not/firmware/downloadHi,
Please take a look at the Python example script "sonicosapi-public-key-auth.py". There's an example you can reference for uploading firmware via the API.
https://github.com/jaimeesc/sonicos-api-examples
Hope that helps!