FigureCollection.create¶
Create through createFigure with the same safety checks as publish.
Signature¶
create(*, target: Dataset | Notebook, figure: PlotlyFigure | dict[str, Any], title: str, config: dict[str, Any] | None=None) -> Figure
Parameters¶
| Name | Type | Required | Default |
|---|---|---|---|
target |
Dataset \| Notebook |
yes | - |
figure |
PlotlyFigure \| dict[str, Any] |
yes | - |
title |
str |
yes | - |
config |
dict[str, Any] \| None |
no | None |
Fields¶
Schema: FigureCreateSchema
| Field | Type | Required |
|---|---|---|
author |
string |
no |
config |
object |
no |
conversation_id |
string |
no |
dataset_id |
string |
no |
figure |
object |
yes |
frames |
array<object> |
no |
name |
string |
yes |
notebook_id |
string |
no |
plotly_version |
string |
no |
producer |
string |
no |
project_id |
string |
yes |
source |
string |
no |
source_provenance |
object |
no |
spec |
object |
no |
title |
string |
no |
Return shape¶
HTTP 201 — Created
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:create
HTTP¶
POST /api/figures/ (createFigure)
Usage¶
figure_collection.create(target, figure, title)