Skip to content

Dataset.upload_screenshot

Upload an image as the dataset's screenshot/thumbnail.

Signature

upload_screenshot(file_path: str) -> dict[str, Any]

Parameters

Name Type Required Default
file_path str yes -

HTTP parameters

Name In Type Required Default
dataset_id path string yes -

Fields

Field Type Required
file string yes

Return shape

HTTP 201 — Created

Schema: ImageFileSchema

Field Type Required
id string yes
image_url string yes
thumbnail_url string no

Permission

Required permission: dataset:write

HTTP

POST /api/datasets/{id}/datafiles/imagefile/ (uploadImageFile)

Usage

dataset.upload_screenshot(file_path)