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.
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 Script Content
Fetch the current script file content as plain text.
Get Script Raw Log
Fetch the raw log file for a script as plain text.
Get Script Log Lines
Fetch selected lines from a script log.
Optional query parameters:
- fromLine: Starting line, inclusive; negative values can be used for tail-style reads
- toLine: Ending line, exclusive;
-1reads 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.
The response includes scriptPath, matching lines with line numbers, and a
status of ALL_MATCHES_RETURNED or MORE_MATCHES_AVAILABLE.