Well there is an undocumented API,
rosservice call /flytos/mavros/autopilot_app_control "app_name: ''
This command works on ONLY PX4, and not on APM.
WARNING: Use this API with caution. Make sure you don't send any incorrect command to the autopilot. Your autopilot may get hanged or misbehave in case you do so, and then the drone may eventually crash.