curl --request POST \
--url https://api.ravion.com/logs/eks-loki \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": [
"<string>"
],
"moduleDeploymentId": "<string>",
"moduleInstanceIds": [
"<string>"
],
"pod": "<string>"
}
'import requests
url = "https://api.ravion.com/logs/eks-loki"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": ["<string>"],
"moduleDeploymentId": "<string>",
"moduleInstanceIds": ["<string>"],
"pod": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endTime: '<string>',
startTime: '<string>',
deploymentResourceId: '<string>',
environmentId: '<string>',
limit: 123,
logSourceKeys: ['<string>'],
moduleDeploymentId: '<string>',
moduleInstanceIds: ['<string>'],
pod: '<string>'
})
};
fetch('https://api.ravion.com/logs/eks-loki', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'endTime' => '<string>',
'startTime' => '<string>',
'deploymentResourceId' => '<string>',
'environmentId' => '<string>',
'limit' => 123,
'logSourceKeys' => [
'<string>'
],
'moduleDeploymentId' => '<string>',
'moduleInstanceIds' => [
'<string>'
],
'pod' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/logs/eks-loki"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ravion.com/logs/eks-loki")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/logs/eks-loki")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"missedSources": [
"<string>"
],
"nextEndTimeMs": 123,
"offlineClusters": [
"<string>"
],
"partial": true,
"resultCount": 123,
"rows": [
{
"level": "<string>",
"logSourceId": "<string>",
"message": "<string>",
"sourceId": "<string>",
"stream": "<string>",
"timestamp": 123,
"eventId": "<string>"
}
],
"unsupported": [
"<string>"
]
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Query in-cluster Loki log rows
Query rows from the in-cluster Loki behind each selected loki ui.logs source, through the Operator agent. POST /logs/eks-loki in the Ravion API reference.
curl --request POST \
--url https://api.ravion.com/logs/eks-loki \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": [
"<string>"
],
"moduleDeploymentId": "<string>",
"moduleInstanceIds": [
"<string>"
],
"pod": "<string>"
}
'import requests
url = "https://api.ravion.com/logs/eks-loki"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": ["<string>"],
"moduleDeploymentId": "<string>",
"moduleInstanceIds": ["<string>"],
"pod": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
endTime: '<string>',
startTime: '<string>',
deploymentResourceId: '<string>',
environmentId: '<string>',
limit: 123,
logSourceKeys: ['<string>'],
moduleDeploymentId: '<string>',
moduleInstanceIds: ['<string>'],
pod: '<string>'
})
};
fetch('https://api.ravion.com/logs/eks-loki', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'endTime' => '<string>',
'startTime' => '<string>',
'deploymentResourceId' => '<string>',
'environmentId' => '<string>',
'limit' => 123,
'logSourceKeys' => [
'<string>'
],
'moduleDeploymentId' => '<string>',
'moduleInstanceIds' => [
'<string>'
],
'pod' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.ravion.com/logs/eks-loki"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.ravion.com/logs/eks-loki")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/logs/eks-loki")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleDeploymentId\": \"<string>\",\n \"moduleInstanceIds\": [\n \"<string>\"\n ],\n \"pod\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"missedSources": [
"<string>"
],
"nextEndTimeMs": 123,
"offlineClusters": [
"<string>"
],
"partial": true,
"resultCount": 123,
"rows": [
{
"level": "<string>",
"logSourceId": "<string>",
"message": "<string>",
"sourceId": "<string>",
"stream": "<string>",
"timestamp": 123,
"eventId": "<string>"
}
],
"unsupported": [
"<string>"
]
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}{
"code": "<string>",
"message": "<string>",
"action": {
"label": "<string>",
"url": "<string>"
},
"description": "<string>",
"details": [
{
"render": "<string>",
"title": "<string>",
"items": [
"<string>"
],
"object": {}
}
],
"isInternal": true,
"metadata": {},
"requestId": "<string>"
}Body
Request body for the Loki row query. Scope is resolved from whichever selector is provided — environmentId, moduleInstanceIds, logSourceKeys, or deploymentResourceId (one EKS workload) — exactly as the CloudWatch row query resolves its own. At least one is required. Only loki ui.logs sources are considered; CloudWatch sources in the same selection are ignored here and served by the CloudWatch endpoint, which is what lets a caller fan a single selection out across both.
Scope to one EKS workload deployment resource. The server builds the LogQL selector from the workload's recorded namespace and name, so a caller never states a selector of its own. Must not be combined with environmentId, moduleInstanceIds, logSourceKeys, or moduleDeploymentId.
Scope to one EKS module deployment's own log: the output of the Operator executor that applied it, collected into the cluster's Loki. The server builds the selector from the deployment id and resolves the cluster from the deployment. Must not be combined with any other selector. Empty for deployments the EC2 runner applied, whose log is in CloudWatch.
Response
The request has succeeded.
Rows matching the query, plus what could not be answered. offlineClusters is the field that distinguishes this endpoint from its CloudWatch counterpart: a cluster whose Operator agent is not connected contributes no rows, and saying so by name is the difference between a user fixing their agent and a user believing their workload printed nothing.
Was this page helpful?