Skip to content

Feature: pass-by-value API #549

@kycutler

Description

@kycutler

I want to host nbdime as a multi-tenant, stateless REST service. However the diff & merge APIs currently only support local paths or URLs as arguments. This requires either uploading the files to the server or hosting them publicly, both of which I want to avoid.

Proposed change:

Allow the diff & merge apis to take notebook json as arguments; i.e. for /api/diff the request JSON would now be:

{
    "base":   "filename.ipynb" | "http://your-domain/url/path" | json_notebook,
    "remote": "filename.ipynb" | "http://your-domain/url/path" | json_notebook
}

If the endpoint receives a dictionary for any of the arguments, it would interpret it as a notebook and use that directly.

Some kind of --disallow-notebook-paths server flag to disable passing a path or URL to the API would be good too, for security purposes.

I'm willing to make the changes for this, just looking for any feedback first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions