Skip to main content
GET
/
api
/
v1
/
logs
/
patterns
cURL
curl --request GET \
  --url https://api.staging.qyl.dev/api/v1/logs/patterns
import requests

url = "https://api.staging.qyl.dev/api/v1/logs/patterns"

response = requests.get(url)

print(response.text)
const options = {method: 'GET'};

fetch('https://api.staging.qyl.dev/api/v1/logs/patterns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.staging.qyl.dev/api/v1/logs/patterns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.staging.qyl.dev/api/v1/logs/patterns"

req, _ := http.NewRequest("GET", url, nil)

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.staging.qyl.dev/api/v1/logs/patterns")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.staging.qyl.dev/api/v1/logs/patterns")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
[
  {
    "pattern_id": "<string>",
    "template": "<string>",
    "sample": "<string>",
    "count": 1,
    "first_seen": "2023-11-07T05:31:56Z",
    "last_seen": "2023-11-07T05:31:56Z",
    "severity_distribution": [
      {
        "severity_text": "<string>",
        "count": 1,
        "percentage": 50
      }
    ]
  }
]
{
"type": "about:blank",
"title": "Internal Server Error",
"status": 123,
"detail": "<string>",
"instance": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"error_code": "<string>"
}

Query Parameters

serviceName
string

Service name filter

startTime
string<date-time>

Start time

endTime
string<date-time>

End time

minCount
integer<int32>

Minimum occurrences

Response

The request has succeeded.

pattern_id
string
required

Pattern ID

template
string
required

Pattern template

sample
string
required

Sample log message

count
integer<int64>
required

Occurrence count

Required range: x >= 0
first_seen
string<date-time>
required

First seen

last_seen
string<date-time>
required

Last seen

trend
enum<string>
required

Trend

Available options:
increasing,
decreasing,
stable,
new,
spike
severity_distribution
object[]

Severity distribution