Query Log Entries
curl --request POST \
--url https://api.salad.com/api/public/organizations/{organization_name}/log-entries \
--header 'Content-Type: application/json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"query": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"page_size": 1,
"sort_order": "desc"
}
'import requests
url = "https://api.salad.com/api/public/organizations/{organization_name}/log-entries"
payload = {
"end_time": "2023-11-07T05:31:56Z",
"query": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"page_size": 1,
"sort_order": "desc"
}
headers = {
"Salad-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_time: '2023-11-07T05:31:56Z',
query: '<string>',
start_time: '2023-11-07T05:31:56Z',
page_size: 1,
sort_order: 'desc'
})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/log-entries', 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.salad.com/api/public/organizations/{organization_name}/log-entries",
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([
'end_time' => '2023-11-07T05:31:56Z',
'query' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'page_size' => 1,
'sort_order' => 'desc'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Salad-Api-Key: <api-key>"
],
]);
$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.salad.com/api/public/organizations/{organization_name}/log-entries"
payload := strings.NewReader("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Salad-Api-Key", "<api-key>")
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.salad.com/api/public/organizations/{organization_name}/log-entries")
.header("Salad-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/log-entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"receive_time": "2023-11-07T05:31:56Z",
"resource": {
"labels": {},
"type": "<string>"
},
"severity": "default",
"time": "2023-11-07T05:31:56Z",
"json_log": {},
"parent_span_id": "<string>",
"span_Id": "<string>",
"text_log": "<string>",
"trace_Id": "<string>"
}
],
"organization_name": "acme-corp",
"page_max_time": "2023-11-07T05:31:56Z",
"page_min_time": "2023-11-07T05:31:56Z"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}Log Entries
Query Log Entries
Retrieve a collection of log entries for the organization identified by {organization_name} matching the log query.
POST
/
organizations
/
{organization_name}
/
log-entries
Query Log Entries
curl --request POST \
--url https://api.salad.com/api/public/organizations/{organization_name}/log-entries \
--header 'Content-Type: application/json' \
--header 'Salad-Api-Key: <api-key>' \
--data '
{
"end_time": "2023-11-07T05:31:56Z",
"query": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"page_size": 1,
"sort_order": "desc"
}
'import requests
url = "https://api.salad.com/api/public/organizations/{organization_name}/log-entries"
payload = {
"end_time": "2023-11-07T05:31:56Z",
"query": "<string>",
"start_time": "2023-11-07T05:31:56Z",
"page_size": 1,
"sort_order": "desc"
}
headers = {
"Salad-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Salad-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_time: '2023-11-07T05:31:56Z',
query: '<string>',
start_time: '2023-11-07T05:31:56Z',
page_size: 1,
sort_order: 'desc'
})
};
fetch('https://api.salad.com/api/public/organizations/{organization_name}/log-entries', 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.salad.com/api/public/organizations/{organization_name}/log-entries",
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([
'end_time' => '2023-11-07T05:31:56Z',
'query' => '<string>',
'start_time' => '2023-11-07T05:31:56Z',
'page_size' => 1,
'sort_order' => 'desc'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Salad-Api-Key: <api-key>"
],
]);
$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.salad.com/api/public/organizations/{organization_name}/log-entries"
payload := strings.NewReader("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Salad-Api-Key", "<api-key>")
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.salad.com/api/public/organizations/{organization_name}/log-entries")
.header("Salad-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.salad.com/api/public/organizations/{organization_name}/log-entries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Salad-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_time\": \"2023-11-07T05:31:56Z\",\n \"query\": \"<string>\",\n \"start_time\": \"2023-11-07T05:31:56Z\",\n \"page_size\": 1,\n \"sort_order\": \"desc\"\n}"
response = http.request(request)
puts response.read_body{
"items": [
{
"receive_time": "2023-11-07T05:31:56Z",
"resource": {
"labels": {},
"type": "<string>"
},
"severity": "default",
"time": "2023-11-07T05:31:56Z",
"json_log": {},
"parent_span_id": "<string>",
"span_Id": "<string>",
"text_log": "<string>",
"trace_Id": "<string>"
}
],
"organization_name": "acme-corp",
"page_max_time": "2023-11-07T05:31:56Z",
"page_min_time": "2023-11-07T05:31:56Z"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}{
"detail": "The container group could not be found.",
"instance": "https://example.com/error-instances/12345",
"status": 404,
"title": "Not Found",
"type": "https://example.com/errors/invalid-request"
}Last Updated: July 1, 2025
Path Parameters
Your organization name. This identifies the billing context for the API operation and represents a security boundary for SaladCloud resources. The organization must be created before using the API, and you must be a member of the organization. The organization name.
Required string length:
2 - 63Pattern:
^[a-z][a-z0-9-]{0,61}[a-z0-9]$Example:
"acme-corp"
Body
application/json
Represents a query for logs
Response
OK
Represents a page of organization logs
Was this page helpful?