---
title: "List Resource Events Route"
method: GET
path: "/api/v1/resources/{resource_id}/events"
tags: ["resources"]
---

# List Resource Events Route

`GET /api/v1/resources/{resource_id}/events`

## Request

- Base URL: `https://memory.kagura-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://memory.kagura-ai.com/api/v1/resources/{resource_id}/events`
- Auth: none declared

Browse ingested events for a resource, newest first (cursor-paginated).

Owner-only (``WorkspaceOwner``) for parity with the rest of the resources
surface (#389). Events are scoped to the caller's workspace via the
authoritative ``resource_pk``; a slug that does not resolve to a Resource
in this workspace returns an empty page (CWE-639 fail-safe).

Example:
    GET /api/v1/resources/ec-products/events?op=upsert&limit=20

## Path parameters

- `resource_id` string, required

## Query parameters

- `op` 'upsert' | 'delete', nullable: Filter by operation type
- `doc_id` string, nullable: Filter by exact document id
- `version` integer, nullable: Filter by exact document version
- `since` string, date-time, nullable: Only events created at or after this ISO 8601 timestamp
- `limit` integer, nullable: Page size (default 20, max 100)
- `cursor` string, nullable: Opaque cursor from a previous response's next_cursor

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- ResourceEventsResponse: Cursor-paginated resource events response.
  - `events` ResourceEventRecord[], required
    - `id` string, required: BigInt append-only event id (also the cursor key), serialized as a string so JS clients can't lose precision above 2^53-1
    - `op` string, required: Operation: 'upsert' or 'delete'
    - `doc_id` string, required: Document identifier (stable across versions)
    - `version` integer, nullable: Document version; null for delete-all-versions
    - `idempotency_key` string, nullable: Client-provided deduplication key, if any
    - `importance` number, required: Importance score (0.0–1.0)
    - `created_at` string, required: Event creation time (ISO 8601 UTC)
    - `payload` object, nullable: JSONB payload; null for delete ops OR when omitted because it exceeds the inline size cap (see payload_truncated)
    - `event_metadata` object, nullable: Additional metadata (source, correlation_id, etc.)
    - `payload_bytes` integer, required: Serialized payload size in bytes (0 when null)
    - `payload_truncated` boolean, required: True when the payload exceeded the inline size cap and was omitted from this response
  - `next_cursor` string, nullable: Opaque cursor for the next page; null on the last page

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud.md) · [All operations](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/kagura-ai/apis/kagura-memory-cloud/revisions/09f17f5ada29?raw)
