Query logs from ClickHouse with full-text search and filters.
GET
/logs/query
const url = 'https://api.siteqwality.com/logs/query';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/query \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” start_time
string
RFC3339 lower bound
end_time
string
RFC3339 upper bound
level
string
Filter by log level
source
string
Filter by source
env
string
Filter by environment
host
string
Filter by host
search
string
Free-text search
metadata_search
string
Search structured metadata fields
tags
string
Comma-separated tag filter
excluded
string
Comma-separated terms to exclude
limit
integer format: int32
Page size
offset
integer format: int32
Page offset
sort_field
string
Field to sort by
sort_order
string
Asc or desc
Responses
Section titled “ Responses ”Log query result
Media type application/json
object
logs
required
Array<object>
object
timestamp
required
string
level
required
string
message
required
string
host
required
string
env
required
string
source
required
string
version
required
string
device
required
string
tags
required
metadata
required
total
required
integer format: int64
Example generated
{ "logs": [ { "timestamp": "example", "level": "example", "message": "example", "host": "example", "env": "example", "source": "example", "version": "example", "device": "example", "tags": "example", "metadata": "example" } ], "total": 1}Missing or invalid authentication
Internal server error