I want to deploy a notebook in the cloud that has a global state and time management function, and then have several Mathematica clients access that server using function calls (as in GetServerState, which would be defined in the cloud-resident notebook). The clients would have a user interface (built using GUIKit; this is a proof of concept that would follow with better clients).
I have tried using CloudPut/CloudGet, and can pass data.
I have tried using CloudDeploy[APIFunction[
]] and then URLExecute on the resulting URL. This works from a browser, but it doesn't work from within a mathematica notebook on the client side (I get the "web page" below in my notebook; note that the notebook is properly signed in to WolframCloud and can access data there). I would be happy to pass a URL with arguments from a client notebook to the server in the cloud, if I could get intelligible results.
NOTEBOOK OUTPUT FROM URLExecute:
The browser you are using is not supported at this time.Please try the latest version of one of these browsers.
Safari That's OK, I'm willing to risk it.
Using Wolfram Cloud via mobile browsers is not yet fully supported.Some features may not work as expected.
Wolfram ID (your email address)Password
Sign In Forgot your password?
First, apologies to Jesse; I realized when I went to get the sample that I had moved on to a different (NOT better) approach, and lost the sample.
Anyway, thanks Chad for the post; I will try it and reply with results, good or bad.
This is not my day job, so I only work on this in evenings usually
The URLExecute is returning a login page, as expected. To return a result, you have to provide credentials. The simplest way to do this is to wrap CloudObject around the url when you are connected to the cloud ($CloudConnected is True).
In the case of your clients, there are a couple of options currently implemented. Perhaps more options will be available soon.
First, you can set the Permissions of the deployed APIFunction to "Public". But this will allow anyone to access your function (so long as they know the url).
Alternatively, you can specify who has permissions to evaluate the function. Currently, these users need to have a WolframCloud account.
Can you post the URLExecute function you're using? The problem might be that the arguments aren't properly formatted.