Get a script
/scripts/{slug}Returns one of your scripts at its latest version, or at the version in slug@N, with what Chartnaut read from its code and, on request, its source.
Scope | Heavy call | Long poll | CLI |
|---|---|---|---|
| No | No |
|
Guidance
Add
include=sourceto getfiles. Without it the response has the Interface and dependencies but no code.Before you edit and save, read the script and keep its
latest_version: that is thebase_versionSave a script version needs.slug@Nreturns versionNexactly as it was saved. A version never changes, somy-ema@3is safe to cache.Indicators and definitions share one set of slugs across Chartnaut, but one of your studies can have the same slug as one of your indicators or definitions. Then this call answers
409 conflictuntil you addkind.A path slug is 1 to 128 characters: lowercase letters, digits, hyphens and underscores, starting with a letter or digit. It is matched in any letter case.
Only your own scripts can be read here. Someone else's script answers
404: Get a library script describes it, without its source.
Path parameters
Name | Type | Description |
|---|---|---|
| string | Your script's slug, or |
Query parameters
Name | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | None |
|
| string | No | None |
|
Response
200 with a Script.
Status codes
Status | Code | Meaning |
|---|---|---|
| - | The script at the version asked for |
|
| The slug or version in the path is not valid |
|
| You have no script with that slug, or it has no version |
|
| A study shares the slug. Add |
