Skip to content

Commit

Permalink
docs: Add complete/interrupt API endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Sep 26, 2017
1 parent a36f932 commit dc3dfb6
Showing 1 changed file with 33 additions and 9 deletions.
42 changes: 33 additions & 9 deletions docs/user-api/exec-query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,9 @@ You should make another API query with the ``code`` field filled with the user i
Auto-completion
---------------

* URI: ``/v2/kernel/:id``
* URI: ``/v2/kernel/:id/complete``
* Method: ``POST``

.. warning::

This API is draft and may be changed without notices.

Parameters
""""""""""

Expand All @@ -263,9 +259,6 @@ Parameters
* - ``:id``
- ``slug``
- The kernel ID.
* - ``mode``
- ``enum[str]``
- A constant string ``"complete"``.
* - ``code``
- ``str``
- A string containing the code until the current cursor position.
Expand All @@ -287,7 +280,6 @@ Parameters
.. code-block:: json
{
"type": "complete",
"code": "pri",
"options": {
"post": "\nprint(\"world\")\n",
Expand Down Expand Up @@ -338,3 +330,35 @@ Response
]
}
Interrupt
---------

* URI: ``/v2/kernel/:id/interrupt``
* Method: ``POST``

Parameters
""""""""""

.. list-table::
:widths: 15 5 80
:header-rows: 1

* - Parameter
- Type
- Description
* - ``:id``
- ``slug``
- The kernel ID.

Response
""""""""

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

* - HTTP Status Code
- Description
* - 204 No Content
- Sent the interrupt signal to the kernel.
Note that this does *not* guarantee the effectiveness of the interruption.

0 comments on commit dc3dfb6

Please sign in to comment.