curl --request POST \
--url https://api.ravion.com/aws/cloudwatch/logs-insights \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"complete": true,
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": [
"<string>"
],
"moduleInstanceIds": [
"<string>"
]
}
'import requests
url = "https://api.ravion.com/aws/cloudwatch/logs-insights"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"complete": True,
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": ["<string>"],
"moduleInstanceIds": ["<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>',
complete: true,
deploymentResourceId: '<string>',
environmentId: '<string>',
limit: 123,
logSourceKeys: ['<string>'],
moduleInstanceIds: ['<string>']
})
};
fetch('https://api.ravion.com/aws/cloudwatch/logs-insights', 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/aws/cloudwatch/logs-insights",
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>',
'complete' => true,
'deploymentResourceId' => '<string>',
'environmentId' => '<string>',
'limit' => 123,
'logSourceKeys' => [
'<string>'
],
'moduleInstanceIds' => [
'<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/aws/cloudwatch/logs-insights"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\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/aws/cloudwatch/logs-insights")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/aws/cloudwatch/logs-insights")
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 \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"missedSources": [
"<string>"
],
"nextEndTimeMs": 123,
"partial": true,
"resultCount": 123,
"rows": [
{
"level": "<string>",
"logSourceId": "<string>",
"logStream": "<string>",
"message": "<string>",
"sourceId": "<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>"
}{
"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 CloudWatch Logs Insights rows
Run CloudWatch Logs Insights over a selected set of module-instance ui.logs sources, filtered by a structured predicate tree.
curl --request POST \
--url https://api.ravion.com/aws/cloudwatch/logs-insights \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"endTime": "<string>",
"startTime": "<string>",
"complete": true,
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": [
"<string>"
],
"moduleInstanceIds": [
"<string>"
]
}
'import requests
url = "https://api.ravion.com/aws/cloudwatch/logs-insights"
payload = {
"endTime": "<string>",
"startTime": "<string>",
"complete": True,
"deploymentResourceId": "<string>",
"environmentId": "<string>",
"limit": 123,
"logSourceKeys": ["<string>"],
"moduleInstanceIds": ["<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>',
complete: true,
deploymentResourceId: '<string>',
environmentId: '<string>',
limit: 123,
logSourceKeys: ['<string>'],
moduleInstanceIds: ['<string>']
})
};
fetch('https://api.ravion.com/aws/cloudwatch/logs-insights', 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/aws/cloudwatch/logs-insights",
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>',
'complete' => true,
'deploymentResourceId' => '<string>',
'environmentId' => '<string>',
'limit' => 123,
'logSourceKeys' => [
'<string>'
],
'moduleInstanceIds' => [
'<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/aws/cloudwatch/logs-insights"
payload := strings.NewReader("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\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/aws/cloudwatch/logs-insights")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"endTime\": \"<string>\",\n \"startTime\": \"<string>\",\n \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ravion.com/aws/cloudwatch/logs-insights")
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 \"complete\": true,\n \"deploymentResourceId\": \"<string>\",\n \"environmentId\": \"<string>\",\n \"limit\": 123,\n \"logSourceKeys\": [\n \"<string>\"\n ],\n \"moduleInstanceIds\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"missedSources": [
"<string>"
],
"nextEndTimeMs": 123,
"partial": true,
"resultCount": 123,
"rows": [
{
"level": "<string>",
"logSourceId": "<string>",
"logStream": "<string>",
"message": "<string>",
"sourceId": "<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>"
}{
"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 Logs Insights query. Scope is resolved from whichever selector is provided — environmentId (all of an environment's instances), moduleInstanceIds, logSourceKeys, or deploymentResourceId (one deployment resource's own log streams) — so the endpoint is not tied to one entity type. At least one is required.
Scope to everything one deployment resource logged. For an ECS task the server resolves the per-container log groups and exact stream names from the task-definition snapshot. For an EC2 instance it resolves the deploy's log group and returns both of the instance's stream families — the application output the owning module's log sources also carry, and the SSM deploy script's transcript — across every release that has run on that instance. Any other resource type is rejected. Must not be combined with environmentId, moduleInstanceIds, or logSourceKeys. Rows matched through this selector have empty sourceId/logSourceId — they aren't tied to a ui.logs source.
Restrict to these individual ui.logs sources, each a composite <moduleInstanceId>::<logSourceId> key (the ui.logs source id is unique only within an instance). When set, only the named sources are queried — a finer filter than moduleInstanceIds, which it overrides for the listed instances. May be supplied without environmentId.
Response
The request has succeeded.
Response payload for a CloudWatch Logs Insights ROW query (the histogram is a separate endpoint).
Epoch-millis cursor for the NEXT (older) page: re-query with the same startTime and this value as endTime. 0 means there are no older rows to load. Computed server-side from the raw coverage boundary (not the post-filter row count), so a narrow level filter — or sources of differing density — never makes a short page look like the end of the data.
True when one or more selected log sources could not be queried (e.g. an account's credentials failed), so the rows omit those sources. The affected sources are listed in missedSources. This is NOT set for paging — the row list is complete up to limit, with older rows reachable via nextEndTimeMs.
Was this page helpful?