-
Notifications
You must be signed in to change notification settings - Fork 48
Server API
GET /dashboards/[PATH/]
- Returns an HTML page listing the contents at the given path. However, if there is an
index.ipynb
at this path, this will instead display that dashboard (see Show Dashboard section).
GET /
- Equivalent of
GET /dashboards
GET /dashboards/[PATH/]NAME
- Returns an HTML page displaying the dashboard.
GET /dashboards-plain/[PATH/]NAME
- Returns an HTML page displaying only the dashboard content (e.g. no site headers). This is useful for embedding or demonstrating a single dashboard.
POST /_api/notebooks/[PATH/]NAME
-
URL Parameters:
- NAME: the new dashboard's public name
- PATH: optional path to place the notebook
- For example,
POST /_api/notebooks/foo/bar/baz
will name the uploaded notebookbaz.ipynb
and place it in thefoo/bar
directory
- For example,
-
The uploaded dashboard is accessible at
/dashboards/[PATH/]NAME
. -
If the server is configured with an authentication token, provide the token in the "Authorization" header:
Authorization: token 1234567890abcdef
-
To send the dashboard data, use a "form data" request with a field named "file" set to either a Jupyter Notebook file (
*.ipynb
) or a bundled dashboard file (*.zip
).-
A bundled dashboard is a ZIP archive containing an
index.ipynb
notebook file along with any resources the notebook requires. For example:bundle.zip: index.ipynb stylesheet.css image.jpg urth_components/
-
-
Response contains the following fields:
- message: upload result status message
- status: HTTP response status code
- url: relative URL used to upload notebook
- link: public link to access uploaded notebook
Example:
{ "message": "Notebook successfully uploaded", "status": 201, "url": "/notebooks/p1", "link": "http://192.168.99.100:3000/dashboards/p1" }
DELETE /_api/notebooks/PATH
-
URL Parameters:
- PATH: path of dashboard to be deleted
- For example, to delete a dashboard available at
http://HOST/dashboards/foo/bar/baz
, send a request toDELETE /_api/notebooks/foo/bar/baz
- For example, to delete a dashboard available at
- PATH: path of dashboard to be deleted
-
If the server is configured with an authentication token, provide the token in the "Authorization" header:
Authorization: token 1234567890abcdef
-
Returns status code
204
on success.- Only allows deletion of notebook files or bundled dashboards. A request for any other path will return status code
400
.
- Only allows deletion of notebook files or bundled dashboards. A request for any other path will return status code
DELETE /_api/cache[/PATH]
-
Clear the cached version of a dashboard or all dashboards. On the next GET request(s), the dashboard(s) will be read from storage.
-
URL Parameters:
- PATH: path of dashboard; if not specified, deletes entire cache
-
If the server is configured with an authentication token, provide the token in the "Authorization" header:
Authorization: token 1234567890abcdef
-
Returns status code
200
on success.
GET|POST|PUT|DELETE /api/*
-
Proxies Jupyter Kernel requests to the appropriate kernel gateway.
-
For
execute_request
messages, only a cell index is allowed in thecode
field. If actual code or non-numeric are specified, the entire message is not proxied to the kernel gateway.
POST /login
- Login to the dashboard server, passing
username
andpassword
in the request body. Starts a session.
POST /logout
- Logs out user defined by session.