List versions
/scripts/{slug}/versionsReturns a script's versions, newest first, with who saved each and what changed. Call it to find a version to compare with or go back to.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
| No | No |
|
Guidance
The first item is the latest version. Its
versionmatcheslatest_versionon the Script.To read an older version's code, call Get a script with
slug@Nandinclude=source.To go back to an older version, read its files and save them with Save a script version. The old version stays; the save adds a new one on top.
authortells you where a version came from:apifor the CLI or API,youfor a save in the app,app-agentor a model id for the Agent. A version you did not expect is usually an edit made in the app.A
@Nsuffix on the slug is accepted and ignored: every version comes back.
Path parameters
Name | Type | Description |
|---|---|---|
| string | Your script's slug. A |
Query parameters
Name | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | None |
|
| integer | No | 50 | Most 500 |
| string | No | None | From the previous page's |
Response
200 with a page whose data is an array of Version.
Status codes
Status | Code | Meaning |
|---|---|---|
| - | A page of versions, newest first |
|
| The slug in the path is not valid |
|
| You have no script with that slug |
|
| A study shares the slug. Add |
