Javascript EmbedApp SDK - Functions

Javascript EmbedApp SDK - Functions

Hi, 

I would like to know if it is possible and how we can use CRM FUNCTIONS that are not marked as REST API using the JavaScript SDK, currently, the solution that is in the documentation only works for REST API FUNCTIONS. However, we have some concerns about exposing these endpoints.

The functions were created inside a testing App in Sigma, one is marked as REST API and the other doesn't. 

The one that is marked works as respected but the other one returns an error, I have attached screenshots of both requests using the same code.

Thanks.