Skip to content

Instantly share code, notes, and snippets.

@blink1073
Last active August 4, 2017 07:27
Show Gist options
  • Select an option

  • Save blink1073/ecae5130dfe138ea2aff to your computer and use it in GitHub Desktop.

Select an option

Save blink1073/ecae5130dfe138ea2aff to your computer and use it in GitHub Desktop.

Revisions

  1. blink1073 revised this gist Sep 9, 2015. 1 changed file with 3 additions and 16 deletions.
    19 changes: 3 additions & 16 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -511,7 +511,7 @@ paths:

    /kernelspecs:
    get:
    summary: List kernel specs
    summary: Get kernel specs
    tags:
    - kernelspecs
    responses:
    @@ -524,22 +524,9 @@ paths:
    type: string
    description: Default kernel name
    kernelspecs:
    type: array
    items:
    type: object
    additionalProperties:
    $ref: '#/definitions/KernelSpec'
    /kernelspecs/{spec_name}:
    get:
    summary: Get a kernel spec by name
    tags:
    - kernelspecs
    responses:
    200:
    description: Kernel spec
    schema:
    type: object
    properties:
    kernelspec:
    $ref: '#/definitions/KernelSpec'
    /config/{section_name}:
    get:
    summary: Get a configuration section by name
  2. blink1073 revised this gist Aug 6, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -544,7 +544,7 @@ paths:
    get:
    summary: Get a configuration section by name
    tags:
    - kernelspecs
    - config
    responses:
    200:
    description: Configuration object
  3. blink1073 revised this gist Aug 6, 2015. 1 changed file with 2 additions and 9 deletions.
    11 changes: 2 additions & 9 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -548,11 +548,8 @@ paths:
    responses:
    200:
    description: Configuration object
    shema:
    schema:
    type: object
    properties:
    config:
    $ref: '#/definitions/KernelSpec'
    patch:
    summary: Update a configuration section by name
    tags:
    @@ -565,12 +562,8 @@ paths:
    responses:
    200:
    description: Configuration object
    shema:
    schema:
    type: object
    properties:
    config:
    $ref: '#/definitions/KernelSpec'


    definitions:
    KernelSpec:
  4. blink1073 revised this gist Aug 6, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -544,7 +544,7 @@ paths:
    get:
    summary: Get a configuration section by name
    tags:
    - config
    - kernelspecs
    responses:
    200:
    description: Configuration object
    @@ -558,7 +558,7 @@ paths:
    tags:
    - config
    parameters:
    - name: session
    - name: configuration
    in: body
    schema:
    type: object
  5. blink1073 revised this gist Aug 6, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -552,7 +552,7 @@ paths:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    $ref: '#/definitions/KernelSpec'
    patch:
    summary: Update a configuration section by name
    tags:
    @@ -569,7 +569,7 @@ paths:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    $ref: '#/definitions/KernelSpec'


    definitions:
  6. blink1073 revised this gist Aug 6, 2015. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -550,6 +550,9 @@ paths:
    description: Configuration object
    shema:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    patch:
    summary: Update a configuration section by name
    tags:
    @@ -559,17 +562,14 @@ paths:
    in: body
    schema:
    type: object
    properties:
    config:
    $ref: '#/definitions/KernelSpec'
    responses:
    200:
    description: Configuration object
    shema:
    type: object
    properties:
    config:
    $ref: '#/definitions/KernelSpec'
    $ref: '#/definitions/Config'


    definitions:
  7. blink1073 revised this gist Aug 6, 2015. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -561,15 +561,15 @@ paths:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    $ref: '#/definitions/KernelSpec'
    responses:
    200:
    description: Configuration object
    shema:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    $ref: '#/definitions/KernelSpec'


    definitions:
  8. blink1073 revised this gist Aug 6, 2015. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -559,11 +559,17 @@ paths:
    in: body
    schema:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'
    responses:
    200:
    description: Configuration object
    shema:
    type: object
    properties:
    config:
    $ref: '#/definitions/Config'


    definitions:
    @@ -722,3 +728,6 @@ definitions:
    type: string
    description: Last modified timestamp
    format: dateTime
    Config:
    description: A configuration object.
    type: object
  9. blink1073 revised this gist Aug 6, 2015. 1 changed file with 30 additions and 25 deletions.
    55 changes: 30 additions & 25 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -462,7 +462,7 @@ paths:
    description: Model for started kernel
    type: string
    format: url
    /kernels/{kernel}:
    /kernels/{kernel_id}:
    parameters:
    - $ref: '#/parameters/kernel'
    get:
    @@ -481,7 +481,7 @@ paths:
    responses:
    204:
    description: Kernel deleted
    /kernels/{kernel}/interrupt:
    /kernels/{kernel_id}/interrupt:
    parameters:
    - $ref: '#/parameters/kernel'
    post:
    @@ -491,7 +491,7 @@ paths:
    responses:
    204:
    description: Kernel interrupted
    /kernels/{kernel}/restart:
    /kernels/{kernel_id}/restart:
    parameters:
    - $ref: '#/parameters/kernel'
    post:
    @@ -527,39 +527,44 @@ paths:
    type: array
    items:
    $ref: '#/definitions/KernelSpec'
    /kernelspecs/{kernel}:
    parameters:
    - $ref: '#/parameters/kernel'
    /kernelspecs/{spec_name}:
    get:
    summary: Kernel information
    summary: Get a kernel spec by name
    tags:
    - kernelspecs
    responses:
    200:
    description: The contents of kernel.json
    description: Kernel spec
    schema:
    $ref: '#/definitions/KernelSpec'
    404:
    description: Kernel spec not found
    /kernelspecs/{kernel}/{filename}:
    type: object
    properties:
    kernelspec:
    $ref: '#/definitions/KernelSpec'
    /config/{section_name}:
    get:
    summary: Retrieve a file from the kernel directory
    summary: Get a configuration section by name
    tags:
    - kernelspecs
    - config
    responses:
    200:
    description: Configuration object
    shema:
    type: object
    patch:
    summary: Update a configuration section by name
    tags:
    - config
    parameters:
    - name: kernel
    in: path
    description: Kernel uuid
    type: string
    required: true
    - name: filename
    in: path
    description: filename
    type: string
    required: true
    - name: session
    in: body
    schema:
    type: object
    responses:
    200:
    description: file
    description: Configuration object
    shema:
    type: object


    definitions:
    KernelSpec:
  10. blink1073 revised this gist Aug 5, 2015. 1 changed file with 4 additions and 2 deletions.
    6 changes: 4 additions & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -455,11 +455,13 @@ paths:
    responses:
    201:
    description: Kernel started
    schema:
    $ref: '#/definitions/Kernel'
    headers:
    Location:
    description: Model for started kernel
    schema:
    $ref: '#/definitions/Kernel'
    type: string
    format: url
    /kernels/{kernel}:
    parameters:
    - $ref: '#/parameters/kernel'
  11. blink1073 revised this gist Aug 5, 2015. 1 changed file with 6 additions and 6 deletions.
    12 changes: 6 additions & 6 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -46,7 +46,7 @@ paths:
    - $ref: '#/parameters/path'
    get:
    summary: Get contents of file or directory
    description: A client can optionally specify a type and/or format argument via URL parameter. When given, the Contents service shall return a model in the requested type and/or format. If the request cannot be satisfied, e.g. type=text is requested, but the file is binary, then the request shall fail with 400 and have a JSON response containing a 'reason' field, with the value 'bad format' or 'bad type', depending on what was requested.
    description: "A client can optionally specify a type and/or format argument via URL parameter. When given, the Contents service shall return a model in the requested type and/or format. If the request cannot be satisfied, e.g. type=text is requested, but the file is binary, then the request shall fail with 400 and have a JSON response containing a 'reason' field, with the value 'bad format' or 'bad type', depending on what was requested."
    tags:
    - contents
    parameters:
    @@ -59,14 +59,14 @@ paths:
    - directory
    - name: format
    in: query
    description: How file content should be returned ('text', 'base64')
    description: "How file content should be returned ('text', 'base64')"
    type: string
    enum:
    - text
    - base64
    - name: content
    in: query
    description: Return content (0 for no content, 1 for return content)
    description: "Return content (0 for no content, 1 for return content)"
    type: integer
    responses:
    404:
    @@ -457,9 +457,9 @@ paths:
    description: Kernel started
    headers:
    Location:
    description: URL for kernel commands
    type: string
    format: url
    description: Model for started kernel
    schema:
    $ref: '#/definitions/Kernel'
    /kernels/{kernel}:
    parameters:
    - $ref: '#/parameters/kernel'
  12. blink1073 revised this gist Aug 5, 2015. 1 changed file with 30 additions and 18 deletions.
    48 changes: 30 additions & 18 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -95,7 +95,7 @@ paths:
    description: Model key error
    post:
    summary: Create a new file in the specified path
    description: A POST to /api/contents/path creates a New untitled, empty file or directory. A POST to /api/contents/path with body {"copy_from", "/path/to/OtherNotebook.ipynb"} creates a new copy of OtherNotebook in path.
    description: "A POST to /api/contents/path creates a New untitled, empty file or directory. A POST to /api/contents/path with body {'copy_from': '/path/to/OtherNotebook.ipynb'} creates a new copy of OtherNotebook in path."
    tags:
    - contents
    parameters:
    @@ -107,6 +107,10 @@ paths:
    properties:
    copy_from:
    type: string
    ext:
    type: string
    type:
    type: string
    responses:
    201:
    description: File created
    @@ -135,7 +139,7 @@ paths:
    tags:
    - contents
    parameters:
    - name: model
    - name: path
    in: body
    required: true
    description: New path for file or directory.
    @@ -168,14 +172,13 @@ paths:
    type: string
    description: Explanation of error reason
    put:
    summary: Save an existing file
    description: Update an existing file in-place. This is how standard saves are performed. Returns the updated model without content.
    summary: Save or upload file.
    description: "Saves the file in the location specified by name and path. PUT is very similar to POST, but the requester specifies the name, whereas with POST, the server picks the name."
    tags:
    - contents
    parameters:
    - name: model
    in: body
    required: true
    description: New path for file or directory
    schema:
    type: object
    @@ -196,15 +199,24 @@ paths:
    type: string
    description: The actual body of the document excluding directory type
    responses:
    201:
    description: Path updated
    200:
    description: File saved
    headers:
    Location:
    description: Updated URL for the file or directory
    type: string
    format: url
    schema:
    $ref: '#/definitions/Contents'
    201:
    description: Path created
    headers:
    Location:
    description: URL for the file or directory
    type: string
    format: url
    schema:
    $ref: '#/definitions/Contents'
    400:
    description: No data provided
    schema:
    @@ -260,7 +272,7 @@ paths:
    description: Model key error
    post:
    summary: Create a new checkpoint for a file
    description: Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones.
    description: "Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones."
    tags:
    - contents
    responses:
    @@ -325,7 +337,7 @@ paths:
    schema:
    $ref: '#/definitions/Session'
    patch:
    summary: This can be used to rename the notebook, or move it to a new directory.
    summary: "This can be used to rename the notebook, or move it to a new directory."
    tags:
    - sessions
    parameters:
    @@ -357,7 +369,7 @@ paths:
    204:
    description: Session (and kernel) were deleted
    410:
    description: Kernel was deleted before the session, and the session was *not* deleted (TODO - check to make sure session wasn't deleted)
    description: "Kernel was deleted before the session, and the session was *not* deleted (TODO - check to make sure session wasn't deleted)"
    /sessions:
    get:
    summary: List available sessions
    @@ -371,7 +383,7 @@ paths:
    items:
    $ref: '#/definitions/Session'
    post:
    summary: Create a new session, or return an existing session if a session for the notebook path already exists
    summary: "Create a new session, or return an existing session if a session for the notebook path already exists"
    tags:
    - sessions
    parameters:
    @@ -393,7 +405,7 @@ paths:
    properties:
    name:
    type: string
    description: Kernel spec name, defaults to default kernel spec
    description: "Kernel spec name, defaults to default kernel spec"
    responses:
    201:
    description: Session created or returned
    @@ -584,12 +596,12 @@ definitions:
    description: The programming language which this kernel runs. This will be stored in notebook metadata.
    argv:
    type: array
    description: A list of command line arguments used to start the kernel. The text `{connection_file}` in any argument will be replaced with the path to the connection file.
    description: "A list of command line arguments used to start the kernel. The text `{connection_file}` in any argument will be replaced with the path to the connection file."
    items:
    type: string
    display_name:
    type: string
    description: The kernel's name as it should be displayed in the UI. Unlike the kernel name used in the API, this can contain arbitrary unicode characters.
    description: "The kernel's name as it should be displayed in the UI. Unlike the kernel name used in the API, this can contain arbitrary unicode characters."
    codemirror_mode:
    type: string
    description: Codemirror mode. Can be a string *or* an valid Codemirror mode object. This defaults to the string from the `language` property.
    @@ -643,7 +655,7 @@ definitions:
    kernel:
    $ref: '#/definitions/Kernel'
    Contents:
    description: A contents object. The content and format keys may be null if content is not contained. If type is 'file', then the mimetype will be null.
    description: "A contents object. The content and format keys may be null if content is not contained. If type is 'file', then the mimetype will be null."
    type: object
    required:
    - type
    @@ -658,7 +670,7 @@ definitions:
    properties:
    name:
    type: string
    description: Name of file or directory, equivalent to the last part of the path
    description: "Name of file or directory, equivalent to the last part of the path"
    path:
    type: string
    description: Full path for file or directory
    @@ -682,10 +694,10 @@ definitions:
    format: dateTime
    mimetype:
    type: string
    description: The mimetype of a file. If content is not null, and type is 'file', this will contain the mimetype of the file, otherwise this will be null.
    description: "The mimetype of a file. If content is not null, and type is 'file', this will contain the mimetype of the file, otherwise this will be null."
    content:
    type: string
    description: The content, if requested (otherwise null). Will be an array if type is 'directory'
    description: "The content, if requested (otherwise null). Will be an array if type is 'directory'"
    format:
    type: string
    description: Format of content (one of null, 'text', 'base64', 'json')
  13. blink1073 revised this gist Jul 31, 2015. 1 changed file with 2 additions and 13 deletions.
    15 changes: 2 additions & 13 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -185,24 +185,13 @@ paths:
    description: The new filename if changed
    path:
    type: string
    format: path
    description: New path for file or directory
    dtype:
    type:
    type: string
    in: query
    description: Path type ('notebook', 'file', 'directory')
    enum:
    - notebook
    - file
    - directory
    description: Path dtype ('notebook', 'file', 'directory')
    format:
    type: string
    in: query
    description: File format ('json', 'text', 'base64')
    enum:
    - json
    - text
    - base64
    content:
    type: string
    description: The actual body of the document excluding directory type
  14. blink1073 revised this gist Jul 31, 2015. 1 changed file with 12 additions and 1 deletion.
    13 changes: 12 additions & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -187,14 +187,25 @@ paths:
    type: string
    format: path
    description: New path for file or directory
    type:
    dtype:
    type: string
    in: query
    description: Path type ('notebook', 'file', 'directory')
    enum:
    - notebook
    - file
    - directory
    format:
    type: string
    in: query
    description: File format ('json', 'text', 'base64')
    enum:
    - json
    - text
    - base64
    content:
    type: string
    description: The actual body of the document excluding directory type
    responses:
    201:
    description: Path updated
  15. blink1073 revised this gist Jul 31, 2015. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -187,6 +187,14 @@ paths:
    type: string
    format: path
    description: New path for file or directory
    type:
    type: string
    in: query
    description: Path type ('notebook', 'file', 'directory')
    enum:
    - notebook
    - file
    - directory
    responses:
    201:
    description: Path updated
  16. blink1073 revised this gist Jul 31, 2015. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -183,7 +183,10 @@ paths:
    name:
    type: string
    description: The new filename if changed

    path:
    type: string
    format: path
    description: New path for file or directory
    responses:
    201:
    description: Path updated
  17. blink1073 revised this gist Jul 31, 2015. 1 changed file with 1 addition and 26 deletions.
    27 changes: 1 addition & 26 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -182,33 +182,8 @@ paths:
    properties:
    name:
    type: string
    in: path
    description: The new filename if changed
    path:
    type: string
    in: path
    format: path
    description: New path for file or directory
    type:
    type: string
    in: query
    description: Path type ('notebook', 'file', 'directory')
    enum:
    - notebook
    - file
    - directory
    format:
    type: string
    in: query
    description: File format ('json', 'text', 'base64')
    enum:
    - json
    - text
    - base64
    content:
    type: string
    in: path
    description: The actual body of the document excluding directory type

    responses:
    201:
    description: Path updated
  18. blink1073 revised this gist Jul 31, 2015. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -182,9 +182,11 @@ paths:
    properties:
    name:
    type: string
    in: path
    description: The new filename if changed
    path:
    type: string
    in: path
    format: path
    description: New path for file or directory
    type:
    @@ -205,6 +207,7 @@ paths:
    - base64
    content:
    type: string
    in: path
    description: The actual body of the document excluding directory type
    responses:
    201:
  19. blink1073 revised this gist Jul 31, 2015. 1 changed file with 8 additions and 0 deletions.
    8 changes: 8 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -191,10 +191,18 @@ paths:
    type: string
    in: query
    description: Path type ('notebook', 'file', 'directory')
    enum:
    - notebook
    - file
    - directory
    format:
    type: string
    in: query
    description: File format ('json', 'text', 'base64')
    enum:
    - json
    - text
    - base64
    content:
    type: string
    description: The actual body of the document excluding directory type
  20. blink1073 revised this gist Jul 31, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -197,7 +197,7 @@ paths:
    description: File format ('json', 'text', 'base64')
    content:
    type: string
    description: The actual body of the document excluding type=directory
    description: The actual body of the document excluding directory type
    responses:
    201:
    description: Path updated
  21. blink1073 revised this gist Jul 31, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -197,7 +197,7 @@ paths:
    description: File format ('json', 'text', 'base64')
    content:
    type: string
    description: The actual body of the document, excluding type=directory
    description: The actual body of the document excluding type=directory
    responses:
    201:
    description: Path updated
  22. blink1073 revised this gist Jul 31, 2015. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -66,7 +66,7 @@ paths:
    - base64
    - name: content
    in: query
    description: return content (0 for no content, 1 for return content)
    description: Return content (0 for no content, 1 for return content)
    type: integer
    responses:
    404:
    @@ -101,7 +101,6 @@ paths:
    parameters:
    - name: model
    in: body
    required: true
    description: Path of file to copy
    schema:
    type: object
    @@ -169,7 +168,7 @@ paths:
    type: string
    description: Explanation of error reason
    put:
    summary: Update an existing file in-place
    summary: Save an existing file
    description: Update an existing file in-place. This is how standard saves are performed. Returns the updated model without content.
    tags:
    - contents
    @@ -183,24 +182,24 @@ paths:
    properties:
    name:
    type: string
    description: The new filename (`my notebook.ipynb`), if changed
    description: The new filename if changed
    path:
    type: string
    format: path
    description: New path for file or directory
    type:
    type: string
    in: query
    description: One of ('notebook', 'file', 'directory')
    description: Path type ('notebook', 'file', 'directory')
    format:
    type: string
    in: query
    description: One of ('json', 'text', 'base64')
    description: File format ('json', 'text', 'base64')
    content:
    type: string
    description: The actual body of the document (excluding 'type=directory')
    description: The actual body of the document, excluding type=directory
    responses:
    200:
    201:
    description: Path updated
    headers:
    Location:
  23. blink1073 revised this gist Jul 31, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion api.yaml
    Original file line number Diff line number Diff line change
    @@ -101,6 +101,7 @@ paths:
    parameters:
    - name: model
    in: body
    required: true
    description: Path of file to copy
    schema:
    type: object
    @@ -176,7 +177,7 @@ paths:
    - name: model
    in: body
    required: true
    description: New path for file or directory.
    description: New path for file or directory
    schema:
    type: object
    properties:
  24. blink1073 revised this gist Jul 31, 2015. 1 changed file with 56 additions and 0 deletions.
    56 changes: 56 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -115,6 +115,8 @@ paths:
    description: URL for the new file
    type: string
    format: url
    schema:
    $ref: '#/definitions/Contents'
    404:
    description: No item found
    400:
    @@ -152,6 +154,60 @@ paths:
    description: Updated URL for the file or directory
    type: string
    format: url
    schema:
    $ref: '#/definitions/Contents'
    400:
    description: No data provided
    schema:
    type: object
    properties:
    error:
    type: string
    description: Error condition
    reason:
    type: string
    description: Explanation of error reason
    put:
    summary: Update an existing file in-place
    description: Update an existing file in-place. This is how standard saves are performed. Returns the updated model without content.
    tags:
    - contents
    parameters:
    - name: model
    in: body
    required: true
    description: New path for file or directory.
    schema:
    type: object
    properties:
    name:
    type: string
    description: The new filename (`my notebook.ipynb`), if changed
    path:
    type: string
    format: path
    description: New path for file or directory
    type:
    type: string
    in: query
    description: One of ('notebook', 'file', 'directory')
    format:
    type: string
    in: query
    description: One of ('json', 'text', 'base64')
    content:
    type: string
    description: The actual body of the document (excluding 'type=directory')
    responses:
    200:
    description: Path updated
    headers:
    Location:
    description: Updated URL for the file or directory
    type: string
    format: url
    schema:
    $ref: '#/definitions/Contents'
    400:
    description: No data provided
    schema:
  25. blink1073 revised this gist Jul 31, 2015. 1 changed file with 26 additions and 3 deletions.
    29 changes: 26 additions & 3 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -233,6 +233,32 @@ paths:
    reason:
    type: string
    description: Explanation of error reason
    /contents/{path}/checkpoints/{checkpoint_id}:
    post:
    summary: Restore a file to a particular checkpointed state
    tags:
    - contents
    responses:
    204:
    description: Checkpoint created
    400:
    description: Bad request
    schema:
    type: object
    properties:
    error:
    type: string
    description: Error condition
    reason:
    type: string
    description: Explanation of error reason
    delete:
    summary: Delete a checkpoint
    tags:
    - contents
    responses:
    204:
    description: Checkpoint deleted
    /sessions/{session}:
    parameters:
    - $ref: '#/parameters/session'
    @@ -449,9 +475,6 @@ paths:
    404:
    description: Kernel spec not found
    /kernelspecs/{kernel}/{filename}:
    parameters:
    - $ref: '#/parameters/kernel'
    - $ref: '#/parameters/filename'
    get:
    summary: Retrieve a file from the kernel directory
    tags:
  26. blink1073 revised this gist Jul 31, 2015. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -33,6 +33,12 @@ parameters:
    in: path
    description: file path
    type: string
    checkpoint_id:
    name: checkpoint_id
    required: true
    in: path
    description: Checkpoint id for a file
    type: string

    paths:
    /contents/{path}:
    @@ -443,6 +449,9 @@ paths:
    404:
    description: Kernel spec not found
    /kernelspecs/{kernel}/{filename}:
    parameters:
    - $ref: '#/parameters/kernel'
    - $ref: '#/parameters/filename'
    get:
    summary: Retrieve a file from the kernel directory
    tags:
  27. blink1073 revised this gist Jul 31, 2015. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -213,8 +213,7 @@ paths:
    type: string
    format: url
    schema:
    type:
    $ref: '#/definitions/Checkpoints'
    $ref: '#/definitions/Checkpoints'
    404:
    description: No item found
    400:
  28. blink1073 revised this gist Jul 31, 2015. 1 changed file with 29 additions and 0 deletions.
    29 changes: 29 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -199,6 +199,35 @@ paths:
    $ref: '#/definitions/Checkpoints'
    500:
    description: Model key error
    post:
    summary: Create a new checkpoint for a file
    description: Create a new checkpoint with the current state of a file. With the default FileContentsManager, only one checkpoint is supported, so creating new checkpoints clobbers existing ones.
    tags:
    - contents
    responses:
    201:
    description: Checkpoint created
    headers:
    Location:
    description: URL for the checkpoint
    type: string
    format: url
    schema:
    type:
    $ref: '#/definitions/Checkpoints'
    404:
    description: No item found
    400:
    description: Bad request
    schema:
    type: object
    properties:
    error:
    type: string
    description: Error condition
    reason:
    type: string
    description: Explanation of error reason
    /sessions/{session}:
    parameters:
    - $ref: '#/parameters/session'
  29. blink1073 revised this gist Jul 31, 2015. 1 changed file with 44 additions and 0 deletions.
    44 changes: 44 additions & 0 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -169,6 +169,36 @@ paths:
    description: URL for the removed file
    type: string
    format: url
    /contents/{path}/checkpoints:
    parameters:
    - $ref: '#/parameters/path'
    get:
    summary: Get a list of checkpoints for a file
    description: List checkpoints for a given file. There will typically be zero or one results.
    tags:
    - contents
    responses:
    404:
    description: No item found
    400:
    description: Bad request
    schema:
    type: object
    properties:
    error:
    type: string
    description: Error condition
    reason:
    type: string
    description: Explanation of error reason
    200:
    description: List of checkpoints for a file
    schema:
    type: array
    items:
    $ref: '#/definitions/Checkpoints'
    500:
    description: Model key error
    /sessions/{session}:
    parameters:
    - $ref: '#/parameters/session'
    @@ -546,3 +576,17 @@ definitions:
    format:
    type: string
    description: Format of content (one of null, 'text', 'base64', 'json')
    Checkpoints:
    description: A checkpoint object.
    type: object
    required:
    - id
    - last_modified
    properties:
    id:
    type: string
    description: Unique id for the checkpoint.
    last_modified:
    type: string
    description: Last modified timestamp
    format: dateTime
  30. blink1073 revised this gist Jul 31, 2015. 1 changed file with 7 additions and 2 deletions.
    9 changes: 7 additions & 2 deletions api.yaml
    Original file line number Diff line number Diff line change
    @@ -137,13 +137,13 @@ paths:
    path:
    type: string
    format: path
    description: New path for file or directory.
    description: New path for file or directory
    responses:
    200:
    description: Path updated
    headers:
    Location:
    description: Updated URL for the file or directory.
    description: Updated URL for the file or directory
    type: string
    format: url
    400:
    @@ -164,6 +164,11 @@ paths:
    responses:
    204:
    description: File deleted
    headers:
    Location:
    description: URL for the removed file
    type: string
    format: url
    /sessions/{session}:
    parameters:
    - $ref: '#/parameters/session'