REST API#
The same Jupyter Server Terminals API spec, as found here, is available in an interactive form here (on swagger’s petstore). The OpenAPI Initiative (fka Swagger™) is a project used to describe and document RESTful APIs.
- GET /api/terminals#
Get available terminals
Example request:
GET /api/terminals HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
A list of all available terminal ids.
Example response:
HTTP/1.1 200 OK Content-Type: application/json [ { "name": "string", "last_activity": "string" } ]
403 Forbidden – Forbidden to access
404 Not Found – Not found
- POST /api/terminals#
Create a new terminal
- Status Codes:
200 OK –
Successfully created a new terminal
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "name": "string", "last_activity": "string" }
403 Forbidden – Forbidden to access
404 Not Found – Not found
- GET /api/terminals/{terminal_id}#
Get a terminal session corresponding to an id.
- Parameters:
terminal_id (string) – ID of terminal session
Example request:
GET /api/terminals/{terminal_id} HTTP/1.1 Host: example.com
- Status Codes:
200 OK –
Terminal session with given id
Example response:
HTTP/1.1 200 OK Content-Type: application/json { "name": "string", "last_activity": "string" }
403 Forbidden – Forbidden to access
404 Not Found – Not found
- DELETE /api/terminals/{terminal_id}#
Delete a terminal session corresponding to an id.
- Parameters:
terminal_id (string) – ID of terminal session
- Status Codes:
204 No Content – Successfully deleted terminal session
403 Forbidden – Forbidden to access
404 Not Found – Not found