---
title: "Stream project logs"
method: POST
path: "/projects/{id}/logs/stream"
tags: ["Logs"]
---

# Stream project logs

`POST /projects/{id}/logs/stream`

## Request

- Base URL: `https://api.volcano.dev`
- URL: `https://api.volcano.dev/projects/{id}/logs/stream`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Live-tail project logs as Server-Sent Events. The request body uses the
resource selector plus `q`, `start_time`, and `limit`,
including runtime logs and function/frontend deployment logs selected
with `resource.deployments`. Deployment logs are not supported for
databases. Database logs are a SUPERAGENT feature; `resource.type=database`
from a HOBBY project owner returns 403. The `q` field uses the same
syntax as search and activity requests. Do not send `cursor` or
`end_time`; use `/logs/search` for range backfills.
Explicit historical `start_time` values are limited to the plan's
retention window (HOBBY: 1 day, SUPERAGENT: 30 days). Resume with
`Last-Event-ID` or the `last_event_id` query parameter. The cursor is
bound to the request body: the resource selector and every filter must
match the original request when reconnecting, otherwise the request is
rejected with `400`.

This is a live tail, not a gap-free backfill. On connect or reconnect the
server delivers at most `limit` of the most recent matching events from
the cursor position and then follows new events; events older than that
window are not replayed. Use `/logs/search` to backfill a time range.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `last_event_id` string

## Headers

- `Last-Event-ID` string

## Request body

- LogStreamRequest: Stream request for live project logs. Pagination cursors and fixed end times are not supported.
  - `resource` union, required: Resource selectors for project log reads.
    - LogFunctionRequestResource: Edge Function log resource selector.
      - `type` 'function', required: Resource type to read logs for.
      - `ids` string[]: Optional function identifiers. Omit or send an empty array to include every function in the project.
      - `kind` 'standard' | 'durable': Read only functions of this kind. Omit to include standard and durable functions. With `ids`, the listed functions of other kinds are left out, so an ID of the other kind returns no logs. Search, stream, and activity cursors are bound to the kind.
      - `deployments` LogDeploymentRequestSelector: Deployment log selector for deployable resources.
        - `ids` string[]: Optional deployment identifiers. Omit or send an empty array to include every deployment for the selected resources.
    - LogFrontendRequestResource: Frontend log resource selector.
      - `type` 'frontend', required: Resource type to read logs for.
      - `ids` string[]: Optional frontend identifiers. Omit or send an empty array to include every frontend in the project.
      - `deployments` LogDeploymentRequestSelector: Deployment log selector for deployable resources.
        - `ids` string[]: Optional deployment identifiers. Omit or send an empty array to include every deployment for the selected resources.
    - LogDatabaseRequestResource: Database runtime log resource selector. Deployment logs are not supported for databases.
      - `type` 'database', required: Resource type to read logs for.
      - `ids` string[]: Optional database identifiers. Omit or send an empty array to include every database in the project.
  - `q` string: Optional log query using the same syntax as search and activity requests.
  - `start_time` string, date-time: Start time.
  - `limit` integer: Maximum number of records to deliver on connect or reconnect before following new events.

## Response `200`

Server-Sent Events stream. `log` events contain a JSON `LogSearchEvent`; `warning` events contain a JSON object with an `error` field.

## Other responses

- `400`: Bad request - invalid selector, stream cursor, or unsupported stream field
- `401`: Unauthorized - invalid or missing token
- `403`: Forbidden - project ownership required
- `404`: Project or resource not found
- `500`: Internal server error - log streaming setup failed

## Changes

- **2026-10-07** `23e7875e7c4c`: 2 info
  - the endpoint scheme security `ProjectAccessToken` was added to the API
  - added the new optional request property `resource/oneOf[#/components/schemas/LogFunctionRequestResource]/kind`
- **2026-09-19** `3a6f365f3f35`: 8 breaking, 13 info
  - added the new path request parameter `id`
  - added the new required request property `resource`
  - the request's body type changed from no type to `object`
  - the response's body type changed from no type to `object` for status `400`
  - …17 more
- **2026-08-27** `bb44e98aba2e`: 11 breaking, 10 warning
  - the request's body type changed from `object` to no type
  - the response's body type changed from `object` to no type for status `400`
  - the response's body type changed from `object` to no type for status `401`
  - the response's body type changed from `object` to no type for status `403`
  - …17 more
- **2026-07-27** `bb52784e098a`: 2 warning, 6 info
  - removed the request property `levels`
  - removed the request property `regions`
  - added the new optional request property `q`
  - added the optional property `code` to the response with the `400` status
  - …4 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/logs/stream/post.md)

---

[API](https://skmtc.dev/kong/apis/volcano-api.md) - [All operations](https://skmtc.dev/kong/apis/volcano-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9?raw)
