FigureCollection.replace¶
Replace content after preflight, returning the new immutable revision.
This is a full content replacement: omitted config/frames become empty.
Prior revisions remain available via get_revision.
Signature¶
replace(figure_id: str, *, figure: PlotlyFigure | dict[str, Any], title: str | None=None, config: dict[str, Any] | None=None) -> Figure
Parameters¶
| Name | Type | Required | Default |
|---|---|---|---|
figure_id |
str |
yes | - |
figure |
PlotlyFigure \| dict[str, Any] |
yes | - |
title |
str \| None |
no | None |
config |
dict[str, Any] \| None |
no | None |
HTTP parameters¶
| Name | In | Type | Required | Default |
|---|---|---|---|---|
figure_id |
path |
string |
yes | - |
Fields¶
Schema: FigureReplaceSchema
| Field | Type | Required |
|---|---|---|
author |
string |
no |
config |
object |
no |
figure |
object |
yes |
frames |
array<object> |
no |
name |
string |
no |
plotly_version |
string |
no |
producer |
string |
no |
source_provenance |
object |
no |
spec |
object |
no |
title |
string |
no |
Return shape¶
HTTP 200 — OK
Schema: FigureSchema
| Field | Type | Required |
|---|---|---|
author |
string |
no |
config |
object |
no |
conversation_id |
string |
no |
created_at |
string |
yes |
dataset_id |
string |
no |
figure |
object |
yes |
frames |
array<object> |
no |
id |
string |
yes |
name |
string |
yes |
notebook_id |
string |
no |
original_upload_hash |
string |
no |
original_upload_id |
string |
no |
owner_id |
string |
no |
plotly_version |
string |
no |
point_count |
integer |
no |
producer |
string |
no |
project_id |
string |
yes |
revision |
integer |
no |
size_bytes |
integer |
no |
source |
string |
yes |
source_provenance |
object |
no |
spec |
object |
no |
support_report |
object |
no |
title |
string |
no |
updated_at |
string |
yes |
validation_reasons |
array<string> |
no |
validation_status |
string |
no |
Permission¶
Required permission: figure:update
HTTP¶
POST /api/figures/{figure_id}/replace/ (replaceFigure)
Usage¶
figure_collection.replace(figure_id, figure)