Skip to main content
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": 50,
  "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": 50,
"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: 50,
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' => 50,
'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\": 50,\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\": 50,\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\": 50,\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>"
      },
      "time": "2023-11-07T05:31:56Z",
      "json_log": {},
      "parent_span_id": "<string>",
      "span_Id": "<string>",
      "text_log": "<string>",
      "trace_Id": "<string>"
    }
  ],
  "organization_name": "<string>",
  "page_max_time": "2023-11-07T05:31:56Z",
  "page_min_time": "2023-11-07T05:31:56Z"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
{
"detail": "<string>",
"instance": "<string>",
"status": 349,
"title": "<string>",
"type": "about:blank"
}
Last Updated: July 1, 2025

Authorizations

Salad-Api-Key
string
header
required

Path Parameters

organization_name
string
required

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 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"acme-corp"

Body

application/json

Represents a query for logs

end_time
string<date-time>
required

The end time of the time range

query
string
required

The query string for filtering logs

Maximum string length: 20000
start_time
string<date-time>
required

The start time of the time range

page_size
integer<int32>

The maximum number of items per page.

Required range: 1 <= x <= 100
Example:

1

sort_order
enum<string>
default:desc

The sort order of the log entries. asc will sort the log entries in chronological order. desc will sort the log entries in reverse chronological order.

Available options:
desc,
asc

Response

OK

Represents a page of organization logs

items
object[]
required

A collection of log entries

Maximum array length: 10000
organization_name
string
required

The organization name.

Required string length: 2 - 63
Pattern: ^[a-z][a-z0-9-]{0,61}[a-z0-9]$
Example:

"acme-corp"

page_max_time
string<date-time>
required

The maximum time page boundary. This may be used when getting paginated results.

page_min_time
string<date-time>
required

The minimum time page boundary. This may be used when getting paginated results.