Hi outuser,
From Javascript you can call a client action which calls a server action which has the call for the API.
1. You would need a server action (in my case CallWebService) that calls the REST service:

2. Then you will want to create a client action (in my example CallAPI) that calls the server action created in 1.

3.And finally on the JavaScript, you can call the Client action created in 2.

Hope it helps.
Regards,
João