Work order from Sales Order using API

Try if /api/method/runserverobj works.