Log search
Search logs for a tenant resource with the v1 (grouped by pod) or v2 (flat list) endpoint.
Search logs for a specific tenant resource. The gateway proxies the request to the Logsearch upstream. Available as v1 and v2. They use the same path parameters, query parameters, and headers. The response shape differs: v1 groups log entries by pod/container, while v2 returns a flat list with repeated metadata.
Search logs (v1)
GET /v1/tenants/{tenant}/resources/{type}/{version}/{name}/logs/search
Upstream: Logsearch
Path Parameters
tenant
string
Tenant identifier, e.g. engineering
type
string
Resource type, e.g. service
version
string
Resource version, e.g. v2alpha
name
string
Resource name, e.g. dataproduct-mcp
Query Parameters
q
string
Required. Log search query (e.g. * for all logs, or a keyword/phrase)
window
string
Relative time window, default 1h (e.g. 1h, 24h). Use either window or start_timestamp + end_timestamp, not both
start_timestamp
number
Start of time range (Unix epoch seconds). Must be used with end_timestamp
end_timestamp
number
End of time range (Unix epoch seconds). Must be used with start_timestamp
limit
number
Maximum number of log hits to return, default 100 (1–1000)
offset
number
Pagination offset, default 0
run_id
string
Filter by run ID
cgroup
string
Filter by container group / pod name (e.g. servicev2alphasvcwithinlinedisk01-gukd-0)
container
string
Filter by container name
stream
string
Filter by log stream (stdout or stderr). May be passed empty
Headers
Authorization or apikey
Bearer <access_token> or <your-apikey>. Required when gateway auth is enabled. See Authentication
Accept
application/json (recommended)
Dataos-Correlation-Id
Optional tracing ID
cURL:
Response
data.results is a map keyed by <pod>/<container>. Each entry has name, namespace, dataplane, containerName, source, and a logs[] array of {time, stream, message}. Multiple pods/containers may appear, each under its own key.
Missing or invalid query (e.g. missing q).
Missing or invalid auth.
Valid token but access denied.
Upstream or internal error.
Logsearch upstream failure.
Search logs (v2)
GET /v2/tenants/{tenant}/resources/{type}/{version}/{name}/logs/search
Same path parameters, query parameters, and headers as v1 above. The response is flattened: data.results is an array of individual log entries, not a map of pod/container groups. Each entry includes name, namespace, dataplane, containerName, source, time, stream, and message. There is no nested logs[] array.
cURL:
Response
Captured live from GET /v2/tenants/stg/resources/app/v1alpha/orders-channel-performance-dashboard/logs/search?q=*&window=720h&limit=5:
data.results is a flat array. Each element is one log line with inlined pod/container metadata: name, namespace, dataplane, containerName, and source. Those values repeat across every log line from that pod. Compare this with v1's grouped shape above.
Missing or invalid query (e.g. missing q).
Missing or invalid auth.
Valid token but access denied.
Upstream or internal error.
Logsearch upstream failure.
v1 vs v2
Path
$BASE_URL/v1/tenants/.../logs/search
$BASE_URL/v2/tenants/.../logs/search
Path/query params
Same
Same
Response shape
data.results grouped by pod/container (map), each with a nested logs[]
data.results flat array, pod/container metadata inlined on every log entry
Upstream target
Logsearch /api/v1/.../logs/search
Logsearch /api/v2/.../logs/search
Use v1 if you want logs pre-grouped by pod/container. Use v2 if you want a flat, iterable list of log lines and would rather not write grouping logic yourself. platform-api forwards path and query params to the corresponding upstream API version either way.
Notes
qis required. Use*to match all log lines in the time window.Use
windowfor relative ranges (1h,24h) orstart_timestamp+end_timestampfor absolute ranges, not both.v1 groups results by pod/container under
data.results, each with alogs[]array. v2 flattens the same data into one array underdata.results, with pod/container fields repeated per entry.Default
limitis100; increase up to1000and paginate withoffset.
Last updated
Was this helpful?