From ab8decfd4072414bcb7f0d31eb993d6354af73ed Mon Sep 17 00:00:00 2001 From: John Detlefs Date: Mon, 7 Nov 2016 18:33:09 -0800 Subject: [PATCH] Add terminals info to notebook api --- notebook/services/api/api.yaml | 66 ++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/notebook/services/api/api.yaml b/notebook/services/api/api.yaml index 08d3cb41f..c23f15873 100644 --- a/notebook/services/api/api.yaml +++ b/notebook/services/api/api.yaml @@ -45,6 +45,12 @@ parameters: in: path description: Name of config section type: string + terminal_id: + name: terminal_id + required: true + in: path + description: ID of terminal session + type: string paths: /contents/{path}: @@ -543,6 +549,57 @@ paths: description: Configuration object schema: type: object + items: + $ref: '#/parameters/section_name' + + /terminals: + get: + summary: Get available terminals + tags: + - terminals + responses: + 200: + description: A list of all available terminal ids. + schema: + type: array + items: + $ref: '#/definitions/Terminal_ID' + + post: + summary: Create a new terminal + tags: + - terminals + responses: + 200: + description: Response description + schema: + $ref: '#/definitions/Terminal_ID' + + /terminals/{terminal_id}: + get: + summary: Get a terminal session corresponding to an id. + tags: + - terminals + parameters: + - $ref: '#/parameters/terminal_id' + responses: + 200: + description: An object containing + schema: + $ref: '#/definitions/Terminal_ID' + delete: + summary: Delete a terminal session corresponding to an id. + tags: + - terminals + parameters: + - $ref: '#/parameters/terminal_id' + responses: + 200: + description: Response description + schema: + type: Object + + definitions: KernelSpec: @@ -703,3 +760,12 @@ definitions: type: string description: Last modified timestamp format: dateTime + Terminal_ID: + description: A Terminal_ID object + type: object + required: + -name + properties: + name: + type: string + description: name of terminal ID