-
Notifications
You must be signed in to change notification settings - Fork 141
api.R
api.R
is an experimental attempt to add a RESTful API to RCloud, and this is a placeholder page noting that it's not a stable API and should not be relied on yet.
Currently it supports one verb, /create
- with a POST
method and notebook gist/JSON body, this will create a notebook for the currently logged-in user (accessed via cookies). If successful, it will then redirect to edit.html
, loading the new notebook.
If there is no currently logged-in user, it will stash the notebook in a temp file and redirect to login.R
. It requests login.R
to redirect back to api.R/create
with a token identifying the temp file. api.R/create?token=...
with a GET
method continues the create action.
When api.R
represents a real API, it will probably have methods that don't require cookies and are enabled for cross-origin requests. This will require passing access tokens as parameters.