Get recurring log patterns, clustered by normalised message template.
const url = 'https://api.siteqwality.com/logs/patterns';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.siteqwality.com/logs/patterns \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Responses
Section titled “ Responses ”Clustered log patterns
object
object
Normalised message template, e.g. “Connection timeout to {IP}:{NUM} after {NUM}ms”
Total count of log entries matching this template in the query window
ISO 8601 timestamp of the earliest matching log in the window
ISO 8601 timestamp of the most recent matching log in the window
Up to 3 raw message samples from the matching logs
Pre-built search term for the “Investigate” button: distinctive non-placeholder tokens from the template, joined.
Count of this template in the previous equal-length window. Absent when the request has no time range, so no comparison ran.
Integer percent change vs the previous window:
(count - previous) * 100 / previous. Absent when previous_count
is missing or zero (a new pattern has no percentage).
True when the comparison ran and this template was absent from the previous window.
Total distinct messages examined before clustering
Start of the previous equal-length window used for is_new / change_pct.
End of the previous equal-length window (equals the current window start).
Example generated
{ "patterns": [ { "template": "example", "count": 1, "first_seen": "example", "last_seen": "example", "samples": [ "example" ], "investigate_search": "example", "previous_count": 1, "change_pct": 1, "is_new": true } ], "messages_examined": 1, "generated_at": "example", "previous_window_start": "example", "previous_window_end": "example"}Missing or invalid authentication
Internal server error