Promote script version

Make a version the one the script runs, which is also how you roll back to an older one. A draft stops being a draft.

post/api/scripts/{handle}/{host}/{slug}/versions/{versionId}/promote

Request

  • Base URL: https://reduck.ai
  • URL: https://reduck.ai/api/scripts/{handle}/{host}/{slug}/versions/{versionId}/promote
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Path parameters

handlestring required

The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.

hoststring required

The site the script automates, as a hostname.

slugstring required

The script's unique identifier within its host, unique per owner.

versionIdstring uuid required

Request body

bypass_checkboolean

Skip the authoring-rules check a version goes live under. Only when a check refused this version and you judge the refusal wrong.

bypass_evalsboolean

Promote even though this version refuses the args of some active evals of the script, or some did not pass on it. For an urgent fix that cannot wait for the evals.

Response

OK

idstring required
script_idstring required
version_numbernumber required
parent_version_idstring nullable required
languagestring required
logged_inboolean required
side_effects'none' | 'undetermined' | 'write' required
draftboolean required
notestring nullable

Why this version exists. Omitted on an official script unless you belong to the project that owns it, and never carried by the version a script listing embeds.

created_atstring required
execution_countnumber required
last_run_atstring nullable required
success_ratenumber nullable required
avg_time_msnumber nullable required
contentstring

The version's source. Omitted on an official script unless you belong to the project that owns it.

input_schemaobject required
output_schemaobject required
librariesstring[]

The libraries the code imports, by host (lib:<host>). Read from the code, so withheld with it on an official script from anyone outside the project that owns it.

Changes

No recorded changes to this operation across all 1 revision of this API.