ChartnautDocs

Get a library script

GET/library/{author}/{slug}

Describes one script from the library: what it is, its settings and outputs, and the scripts it reads, at its latest saved version or at the version in slug@N. Call it before you run a script you did not write, to see which settings it takes.

Scope

Heavy call

Long poll

CLI

scripts:read

No

No

chartnaut library show

Guidance

  • author is a username, chartnaut for a built-in, or me for your own. The path is the item's ref from Search the library, with me/ in front of your own slugs.

  • Someone else's script is found when it is public, or unlisted and you have added it to your library in the app. That is the same rule Create a run uses, so anything this call describes, you can run. Their studies are never found.

  • The source never comes back: no files and no code, whatever the script's author allows in the app. You can still run it by its ref.

  • slug@N describes version N. version in the answer is the version described, and dependencies are that version's.

  • One of your studies can share a slug with one of your indicators or definitions. Then this call answers 409 conflict until you add kind.

Path parameters

Name

Type

Description

author

string

A username, chartnaut or me, in any letter case

slug

string

The script's slug, or slug@N for version N

Query parameters

Name

Type

Required

Default

Description

kind

string

No

None

indicator, definition or study, when a study shares the slug

Response

200 with a Library script in its full form: always with interface, version and dependencies.

Status codes

Status

Code

Meaning

200

-

The script at the version asked for

400

invalid_request

The slug or version in the path is not valid, or kind is not one of its values

404

not_found

No script by that author and slug that you can see, or it has no version N

409

conflict

A study shares the slug. Add kind