report_run¶
Post the active track_script() run report immediately.
For notebooks/REPLs where atexit may not fire when expected. Server
idempotency on client_run_id dedupes against the atexit hook.
Signature¶
report_run(status: str='succeeded', error: str | None=None) -> dict[str, object] | None
Parameters¶
| Name | Type | Required | Default |
|---|---|---|---|
status |
str |
no | 'succeeded' |
error |
str \| None |
no | None |
Fields¶
Schema: ScriptRunReportSchema
| Field | Type | Required |
|---|---|---|
client_run_id |
string |
yes |
content_hash |
string |
yes |
error_message |
string |
no |
file_type |
string |
no |
finished_at |
string |
yes |
git_sha |
string |
no |
input_dataset_ids |
array<string> |
no |
output_dataset_ids |
array<string> |
no |
project_id |
string |
yes |
script_name |
string |
yes |
sdk_version |
string |
yes |
seed |
string |
no |
size |
integer |
no |
started_at |
string |
yes |
status |
string |
yes |
Return shape¶
HTTP 200 — OK
Schema: ScriptRunReportResponseSchema
| Field | Type | Required |
|---|---|---|
client_run_id |
string |
no |
config |
object |
no |
content_hash |
string |
yes |
created |
boolean |
yes |
created_at |
string |
yes |
created_by_id |
string |
yes |
duration_ms |
integer |
no |
error_message |
string |
no |
executor |
string |
yes |
exit_code |
integer |
no |
file_type |
string |
yes |
finished_at |
string |
no |
git_sha |
string |
no |
id |
string |
yes |
input_dataset_ids |
array<string> |
no |
log_excerpt |
string |
no |
log_url |
string |
no |
output_dataset_ids |
array<string> |
no |
project_id |
string |
yes |
runtime |
string |
no |
script_name |
string |
yes |
script_version_id |
string |
no |
sdk_version |
string |
yes |
seed |
string |
no |
size |
integer |
yes |
started_at |
string |
no |
status |
string |
yes |
timeout_seconds |
integer |
no |
Permission¶
Required permission: Team membership required
HTTP¶
POST /api/script-runs/ (reportScriptRun)
Usage¶
cs.report_run()