The code is the contents of an HTTP request. You could use a graphical tool like Firefox developer tools or Postman to submit a request with those headers and the JSON payload, or use a command line tool like curl in a bash script. The tricky part is finding the Bearer token to authenticate the request. You can find this by inspecting the API requests the gateway UI makes in the network panel of Firefox developer tools.
Sorry this is a bit fiddly. We do plan to add a reboot button to the gateway UI eventually, just haven’t got around to it yet. See https://github.com/mozilla-iot/gateway/issues/217
This would be a good first bug if you’re interested in contributing, we just need to figure out where to put the button!
I think it should probably either go in Settings somewhere (but not Developer settings), or be part of some kind of combined logout/shutdown/reboot option in the main menu.