---
title: "Query Log Entries"
method: POST
path: "/organizations/{organization_name}/log-entries"
tags: ["logs"]
---

# Query Log Entries

`POST /organizations/{organization_name}/log-entries`

Retrieve a collection of _log entries_ for the _organization_ identified by `{organization_name}` matching the log query.

## Request body

- LogEntryQuery — Represents a query for logs
  - `end_time` string, date-time, required — The end time of the time range
  - `page_size` integer — The maximum number of items per page.
  - `query` string, required — The query string for filtering logs
  - `sort_order` 'desc' | 'asc' — 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.
  - `start_time` string, date-time, required — The start time of the time range

## Response `200`

OK

- LogEntryCollection — Represents a page of organization logs
  - `items` LogEntry[], required — A collection of log entries
    - `json_log` object — The log message in JSON format.
    - `parent_span_id` string — The parent span ID of the log entry
    - `receive_time` string, date-time, required — The time when the log entry was received
    - `resource` LogEntryResource, required — The resource associated with the log entry
      - `labels` object, required — The labels associated with the resource
      - `type` string, required — The type of the resource
    - `severity` 'default' | 'debug' | 'info' | 'notice' | 'warning' | 'error' | 'critical' | 'alert' | 'emergency', required — The severity level of the log entry
    - `span_Id` string — The span ID of the log entry
    - `text_log` string — The log message in text format.
    - `time` string, date-time, required — The timestamp of the log entry
    - `trace_Id` string — The trace ID of the log entry
  - `organization_name` string, required — The organization name.
  - `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.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too Many Requests
- `default` — Unknown Error

---

[API](https://skmtc.net/salad/apis/saladcloud-api.md) · [All operations](https://skmtc.net/salad/apis/saladcloud-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/salad/saladcloud-api/revisions/6ee34c3732f3/schema)
