Notebooks API
Reference for the 7 Notebooks operations in the Intuidy API.
Responses are JSON. A successful response is { "success": true, "data": …, "meta": … }, and each operation below documents its data. Errors use the error envelope described in Errors, pagination and limits.
| Operation | Method and path | Authorization |
|---|---|---|
| List notebooks reachable by this key | GET /notebooks | notebooks:read |
| Create a notebook | POST /notebooks | notebooks:write |
| Get a notebook and its cells | GET /notebooks/{notebookId} | notebooks:read |
| Replace a notebook's cells | PATCH /notebooks/{notebookId} | notebooks:write |
| Delete a notebook | DELETE /notebooks/{notebookId} | notebooks:write |
| Export a notebook as a file | GET /notebooks/{notebookId}/export | notebooks:read |
| Run a notebook's data cells and save the results | POST /notebooks/{notebookId}/run | notebooks:write |
List notebooks reachable by this key
GET /notebooks
Summaries only — cells can be large enough to make paging meaningless, so fetch a notebook's content with GET /notebooks/{notebookId}.
Reach is the key owner's own: their notebooks, plus the ones shared with their company or organization. A notebook whose owner scoped its sharing to their own company is not listed to a sibling company, and each row carries an access object saying whether this key may write to it.
Authorization: scope notebooks:read.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer (≤ 100) | No | — |
Response 200 OK
data fields:
| Field | Type | Description |
|---|---|---|
notebooks | array of object | — |
notebooks[].id | integer | — |
notebooks[].title | string | — |
notebooks[].is_shared | boolean | — |
notebooks[].owner_id | integer or null | — |
notebooks[].created | string (date-time) | — |
notebooks[].modified | string (date-time) | — |
notebooks[].access | object | — |
total | integer | — |
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/notebooks" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Create a notebook
POST /notebooks
Creates a notebook owned by the key's user, private until shared.
Authorization: scope notebooks:write.
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
title | string (max 255 chars) | Yes | — |
cells | object | No | Canonical content, shaped as an object with a "sections" array; each section carries a title, a type and its own "cells" array. A bare array of cells is accepted and migrated into one section. |
Response 200 OK
Errors 400. See Errors, pagination and limits.
Example request
curl -X POST "https://vantage.intuidy.com/api/v1/notebooks" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"<title>"}'Get a notebook and its cells
GET /notebooks/{notebookId}
Returns the canonical content shape PATCH accepts, so a read → edit → write round-trip needs no reshaping. A notebook this key cannot reach is a 404, never a 403 — a 403 would confirm the notebook exists to a caller enumerating ids.
Authorization: scope notebooks:read.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
notebookId | integer | Yes | — |
Response 200 OK
Errors 404. See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/notebooks/<notebookId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Replace a notebook's cells
PATCH /notebooks/{notebookId}
Requires WRITE access, which is not the same as being able to read it. A notebook's owner can share it read-only, or mark individual people as viewers; this operation refuses those callers with a 403, exactly as the web editor does. Before a write, the notebook is snapshotted (so the change is recoverable from version history), and a concurrent edit is refused with a 409 rather than overwritten.
Authorization: scope notebooks:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
notebookId | integer | Yes | — |
Request body (application/json)
| Field | Type | Required | Description |
|---|---|---|---|
cells | object | No | Canonical { "sections": [...] } content, or a bare array of cells. Charts, pivots and metrics that name no source are linked to the nearest data cell (query / compute / workflow_source). |
refresh | object or null | No | Scheduled server-side refresh of the notebook's data cells. null turns it off. One of cells or refresh is required. |
refresh.enabled | boolean | No | — |
refresh.interval_minutes | 15 or 30 or 60 or 180 or 360 or 720 or 1440 or 10080 | No | Default 1440 (daily) |
refresh.alert_user_ids | array of integer | No | Extra users notified when a metric cell crosses its alert threshold |
refresh.stale_after_hours | integer | No | — |
Response 200 OK
Errors 403, 409, 422. See Errors, pagination and limits.
Example request
curl -X PATCH "https://vantage.intuidy.com/api/v1/notebooks/<notebookId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cells":"<cells>"}'Delete a notebook
DELETE /notebooks/{notebookId}
Permanently deletes a notebook. Deletion is the owner's, or an administrator's of the company or organization that owns it. A sharing grant never confers it, however generous — being able to edit a notebook is not being able to destroy it.
Authorization: scope notebooks:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
notebookId | integer | Yes | — |
Response 204 No Content
Errors 403, 404. See Errors, pagination and limits.
Example request
curl -X DELETE "https://vantage.intuidy.com/api/v1/notebooks/<notebookId>" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Export a notebook as a file
GET /notebooks/{notebookId}/export
The same document a user downloads from the editor: markdown, standalone HTML (charts rendered as inline SVG, pivots and metrics computed, provenance on every data cell) or PDF. The response IS the file (see Content-Type and Content-Disposition), not a JSON envelope.
Requires the key owner to hold the export_data permission, applies the notebook's read access (including its in-document sharing settings) and data governance for the export channel, and counts as one notebook export toward usage.
Authorization: scope notebooks:read.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
notebookId | integer | Yes | — |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
format | "markdown" or "html" or "pdf" | No | — |
Response 200 OK
Errors 400, 403, 404. See Errors, pagination and limits.
Example request
curl -X GET "https://vantage.intuidy.com/api/v1/notebooks/<notebookId>/export" \
-H "Authorization: Bearer $INTUIDY_API_KEY"Run a notebook's data cells and save the results
POST /notebooks/{notebookId}/run
Executes every SQL query, compute (sandboxed JavaScript) and workflow-source cell of the notebook server-side — sources first, then compute cells after the cells they read — and persists each result snapshot with its provenance, so the charts, pivots and metrics that read them are current. The editor's Refresh runs the same way.
Requires WRITE access (results are content). Each cell is billed for what it runs: a database query, a compute run or a workflow run.
Scopes. notebooks:write admits the run, but it does not widen what the key reaches. A query cell runs connector SQL, so it also needs integrations:read; a workflow-source cell executes a workflow, so it also needs workflows:execute — the scopes those capabilities require at their own endpoints. A cell the key may not reach is reported as a failed cell in ran (with the missing scope named in its error), not as a failed request, so the cells the key MAY run still run.
Authorization: scope notebooks:write.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
notebookId | integer | Yes | — |
Request body (application/json, optional)
| Field | Type | Required | Description |
|---|---|---|---|
cell_ids | array of string | No | Only these cell ids (default every data cell) |
skip_cache | boolean | No | Re-run workflow sources instead of using their cached result |
Response 200 OK
The body fields:
| Field | Type | Description |
|---|---|---|
notebook_id | integer | — |
ran | array of object | — |
ran[].cell_id | string | — |
ran[].type | "query" or "compute" or "workflow_source" | — |
ran[].title | string | — |
ran[].ok | boolean | — |
ran[].row_count | integer | — |
ran[].error | string or null | — |
ran[].sample | array of object | First 5 rows |
errors | array of string | — |
modified | string (date-time) or null | — |
Errors 402, 403, 404. See Errors, pagination and limits.
Example request
curl -X POST "https://vantage.intuidy.com/api/v1/notebooks/<notebookId>/run" \
-H "Authorization: Bearer $INTUIDY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cell_ids":"<cell_ids>"}'