Skip to main content
PUT
Edit a draft in place

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

workspace
string
required

Workspace slug.

Maximum string length: 64
Pattern: ^[a-z0-9][a-z0-9-]{0,63}$
name
string
required

Function name — a Python identifier.

Maximum string length: 64
Pattern: ^[a-z][a-z0-9_]{0,63}$
version
integer
required

Body

application/json

A spec to save as a draft version.

spec is a function spec: name, kind, summary, params, returns (or input for a table function), code — one PySpark def — and tests. See the spark-functions skill for its shape.

spec
Spec · object
required

The function spec.

notes
string | null

What changed and why.

folder
string | null

Free-text grouping for the workspace page. Only used when the function is created.

Maximum string length: 200

Response

Successful Response

workspace
string
required
name
string
required
version
integer
required
content_sha
string
required
status
enum<string>
required

Lifecycle state of a single version.

draft → submitted → approved, with reject returning a submitted version to draft and retire taking an approved version out of circulation.

Available options:
draft,
submitted,
approved,
retired
created_by
string
required
created_at
string<date-time>
required
spec
Spec · object
required
notes
string | null
drafted_by_run
string | null
submitted_by
string | null
submitted_at
string<date-time> | null
approved_by
string | null
approved_at
string<date-time> | null
simulation
SimulationSummary · object | null
generated_code
string | null

The module a release would ship for this version.

simulation_report
Simulation Report · object | null
edited_in_place
boolean
default:false