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

# Search project logs

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

## Request

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

Search or filter logs for one resource type in the project. Set
`resource.type` to `function`, `frontend`, or `database`. Add
`resource.ids` to filter to one or more resources, and add
`resource.deployments.ids` to read deployment logs instead of runtime
logs for functions and frontends. Deployment logs are not supported for
databases. Database logs are a SUPERAGENT feature; requests for
`resource.type=database` from a HOBBY project owner return 403.
Log history (runtime and deployment) is limited to the plan's retention
window (HOBBY: 1 day, SUPERAGENT: 30 days); older time ranges are clamped to that
window.

## Path parameters

- `id` string, uuid, required

## Request body

- LogSearchRequest: Search request for project logs.
  - `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. Supports quoted text, implicit AND, AND/OR/NOT, parentheses, and fields such as `level`, `region`, `invocation.id`, `resource.id`, `resource.name`, `function`, `frontend`, `database`, and `body`.
  - `start_time` string, date-time: Start time.
  - `end_time` string, date-time: End time.
  - `limit` integer: Maximum number of records to return.
  - `cursor` string: Opaque pagination cursor from the previous response's `next_cursor`.

## Response `200`

Successful response

- LogSearchResponse: Paginated project runtime log search response.
  - `data` LogSearchEvent[], required: Array of log events sorted by timestamp, newest first.
    - LogSearchEvent
      - [`LogEvent`](https://skmtc.dev/kong/apis/volcano-api/revisions/84c4488f91e9/schema?at=%2Fcomponents%2Fschemas%2FLogEvent)
      - object: Runtime log event returned by project log search. Search results always include a stable event ID and owning resource.
        - `id` string, required: Opaque stable log event ID for pagination, deduplication, and display.
        - `resource` LogResource, required: Resource that owns a historical log event.
          - `type` 'function' | 'frontend' | 'database', required: Resource type that owns the log event.
          - `id` string, uuid, required: Resource ID that owns the log event.
          - `name` string: Resource name associated with the log event, when available.
  - `limit` integer, required: Number of items requested per page.
  - `has_more` boolean, required: Whether the search may have more matching log events. A page can hold fewer than `limit` events, or none, while this is true; keep paging until it is false.
  - `next_cursor` string: Opaque cursor for the next page, present while `has_more` is true. Send this value as `cursor` on the next request, even when `data` is empty.

## Other responses

- `400`: Bad request - invalid query parameter
- `401`: Unauthorized - invalid or missing token
- `403`: Forbidden - project ownership required
- `404`: Project or resource not found

## 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, 17 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 `200`
  - …21 more
- **2026-08-27** `bb44e98aba2e`: 13 breaking, 12 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 `200`
  - 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`
  - …21 more
- **2026-07-27** `bb52784e098a`: 1 breaking, 5 warning, 5 info
  - removed the required property `data/items/allOf[#/components/schemas/LogEvent]/message` from the response with the `200` status
  - the `q` request property's maxLength was set to `512`
  - removed the request property `levels`
  - removed the request property `regions`
  - …7 more

[Operation history](https://skmtc.dev/kong/apis/volcano-api/changes/projects/:id/logs/search/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)
