curl --request GET \
--url https://api.ravion.com/logs/eks-loki/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ravion.com/logs/eks-loki/stream"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ravion.com/logs/eks-loki/stream', 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.ravion.com/logs/eks-loki/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.ravion.com/logs/eks-loki/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.ravion.com/logs/eks-loki/stream")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/logs/eks-loki/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"level": "<string>",
"logSourceId": "<string>",
"message": "<string>",
"sourceId": "<string>",
"stream": "<string>",
"timestamp": 123,
"eventId": "<string>"
}
],
"isFinal": true
}Stream in-cluster Loki logs (SSE)
Stream one Loki log source live over SSE: recent history first, then Loki’s own /loki/api/v1/tail WebSocket bridged over the Operator substream.
curl --request GET \
--url https://api.ravion.com/logs/eks-loki/stream \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ravion.com/logs/eks-loki/stream"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ravion.com/logs/eks-loki/stream', 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.ravion.com/logs/eks-loki/stream",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.ravion.com/logs/eks-loki/stream"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.ravion.com/logs/eks-loki/stream")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/logs/eks-loki/stream")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"events": [
{
"level": "<string>",
"logSourceId": "<string>",
"message": "<string>",
"sourceId": "<string>",
"stream": "<string>",
"timestamp": 123,
"eventId": "<string>"
}
],
"isFinal": true
}Query Parameters
Composite <moduleInstanceId>::<logSourceId> key of the ui.logs source to tail. Mutually exclusive with deploymentResourceId.
EKS workload deployment resource to tail. Mutually exclusive with logSourceKey.
Inclusive start of the historical phase (ISO 8601). Defaults to fifteen minutes before now.
Inclusive end of the historical phase (ISO 8601). Defaults to now.
Continue into a live tail after the historical phase.
Case-sensitive substring the line must contain, compiled to a LogQL line filter. A plain string rather than the structured filter tree because a recursive model cannot ride a query param on an SSE GET.
Was this page helpful?