Aggregate logs
curl --request POST \
--url https://my.orq.ai/v3/logs/aggregate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"grain": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
grain: '<string>',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}]
})
};
fetch('https://my.orq.ai/v3/logs/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v3/logs/aggregate"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"grain": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"buckets": [
{
"timestamp": "2023-11-07T05:31:56Z",
"severity_counts": {},
"total_count": "<string>"
}
]
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Logs
Aggregate logs
Return severity counts grouped by time buckets at a configurable grain (auto, minute, hour, day).
POST
/
v3
/
logs
/
aggregate
Aggregate logs
curl --request POST \
--url https://my.orq.ai/v3/logs/aggregate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"grain": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
from: '2023-11-07T05:31:56Z',
to: '2023-11-07T05:31:56Z',
grain: '<string>',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}]
})
};
fetch('https://my.orq.ai/v3/logs/aggregate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v3/logs/aggregate"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"grain": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"buckets": [
{
"timestamp": "2023-11-07T05:31:56Z",
"severity_counts": {},
"total_count": "<string>"
}
]
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Authorizations
Body
application/json
Was this page helpful?