Find log patterns
curl --request POST \
--url https://my.orq.ai/v3/logs/patterns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"query": "<string>",
"filter_operator": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
],
"limit": 123
}
'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',
query: '<string>',
filter_operator: '<string>',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}],
limit: 123
})
};
fetch('https://my.orq.ai/v3/logs/patterns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v3/logs/patterns"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"query": "<string>",
"filter_operator": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
],
"limit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"data": [
{
"id": "<string>",
"template": "<string>",
"count": "<string>",
"percentage": 123,
"first_seen": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"sample_log_ids": [
"<string>"
],
"severity_summary": [
{
"value": "<string>",
"count": "<string>"
}
],
"service_summary": [
{
"value": "<string>",
"count": "<string>"
}
],
"suggested_query": "<string>"
}
],
"meta": {
"request_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"total_count": "<string>",
"sampled_count": "<string>",
"truncated": true,
"warnings": [
"<string>"
]
}
}Logs
Find log patterns
Find stable templates in a bounded sample of matching log bodies. The response reports sampling and truncation metadata and never returns an unbounded list of raw bodies.
POST
/
v3
/
logs
/
patterns
Find log patterns
curl --request POST \
--url https://my.orq.ai/v3/logs/patterns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"query": "<string>",
"filter_operator": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": [
"<string>"
]
}
],
"limit": 123
}
'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',
query: '<string>',
filter_operator: '<string>',
filters: [{field: '<string>', op: '<string>', values: ['<string>']}],
limit: 123
})
};
fetch('https://my.orq.ai/v3/logs/patterns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://my.orq.ai/v3/logs/patterns"
payload = {
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"query": "<string>",
"filter_operator": "<string>",
"filters": [
{
"field": "<string>",
"op": "<string>",
"values": ["<string>"]
}
],
"limit": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"object": "<string>",
"data": [
{
"id": "<string>",
"template": "<string>",
"count": "<string>",
"percentage": 123,
"first_seen": "2023-11-07T05:31:56Z",
"last_seen": "2023-11-07T05:31:56Z",
"sample_log_ids": [
"<string>"
],
"severity_summary": [
{
"value": "<string>",
"count": "<string>"
}
],
"service_summary": [
{
"value": "<string>",
"count": "<string>"
}
],
"suggested_query": "<string>"
}
],
"meta": {
"request_id": "<string>",
"from": "2023-11-07T05:31:56Z",
"to": "2023-11-07T05:31:56Z",
"total_count": "<string>",
"sampled_count": "<string>",
"truncated": true,
"warnings": [
"<string>"
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Was this page helpful?