Skip to content

Commit

Permalink
Update API docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Feb 28, 2017
1 parent f027790 commit 62fcf36
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 2 deletions.
6 changes: 5 additions & 1 deletion docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ code, .code, .pre, tt {
font-size: 12px !important;
}

.rst-content ul, .rst-content ol {
.rst-content table ul,
.rst-content .admonition ul,
.rst-content table ol,
.rst-content .admonition ol
{
line-height: inherit !important;
margin-top: 8px !important;
margin-bottom: 8px !important;
Expand Down
33 changes: 32 additions & 1 deletion docs/api/batch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,41 @@ Uploading files
* URI: ``/v2/kernel/:id/upload``
* Method: ``POST``

Parameters
""""""""""

Upload files to the kernel session.
You may upload multiple files at once using multi-part MIME encoding in the request body.
You may upload multiple files at once using multi-part form-data encoding in the request body (RFC 1867/2388).
The uploaded files are placed under ``/home/work`` directory (which is the home directory for all kernels by default),
and existing files are always overwritten.
If the filename has a directory part, non-existing directories will be auto-created.
The path may be either absolute or relative, but only sub-directories under ``/home/work`` is allowed to be created.

There are several limits on this API:

.. list-table::
:widths: 75 25

* - The maximum size of each file
- 1 MiB
* - The number of files per upload request
- 20

Response
""""""""

.. list-table::
:widths: 25 75
:header-rows: 1

* - HTTP Status Code
- Description
* - 200 OK
- The kernel has responded with the execution result.
The response body contains a JSON object as described below.
* - 400 Bad Request
- Returned when one of the uploaded file exeeds the size limit or there are too many files.


Executing
---------
Expand Down

0 comments on commit 62fcf36

Please sign in to comment.