API reference
Logs
Search, count and facet the organisation’s collected log lines over a time window.
Its operations need the scope logs.view.
Read one log line
GET/v1/logs/{line_uuid}
Returns one log line named by its uuid and the at time of the console link that shows it (/logs/<uuid>?at=<time>), with its full text, its exact time to the nanosecond, where that time comes from (time_source) and, for a Log Source line, the text the sender submitted (raw_line). at is the link’s at as it is, or the line’s logged_at in epoch milliseconds. A line that is gone, or that is not one of the organisation’s server or log source lines, is a 422.
Needs the scope logs.view.
Path parameters
- line_uuidstringRequired
The line’s
uuid, as a search answers it and the console’s link carries it.
Query parameters
- atstringRequired
The line’s
time(RFC 3339 with an offset, up to nine fraction digits: the console link’satis passed as it is) or itslogged_at(epoch milliseconds). It bounds the lookup of the line, so it is required.
Returns
200 OK:
The log line.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Read the lines around a log line
GET/v1/logs/context
Returns the lines logged just before and just after one line of the same source and stream, newest first, with the line itself marked is_anchor. Name the line by its uuid and logged_at from a search. before and after count lines, 20 each by default and 100 at most; has_older_more and has_newer_more say whether more lines exist beyond them. A line that is gone, or that is not one of the organisation’s server or log source lines, is a 422.
Needs the scope logs.view.
Query parameters
- uuidstringRequired
The line’s
uuid, as the search answers it. - atstringRequired
When the line was logged (its
logged_at, epoch milliseconds, or RFC 3339 with an offset): it bounds the lookup of the line. - beforeinteger or nullOptional
The number of older lines to return, from 0 to 100; 20 when omitted.
- afterinteger or nullOptional
The number of newer lines to return, from 0 to 100; 20 when omitted.
Returns
200 OK:
The lines around the line asked, newest first.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Count logs by level and stream
GET/v1/logs/facets
Counts the lines the search filters match by level and by stream, most first. The window defaults to the last hour and reaches back to retention (30 days); a window that ends in the future ends now, and window says the window read. Lines with no level are not counted in the levels but in unlevelled_count (select them with levels[]=unknown), and the stream list ignores the stream filter so every candidate stream stays listed.
Needs the scope logs.view.
Query parameters
- source_uuidsarray of strings or nullOptional
Only lines from these servers or log sources, by uuid (a server’s uuid gives that server’s lines); a deleted one’s lines stay searchable for the retention. A list: repeat the parameter (
source_uuids=<uuid>&source_uuids=<uuid>) or send one value (source_uuids=<uuid>);source_uuids[]=<uuid>is accepted too. - levelsarray of strings or nullOptional
Only lines at one of these levels:
debug,info,notice,warning,error,critical,alertoremergency;unknownselects the lines with no level (theirlevelis null). A list: repeat the parameter (levels=debug&levels=info) or send one value (levels=debug);levels[]=debugis accepted too.Values:debuginfonoticewarningerrorcriticalalertemergencyunknown(an open set: new values may be added) - streamsarray of strings or nullOptional
Only lines in one of these streams. A list: repeat the parameter (
streams=<value>&streams=<value>) or send one value (streams=<value>);streams[]=<value>is accepted too. - searchstring or nullOptional
Only lines whose text contains this text.
- tag_uuidsarray of strings or nullOptional
Only lines from servers and log sources carrying any of these tags, by uuid. A list: repeat the parameter (
tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>);tag_uuids[]=<uuid>is accepted too. - periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept is refused; one that ends in the future ends now, and the answer’s window says so. - excludearray of strings or nullOptional
Only lines that contain none of these texts: at most 5, each at most 200 characters.
search_caseapplies to them;search_modedoes not, they are always literal text. A list: repeat the parameter (exclude=<value>&exclude=<value>) or send one value (exclude=<value>);exclude[]=<value>is accepted too. - search_modestring or nullOptional
How
searchis read:substring(the default) orregex, an RE2 pattern of at most 500 characters with no lookahead, lookbehind, backreference, possessive quantifier or atomic group.Values:substringregex(an open set: new values may be added) - search_casestring or nullOptional
Whether
searchandexcludeignore case:sensitive(the default) orinsensitive. It sets the case of every include and exclude list too.Values:sensitiveinsensitive(an open set: new values may be added) - unitsarray of strings or nullOptional
Only lines from these systemd units, exactly (
cloudflared.service): at most 20. Null on lines that did not come from a journal, and on lines from an agent too old to report the unit. A list: repeat the parameter (units=<value>&units=<value>) or send one value (units=<value>);units[]=<value>is accepted too. - identifiersarray of strings or nullOptional
Only lines with these journal identifiers (
SYSLOG_IDENTIFIER, such assshd), exactly: at most 20. A list: repeat the parameter (identifiers=<value>&identifiers=<value>) or send one value (identifiers=<value>);identifiers[]=<value>is accepted too. - http_statusesarray of strings or nullOptional
Only lines whose parsed HTTP status is one of these: a code (
502) or a class (5xx), at most 10. Only access log lines the backend parsed (a file entry with aformat) have a status. A list: repeat the parameter (http_statuses=<value>&http_statuses=<value>) or send one value (http_statuses=<value>);http_statuses[]=<value>is accepted too. - includearray of strings or nullOptional
Only lines that contain each of these texts (or any of them, with
match=any): literal text of 1 to 500 characters. A search holds at most 10 terms:search,excludeand every include and exclude list count together. A list: repeat the parameter (include=<value>&include=<value>) or send one value (include=<value>);include[]=<value>is accepted too. - include_wordsarray of strings or nullOptional
Only lines that contain each of these whole words: a word is bounded where its first and last characters are letters, digits or underscores (ASCII only, so
caféis bounded atcaf). A list: repeat the parameter (include_words=<value>&include_words=<value>) or send one value (include_words=<value>);include_words[]=<value>is accepted too. - include_regexarray of strings or nullOptional
Only lines that match each of these RE2 regular expressions: no lookahead, lookbehind, backreference, possessive quantifier or atomic group. At most 5 regex terms, with
exclude_regexand asearchwithsearch_mode=regex. Start one with(?i)to ignore case in that term alone. A list: repeat the parameter (include_regex=<value>&include_regex=<value>) or send one value (include_regex=<value>);include_regex[]=<value>is accepted too. - exclude_wordsarray of strings or nullOptional
Only lines that contain none of these whole words. A list: repeat the parameter (
exclude_words=<value>&exclude_words=<value>) or send one value (exclude_words=<value>);exclude_words[]=<value>is accepted too. - exclude_regexarray of strings or nullOptional
Only lines that match none of these RE2 regular expressions, as
include_regextakes them. A list: repeat the parameter (exclude_regex=<value>&exclude_regex=<value>) or send one value (exclude_regex=<value>);exclude_regex[]=<value>is accepted too. - matchstring or nullOptional
How the included terms combine:
all(the default), a line matches every one, orany, at least one; the excluded terms always apply. Needs an included term (search,include,include_wordsorinclude_regex).search_casesets the case of every term.Values:allany(an open set: new values may be added)
Returns
200 OK:
The level and stream counts of the matching lines.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Count logs by a field
GET/v1/logs/groups
Counts the lines the search filters match by one field (stream, level, source, unit, identifier, HTTP status, HTTP path or message pattern), most first, by=pattern counts the messages with their numbers, UUIDs, addresses and times replaced by placeholders (<N>, <UUID>, <IP4>, <TIME>), so repeated errors count as one pattern instead of being downloaded; at most 100 groups. The window defaults to the last hour and reaches back to retention (30 days); a window that ends in the future ends now, and window says the window read. A line without the field is counted under a null value.
Needs the scope logs.view.
Query parameters
- bystringRequired
What to count the lines by:
stream,level,source,unit,identifier,http_status,http_pathorpattern(the message with its numbers, hexadecimal values, UUIDs, addresses and times replaced by placeholders such as<N>,<UUID>,<IP4>and<TIME>, most frequent first; each value cut at 1,000 characters).Values:streamlevelsourceunitidentifierhttp_statushttp_pathpattern(an open set: new values may be added) - source_uuidsarray of strings or nullOptional
Only lines from these servers or log sources, by uuid (a server’s uuid gives that server’s lines); a deleted one’s lines stay searchable for the retention. A list: repeat the parameter (
source_uuids=<uuid>&source_uuids=<uuid>) or send one value (source_uuids=<uuid>);source_uuids[]=<uuid>is accepted too. - levelsarray of strings or nullOptional
Only lines at one of these levels:
debug,info,notice,warning,error,critical,alertoremergency;unknownselects the lines with no level (theirlevelis null). A list: repeat the parameter (levels=debug&levels=info) or send one value (levels=debug);levels[]=debugis accepted too.Values:debuginfonoticewarningerrorcriticalalertemergencyunknown(an open set: new values may be added) - streamsarray of strings or nullOptional
Only lines in one of these streams. A list: repeat the parameter (
streams=<value>&streams=<value>) or send one value (streams=<value>);streams[]=<value>is accepted too. - searchstring or nullOptional
Only lines whose text contains this text.
- tag_uuidsarray of strings or nullOptional
Only lines from servers and log sources carrying any of these tags, by uuid. A list: repeat the parameter (
tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>);tag_uuids[]=<uuid>is accepted too. - periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept, or in the future, is refused. - limitinteger or nullOptional
The number of groups, from 1 to 100; 50 when omitted.
- excludearray of strings or nullOptional
Only lines that contain none of these texts: at most 5, each at most 200 characters.
search_caseapplies to them;search_modedoes not, they are always literal text. A list: repeat the parameter (exclude=<value>&exclude=<value>) or send one value (exclude=<value>);exclude[]=<value>is accepted too. - search_modestring or nullOptional
How
searchis read:substring(the default) orregex, an RE2 pattern of at most 500 characters with no lookahead, lookbehind, backreference, possessive quantifier or atomic group.Values:substringregex(an open set: new values may be added) - search_casestring or nullOptional
Whether
searchandexcludeignore case:sensitive(the default) orinsensitive. It sets the case of every include and exclude list too.Values:sensitiveinsensitive(an open set: new values may be added) - unitsarray of strings or nullOptional
Only lines from these systemd units, exactly (
cloudflared.service): at most 20. Null on lines that did not come from a journal, and on lines from an agent too old to report the unit. A list: repeat the parameter (units=<value>&units=<value>) or send one value (units=<value>);units[]=<value>is accepted too. - identifiersarray of strings or nullOptional
Only lines with these journal identifiers (
SYSLOG_IDENTIFIER, such assshd), exactly: at most 20. A list: repeat the parameter (identifiers=<value>&identifiers=<value>) or send one value (identifiers=<value>);identifiers[]=<value>is accepted too. - http_statusesarray of strings or nullOptional
Only lines whose parsed HTTP status is one of these: a code (
502) or a class (5xx), at most 10. Only access log lines the backend parsed (a file entry with aformat) have a status. A list: repeat the parameter (http_statuses=<value>&http_statuses=<value>) or send one value (http_statuses=<value>);http_statuses[]=<value>is accepted too. - includearray of strings or nullOptional
Only lines that contain each of these texts (or any of them, with
match=any): literal text of 1 to 500 characters. A search holds at most 10 terms:search,excludeand every include and exclude list count together. A list: repeat the parameter (include=<value>&include=<value>) or send one value (include=<value>);include[]=<value>is accepted too. - include_wordsarray of strings or nullOptional
Only lines that contain each of these whole words: a word is bounded where its first and last characters are letters, digits or underscores (ASCII only, so
caféis bounded atcaf). A list: repeat the parameter (include_words=<value>&include_words=<value>) or send one value (include_words=<value>);include_words[]=<value>is accepted too. - include_regexarray of strings or nullOptional
Only lines that match each of these RE2 regular expressions: no lookahead, lookbehind, backreference, possessive quantifier or atomic group. At most 5 regex terms, with
exclude_regexand asearchwithsearch_mode=regex. Start one with(?i)to ignore case in that term alone. A list: repeat the parameter (include_regex=<value>&include_regex=<value>) or send one value (include_regex=<value>);include_regex[]=<value>is accepted too. - exclude_wordsarray of strings or nullOptional
Only lines that contain none of these whole words. A list: repeat the parameter (
exclude_words=<value>&exclude_words=<value>) or send one value (exclude_words=<value>);exclude_words[]=<value>is accepted too. - exclude_regexarray of strings or nullOptional
Only lines that match none of these RE2 regular expressions, as
include_regextakes them. A list: repeat the parameter (exclude_regex=<value>&exclude_regex=<value>) or send one value (exclude_regex=<value>);exclude_regex[]=<value>is accepted too. - matchstring or nullOptional
How the included terms combine:
all(the default), a line matches every one, orany, at least one; the excluded terms always apply. Needs an included term (search,include,include_wordsorinclude_regex).search_casesets the case of every term.Values:allany(an open set: new values may be added)
Returns
200 OK:
The line counts by the field asked, and the window read.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Count logs over time
GET/v1/logs/histogram
Counts the lines the search filters match per time bucket, split by level. The window defaults to the last day and reaches back to retention (30 days); a window that ends in the future ends now, and window says the window read. With no step the window is split into 48 buckets; a step that gives more than 1,440 buckets is refused. Only buckets that hold a line are returned.
Needs the scope logs.view.
Query parameters
- source_uuidsarray of strings or nullOptional
Only lines from these servers or log sources, by uuid (a server’s uuid gives that server’s lines); a deleted one’s lines stay searchable for the retention. A list: repeat the parameter (
source_uuids=<uuid>&source_uuids=<uuid>) or send one value (source_uuids=<uuid>);source_uuids[]=<uuid>is accepted too. - levelsarray of strings or nullOptional
Only lines at one of these levels:
debug,info,notice,warning,error,critical,alertoremergency;unknownselects the lines with no level (theirlevelis null). A list: repeat the parameter (levels=debug&levels=info) or send one value (levels=debug);levels[]=debugis accepted too.Values:debuginfonoticewarningerrorcriticalalertemergencyunknown(an open set: new values may be added) - streamsarray of strings or nullOptional
Only lines in one of these streams. A list: repeat the parameter (
streams=<value>&streams=<value>) or send one value (streams=<value>);streams[]=<value>is accepted too. - searchstring or nullOptional
Only lines whose text contains this text.
- tag_uuidsarray of strings or nullOptional
Only lines from servers and log sources carrying any of these tags, by uuid. A list: repeat the parameter (
tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>);tag_uuids[]=<uuid>is accepted too. - periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept is refused; one that ends in the future ends now, and the answer’s window says so. - stepstring or nullOptional
The width of a bucket as a whole number and a unit,
s,m,hord, such as5m; at most 1,440 buckets for the window, and the window divided by 48 when omitted. - excludearray of strings or nullOptional
Only lines that contain none of these texts: at most 5, each at most 200 characters.
search_caseapplies to them;search_modedoes not, they are always literal text. A list: repeat the parameter (exclude=<value>&exclude=<value>) or send one value (exclude=<value>);exclude[]=<value>is accepted too. - search_modestring or nullOptional
How
searchis read:substring(the default) orregex, an RE2 pattern of at most 500 characters with no lookahead, lookbehind, backreference, possessive quantifier or atomic group.Values:substringregex(an open set: new values may be added) - search_casestring or nullOptional
Whether
searchandexcludeignore case:sensitive(the default) orinsensitive. It sets the case of every include and exclude list too.Values:sensitiveinsensitive(an open set: new values may be added) - unitsarray of strings or nullOptional
Only lines from these systemd units, exactly (
cloudflared.service): at most 20. Null on lines that did not come from a journal, and on lines from an agent too old to report the unit. A list: repeat the parameter (units=<value>&units=<value>) or send one value (units=<value>);units[]=<value>is accepted too. - identifiersarray of strings or nullOptional
Only lines with these journal identifiers (
SYSLOG_IDENTIFIER, such assshd), exactly: at most 20. A list: repeat the parameter (identifiers=<value>&identifiers=<value>) or send one value (identifiers=<value>);identifiers[]=<value>is accepted too. - http_statusesarray of strings or nullOptional
Only lines whose parsed HTTP status is one of these: a code (
502) or a class (5xx), at most 10. Only access log lines the backend parsed (a file entry with aformat) have a status. A list: repeat the parameter (http_statuses=<value>&http_statuses=<value>) or send one value (http_statuses=<value>);http_statuses[]=<value>is accepted too. - includearray of strings or nullOptional
Only lines that contain each of these texts (or any of them, with
match=any): literal text of 1 to 500 characters. A search holds at most 10 terms:search,excludeand every include and exclude list count together. A list: repeat the parameter (include=<value>&include=<value>) or send one value (include=<value>);include[]=<value>is accepted too. - include_wordsarray of strings or nullOptional
Only lines that contain each of these whole words: a word is bounded where its first and last characters are letters, digits or underscores (ASCII only, so
caféis bounded atcaf). A list: repeat the parameter (include_words=<value>&include_words=<value>) or send one value (include_words=<value>);include_words[]=<value>is accepted too. - include_regexarray of strings or nullOptional
Only lines that match each of these RE2 regular expressions: no lookahead, lookbehind, backreference, possessive quantifier or atomic group. At most 5 regex terms, with
exclude_regexand asearchwithsearch_mode=regex. Start one with(?i)to ignore case in that term alone. A list: repeat the parameter (include_regex=<value>&include_regex=<value>) or send one value (include_regex=<value>);include_regex[]=<value>is accepted too. - exclude_wordsarray of strings or nullOptional
Only lines that contain none of these whole words. A list: repeat the parameter (
exclude_words=<value>&exclude_words=<value>) or send one value (exclude_words=<value>);exclude_words[]=<value>is accepted too. - exclude_regexarray of strings or nullOptional
Only lines that match none of these RE2 regular expressions, as
include_regextakes them. A list: repeat the parameter (exclude_regex=<value>&exclude_regex=<value>) or send one value (exclude_regex=<value>);exclude_regex[]=<value>is accepted too. - matchstring or nullOptional
How the included terms combine:
all(the default), a line matches every one, orany, at least one; the excluded terms always apply. Needs an included term (search,include,include_wordsorinclude_regex).search_casesets the case of every term.Values:allany(an open set: new values may be added)
Returns
200 OK:
The matching lines counted per time bucket.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.
Search logs
GET/v1/logs
Searches the organisation’s server and log source lines, newest first, one page at a time. The window defaults to the last hour and reaches back to retention (30 days); a window that ends in the future ends now, and meta.window says the window read. Later pages keep the first page’s window. Filter by source, level, stream, tag and text. Its total is always null: the lines are not counted.
Needs the scope logs.view.
Query parameters
- source_uuidsarray of strings or nullOptional
Only lines from these servers or log sources, by uuid (a server’s uuid gives that server’s lines); a deleted one’s lines stay searchable for the retention. A list: repeat the parameter (
source_uuids=<uuid>&source_uuids=<uuid>) or send one value (source_uuids=<uuid>);source_uuids[]=<uuid>is accepted too. - levelsarray of strings or nullOptional
Only lines at one of these levels:
debug,info,notice,warning,error,critical,alertoremergency;unknownselects the lines with no level (theirlevelis null). A list: repeat the parameter (levels=debug&levels=info) or send one value (levels=debug);levels[]=debugis accepted too.Values:debuginfonoticewarningerrorcriticalalertemergencyunknown(an open set: new values may be added) - streamsarray of strings or nullOptional
Only lines in one of these streams. A list: repeat the parameter (
streams=<value>&streams=<value>) or send one value (streams=<value>);streams[]=<value>is accepted too. - searchstring or nullOptional
Only lines whose text contains this text.
- tag_uuidsarray of strings or nullOptional
Only lines from servers and log sources carrying any of these tags, by uuid. A list: repeat the parameter (
tag_uuids=<uuid>&tag_uuids=<uuid>) or send one value (tag_uuids=<uuid>);tag_uuids[]=<uuid>is accepted too. - periodstring or nullOptional
A relative window ending now: 1 to 9999 minutes, hours, days or weeks (
3h,2w). Not withfromandto. The operation names its longest window and its default. - fromstring or nullOptional
The start of a pinned window, epoch milliseconds or RFC 3339 with an offset. Needs
to. A start before the oldest data kept is served from it. - tostring or nullOptional
The end of a pinned window, epoch milliseconds or RFC 3339 with an offset, after
from. A window that ends before the oldest data kept is refused; one that ends in the future ends now, and the answer’s window says so. - limitinteger or nullOptional
The same as
per_page, kept for existing clients. - cursorstring or nullOptional
The
next_cursorof the previous page; omit it for the first page. - excludearray of strings or nullOptional
Only lines that contain none of these texts: at most 5, each at most 200 characters.
search_caseapplies to them;search_modedoes not, they are always literal text. A list: repeat the parameter (exclude=<value>&exclude=<value>) or send one value (exclude=<value>);exclude[]=<value>is accepted too. - search_modestring or nullOptional
How
searchis read:substring(the default) orregex, an RE2 pattern of at most 500 characters with no lookahead, lookbehind, backreference, possessive quantifier or atomic group.Values:substringregex(an open set: new values may be added) - search_casestring or nullOptional
Whether
searchandexcludeignore case:sensitive(the default) orinsensitive. It sets the case of every include and exclude list too.Values:sensitiveinsensitive(an open set: new values may be added) - unitsarray of strings or nullOptional
Only lines from these systemd units, exactly (
cloudflared.service): at most 20. Null on lines that did not come from a journal, and on lines from an agent too old to report the unit. A list: repeat the parameter (units=<value>&units=<value>) or send one value (units=<value>);units[]=<value>is accepted too. - identifiersarray of strings or nullOptional
Only lines with these journal identifiers (
SYSLOG_IDENTIFIER, such assshd), exactly: at most 20. A list: repeat the parameter (identifiers=<value>&identifiers=<value>) or send one value (identifiers=<value>);identifiers[]=<value>is accepted too. - http_statusesarray of strings or nullOptional
Only lines whose parsed HTTP status is one of these: a code (
502) or a class (5xx), at most 10. Only access log lines the backend parsed (a file entry with aformat) have a status. A list: repeat the parameter (http_statuses=<value>&http_statuses=<value>) or send one value (http_statuses=<value>);http_statuses[]=<value>is accepted too. - includearray of strings or nullOptional
Only lines that contain each of these texts (or any of them, with
match=any): literal text of 1 to 500 characters. A search holds at most 10 terms:search,excludeand every include and exclude list count together. A list: repeat the parameter (include=<value>&include=<value>) or send one value (include=<value>);include[]=<value>is accepted too. - include_wordsarray of strings or nullOptional
Only lines that contain each of these whole words: a word is bounded where its first and last characters are letters, digits or underscores (ASCII only, so
caféis bounded atcaf). A list: repeat the parameter (include_words=<value>&include_words=<value>) or send one value (include_words=<value>);include_words[]=<value>is accepted too. - include_regexarray of strings or nullOptional
Only lines that match each of these RE2 regular expressions: no lookahead, lookbehind, backreference, possessive quantifier or atomic group. At most 5 regex terms, with
exclude_regexand asearchwithsearch_mode=regex. Start one with(?i)to ignore case in that term alone. A list: repeat the parameter (include_regex=<value>&include_regex=<value>) or send one value (include_regex=<value>);include_regex[]=<value>is accepted too. - exclude_wordsarray of strings or nullOptional
Only lines that contain none of these whole words. A list: repeat the parameter (
exclude_words=<value>&exclude_words=<value>) or send one value (exclude_words=<value>);exclude_words[]=<value>is accepted too. - exclude_regexarray of strings or nullOptional
Only lines that match none of these RE2 regular expressions, as
include_regextakes them. A list: repeat the parameter (exclude_regex=<value>&exclude_regex=<value>) or send one value (exclude_regex=<value>);exclude_regex[]=<value>is accepted too. - matchstring or nullOptional
How the included terms combine:
all(the default), a line matches every one, orany, at least one; the excluded terms always apply. Needs an included term (search,include,include_wordsorinclude_regex).search_casesets the case of every term.Values:allany(an open set: new values may be added) - per_pageinteger or nullOptional
The number of lines in a page, from 1 to 2,000; 100 when omitted. A page of long lines can be shorter: it stops once the lines’ text passes 10 MB, and
next_cursorcontinues after the last line returned.
Returns
200 OK:
One page of the matching log lines.
Each item of the page:
- uuidstring or null
The line’s uuid, which
GET /v1/logs/contexttakes to read the lines around it. - logged_atinteger or null
Epoch milliseconds. When the line was logged.
An instant: epoch milliseconds, UTC. - timestring or null
The exact time the line is stored at: RFC 3339 UTC with nine fraction digits, so lines inside one millisecond are ordered. Take it with
uuidto read the line (GET /v1/logs/{line_uuid}). - console_urlstring or null
The console’s page of this line (
/logs/<uuid>?at=<time>); null for a line with no uuid. - time_sourcestring
Where
logged_atandtimecome from:read(the moment the agent read the line from its file, up to its 15-second collection interval after the event: not the event’s time),parsedorlate(the time written in the line’s text),journal(the journal’s event time),event_log(the Windows event’s own time),sender(the time a Log Source’s sender gave) orreceived(the backend’s receipt time, because the sender gave none that could be used). - received_atinteger or null
Epoch milliseconds. When the backend received the batch the line came in; null for a line stored without it.
An instant: epoch milliseconds, UTC. - levelstring or null
One of
debug,info,notice,warning,error,critical,alert,emergency; null for a line with no level. - streamstring or null
The stream the line belongs to; null for a line with no stream.
- messagestring
The line’s text.
- sourceobject
Where the line came from.
- typestring
serverorlog_source. - uuidstring or null
The source’s uuid.
- namestring or null
The source’s name; a deleted source reads as the console labels it.
- unitstring or null
The systemd unit that wrote the line (
cloudflared.service); null for a line that did not come from a journal and for a line from an agent too old to report the unit. - identifierstring or null
The journal identifier (
SYSLOG_IDENTIFIER, such assshd); null asunitis. - httpobject or null
The access line’s parsed fields; null for a line the backend did not parse: only a server file entry with a
formatis.- statusinteger
The HTTP status code.
- methodstring or null
The request method; null when the request line could not be read.
- pathstring or null
The request path without its query string; null when the request line could not be read.
- upstream_statusstring or null
The upstream’s status as nginx wrote it (
502, 502when it tried twice); null when there was none, and for every format butwt15_relay. - duration_msinteger or null
How long the request took, in milliseconds; null for the
nginx_combinedformat.
Each failure is a problem document with a stable code; the response panel's status selector shows each one this operation can answer, and errors lists them all.