Factory Reset in device API

Please add function Factory Reset in device API, and get device Serial Number if possible.

We are constructing a device that will transmit the video signal via Transit or UBR (2 modems). Everything will be built-in in case and only the control panel (Touch LCD) will be available. It is not possible to access the factory reset button.
I wrote a procedure (in bash) which, after factory reset, gives me automatic access to the device via API, but I miss the factory reset function via API so that the user can do it if he or she forgets the password.