Skip to content

API: Scripts

This section explains how to inspect server-side scripts and retrieve their content and logs.


List Scripts

Retrieve all server-side scripts without log contents.

GET /api/v1/scripts HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Optional query parameters:

  • page: Page number
  • pageSize: Number of items per page
  • sort: Sorting format {FIELD}:{ASC/DESC} (can be used multiple times)

Get Script Info

Fetch metadata for a specific script path. The query form is useful when the script path contains directories; URL-encode the scriptPath value.

GET /api/v1/scripts/info/{SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
GET /api/v1/scripts/info?scriptPath={URL_ENCODED_SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Get Script Content

Fetch the current script file content as plain text.

GET /api/v1/scripts/content/{SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
GET /api/v1/scripts/content?scriptPath={URL_ENCODED_SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Get Script Raw Log

Fetch the raw log file for a script as plain text.

GET /api/v1/scripts/log/raw/{SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
GET /api/v1/scripts/log/raw?scriptPath={URL_ENCODED_SCRIPT_PATH} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Get Script Log Lines

Fetch selected lines from a script log.

GET /api/v1/scripts/log/lines/{SCRIPT_PATH}?fromLine={FROM_LINE}&toLine={TO_LINE} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}
GET /api/v1/scripts/log/lines?scriptPath={URL_ENCODED_SCRIPT_PATH}&fromLine={FROM_LINE}&toLine={TO_LINE} HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

Optional query parameters:

  • fromLine: Starting line, inclusive; negative values can be used for tail-style reads
  • toLine: Ending line, exclusive; -1 reads to the end

Search Script Logs

Find log lines containing a nonempty string. caseSensitivity is CASE_SENSITIVE (the default) or CASE_INSENSITIVE. maxLines defaults to 1000 and accepts values from 1 to 1000.

GET /api/v1/scripts/log/search?scriptPath={URL_ENCODED_SCRIPT_PATH}&contains=error&caseSensitivity=CASE_INSENSITIVE&maxLines=100 HTTP/1.1
Authorization: Bearer {JWT_TOKEN}

The response includes scriptPath, matching lines with line numbers, and a status of ALL_MATCHES_RETURNED or MORE_MATCHES_AVAILABLE.