Nova API — /api/notebooks
The operations Nova tags public under /api/notebooks. Generated from reference-src/nova-openapi.json.
GET /api/notebooks
Operation id notebooks_list: in Python client.call("notebooks_list", …), on the command line stardelt api notebooks_list.
GET /api/notebooks: the latest version of every notebook in the caller's groups, newest first. Administrators see their own groups only.
The latest published version of every notebook in the caller's groups, newest first. Each row carries the group, the name, the latest objectVersion, its size, uploadedAt as an RFC 3339 timestamp in UTC (SeaweedFS's RFC 1123 LastModified normalised) and the publisher's uploadedBy display name. An administrator gets no wider view than their own groups. Unset NOVA_S3_* is 503; an S3 that is down or refuses is 502. Answers Cache-Control: no-store. The list also carries the newest version of every notebook whose stored viewers name one of the caller's groups.
Responses
| Code | Description |
|---|---|
200 | One row per notebook |
401 | Not signed in |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |
PUT /api/notebooks/{group}/{name}
Operation id notebooks_publish: in Python client.call("notebooks_publish", …), on the command line stardelt api notebooks_publish.
PUT /api/notebooks/{group}/{name}: validate, strip, store one immutable version.
Publish a notebook (.ipynb) or a python task's script (.py) as a new immutable object version in the notebooks bucket. Needs a signed-in person whose groups include {group} (403 you are not a member of the group <g>; administrators are not exempt). {name} must match ^[A-Za-z0-9][A-Za-z0-9._ -]{0,127}\.(ipynb|py)$; an .ipynb body must be an nbformat 4 notebook of at most 5 MiB. A .py body is its UTF-8 text; a JSON string body is accepted too, because the CLI sends JSON. A .py file is at most 1 MiB and has no parameters: the answer's list is empty. For a notebook, every code cell's outputs is emptied and its execution_count set to null, and the notebook's widget metadata is removed, before storing — no cell output reaches the object store. A cell of an nbformat 4.5 notebook without an id gets one (cell-<position>), so the stored notebook stays valid nbformat. sha256 is of the stored (stripped) bytes. parameters are the name = literal lines of the first cell tagged parameters, at most 32; defaults are text and are never evaluated. A 61st publish by one person in an hour is 429. Publishing bytes the newest version already holds stores nothing, uses no slot and writes no audit line: the answer names that version with unchanged: true. With ?dryRun=true the same checks run and nothing is stored, no slot is used and no audit line is written: the answer says unchanged: true with the newest version, or unchanged: false with an empty objectVersion when a publish would store a new one. Unset NOVA_S3_* is 503 notebook storage is not configured; an S3 that is down or refuses is 502. Each publish that stores a version writes one audit line with group, name, version and size, never content. A version published with an X-Stardelt-Source header carries source (repository, commit, path, clean); Nova stores it and does not verify it against a Git server. A version published with an X-Stardelt-Viewers header carries up to 8 group names that may read it without being members; the JSON is stored with the version.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
dryRun | query | boolean | No | true: validate the notebook and say whether the newest version already holds these bytes, without storing a version, using a publish slot or writing an audit line. |
group | path | string | Yes | One of the caller's groups |
name | path | string | Yes | File name: a notebook ending in.ipynb, or a python task's script ending in.py |
Responses
| Code | Description |
|---|---|
200 | The stored version and its parameters (empty for a.py); unchanged: true when the newest version already held these bytes; an empty objectVersion only on a dry run that would store a new version |
400 | Bad name, not an nbformat 4 notebook, or a.py body that is not UTF-8 text |
401 | Not signed in |
403 | Not a member of the group |
413 | Larger than 5 MiB, or larger than 1 MiB for a.py |
429 | More than 60 publishes in an hour |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |
DELETE /api/notebooks/{group}/{name}
Operation id notebooks_delete: in Python client.call("notebooks_delete", …), on the command line stardelt api notebooks_delete.
DELETE /api/notebooks/{group}/{name}: the notebook and every version of it.
Delete a published notebook (.ipynb) or python task script (.py) and every version of it from the notebooks bucket; the bucket is versioned, so each version is removed by its id and the bytes are gone, not hidden. Needs a signed-in person whose groups include {group} (403 you are not a member of the group <g>; administrators are not exempt). A file with no version is 404 no such notebook. The answer carries the number of versions removed. A schedule that pinned a deleted version fails its next run. Unset NOVA_S3_* is 503 notebook storage is not configured; an S3 that is down or refuses is 502 (a retry removes what is left). Each delete writes one audit line with group, name and the number of versions, never content. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group | path | string | Yes | One of the caller's groups |
name | path | string | Yes | File name: a notebook ending in.ipynb, or a python task's script ending in.py |
Responses
| Code | Description |
|---|---|
200 | The notebook and the number of versions removed |
400 | Bad name |
401 | Not signed in |
403 | Not a member of the group |
404 | No such notebook |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |
GET /api/notebooks/{group}/{name}/content
Operation id notebooks_content: in Python client.call("notebooks_content", …), on the command line stardelt api notebooks_content.
GET /api/notebooks/{group}/{name}/content: one stored version's bytes, as they are, so the notebook page can preview what a schedule would run.
One published version's stored bytes, answered as they are: application/json for a notebook (.ipynb, whose outputs were emptied before storing, so a preview shows source and markdown only) and text/x-python; charset=utf-8 for a python task's script (.py). ?version=<id> names the immutable version; omitted, the latest is read. Needs a member of {group}, or a person whose groups the newest version names in its viewers (403 you are not a member of the group <g>; administrators are not exempt). An unknown version is 404 no such notebook version. Unset NOVA_S3_* is 503 notebook storage is not configured; an S3 that is down or refuses is 502. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group | path | string | Yes | One of the caller's groups |
name | path | string | Yes | File name: a notebook ending in.ipynb, or a python task's script ending in.py |
version | query | string | No |
Responses
| Code | Description |
|---|---|
200 | The stored bytes, as application/json or text/x-python; charset=utf-8 |
400 | Bad name |
401 | Not signed in |
403 | Not a member of the group |
404 | No such notebook version |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |
GET /api/notebooks/{group}/{name}/parameters
Operation id notebooks_parameters: in Python client.call("notebooks_parameters", …), on the command line stardelt api notebooks_parameters.
GET /api/notebooks/{group}/{name}/parameters: the parameters of one version, so the Schedule dialog can offer the form the notebook declares.
The parameters of one published version of a notebook (.ipynb), read from the stored bytes: the name = literal lines of the first cell tagged parameters, in order, at most 32, defaults as text and never evaluated. A python task's .py file has no parameters: its answer is an empty list and the version, without a parse. ?version=<id> names the immutable version; omitted, the latest is read and its id answered. Needs a member of {group}, or a person whose groups the newest version names in its viewers (403 you are not a member of the group <g>; administrators are not exempt). An unknown version is 404 no such notebook version. The answer carries parameters and the objectVersion it describes — a schedule pins that id. Unset NOVA_S3_* is 503 notebook storage is not configured; an S3 that is down or refuses is 502. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group | path | string | Yes | One of the caller's groups |
name | path | string | Yes | File name: a notebook ending in.ipynb, or a python task's script ending in.py |
version | query | string | No |
Responses
| Code | Description |
|---|---|
200 | The parameters and the version they belong to |
400 | Bad name |
401 | Not signed in |
403 | Not a member of the group |
404 | No such notebook version |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |
GET /api/notebooks/{group}/{name}/usage
Operation id notebooks_usage: in Python client.call("notebooks_usage", …), on the command line stardelt api notebooks_usage.
The pipelines that run one published notebook — the schedules and on-demand pipelines of that group, sorted by name. Each row is the one-task Pipeline a Schedule created: its pinned objectVersion, its cron and timezone when it has a schedule, and its runAs. Owner-group scoped: a caller who is not a member of group answers 403, and an administrator gets no wider view. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group | path | string | Yes | The notebook's owner group |
name | path | string | Yes | The notebook's .ipynb file name |
Responses
| Code | Description |
|---|---|
200 | The visible schedules, sorted by name |
401 | No token to sign in with |
403 | The caller is not a member of the group |
502 | The cluster did not answer |
503 | No cluster connection |
GET /api/notebooks/{group}/{name}/versions
Operation id notebooks_versions: in Python client.call("notebooks_versions", …), on the command line stardelt api notebooks_versions.
GET /api/notebooks/{group}/{name}/versions: the versions of one notebook, newest first, at most 50.
The published versions of one notebook (.ipynb) or python task script (.py), newest first, at most 50. Needs a member of {group}, or a person whose groups the newest version names in its viewers (403 you are not a member of the group <g>; administrators are not exempt). Each row carries the immutable objectVersion, its size, uploadedAt as an RFC 3339 timestamp in UTC (SeaweedFS's RFC 1123 LastModified normalised), the publisher's uploadedBy and the sha256 of the stored bytes. A group with no such file answers an empty list. Unset NOVA_S3_* is 503; an S3 that is down or refuses is 502. Answers Cache-Control: no-store. A version published with an X-Stardelt-Source header carries source (repository, commit, path, clean); Nova stores it and does not verify it against a Git server.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group | path | string | Yes | One of the caller's groups |
name | path | string | Yes | File name: a notebook ending in.ipynb, or a python task's script ending in.py |
Responses
| Code | Description |
|---|---|
200 | The versions, newest first |
400 | Bad name |
401 | Not signed in |
403 | Not a member of the group |
502 | The notebook store did not answer |
503 | Notebook storage is not configured |