Script.upload_version¶
Beta: This API may change shape in 0.1.x. It is not a frozen 1.0 contract.
Upload a new version from a local file (multipart).
Server: POST /api/scripts/{id}/versions/.
Signature¶
upload_version(file_path: str, *, message: str='') -> ScriptVersion
Parameters¶
| Name | Type | Required | Default |
|---|---|---|---|
file_path |
str |
yes | - |
message |
str |
no | '' |
HTTP parameters¶
| Name | In | Type | Required | Default |
|---|---|---|---|---|
script_id |
path |
string |
yes | - |
Fields¶
| Field | Type | Required |
|---|---|---|
file |
string |
yes |
message |
string |
no |
Return shape¶
HTTP 200 — OK
Schema: ScriptUploadResult
| Field | Type | Required |
|---|---|---|
created_version |
boolean |
yes |
script |
ScriptSchema |
yes |
version |
ScriptVersionSchema |
yes |
Permission¶
Required permission: script:create
HTTP¶
POST /api/scripts/{id}/versions/ (uploadScriptVersion)
Usage¶
script.upload_version(file_path)