ChartnautDocs

Delete a script

DELETE/scripts/{slug}

Deletes one of your scripts. The CLI has no delete command, so this endpoint and the app are the only ways.

Scope

Heavy call

Long poll

CLI

scripts:write

No

No

None

Guidance

  • Chartnaut does not stop you deleting a script that another of your scripts depends on. Check the dependencies of your other scripts with Get a script first.

  • The path takes the bare slug only. When one of your studies shares the slug, add kind, or you get 409 conflict and nothing is deleted.

  • A retry after the first delete landed answers 404 not_found. Treat that as done.

Path parameters

Name

Type

Description

slug

string

Your script's bare slug

Query parameters

Name

Type

Required

Default

Description

kind

string

No

None

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

Response

204 with no body.

Status codes

Status

Code

Meaning

204

-

The script was deleted

400

invalid_request

The path is not a bare slug

403

forbidden

You cannot delete this script

404

not_found

You have no script with that slug

409

conflict

A study shares the slug. Add kind

502

internal

The delete failed. Retry