Reference

apex search

Search a repository’s log text across runs

apex search [options] [query]

With an API token, needs the permission actions:read.

Arguments
ArgumentDescription
[query]terms, "a phrase" to keep words together, -term to exclude; all required terms must be on the same line
Options
OptionDescription
-e, --query <query>the query, for one that starts with "-" — an argument beginning with a dash is read as an option
--repo <owner/repo>the repository to search (required)
--workflow <path>one workflow file
--branch <name>one branch, written as a name or a full ref
--conclusion <state>jobs that ended this way, e.g. failure
--job <name>one job by name or matrix key
--casematch case (default: fold it)
--days <n>window in days, clamped to 1–365 (default: 30)
--limit <n>jobs whose logs are read, newest first (default: 200)
--jsonprint the report as JSON

Example

Find a string in the last 30 days of a repository's failed jobs.

apex search "ECONNRESET" --repo acme/web --conclusion failure