ProductOSDocs

Entity reference · v1

activity-log

table activity_log

Audit trail of entity mutations, written as they happen. Append-only: rows are never edited or deleted, and a new row is always attributed to its caller. Reading it needs `audit.read` (admins and owners); members see recent activity in the app.

Endpoints

GET/api/v1/activity-log
POST/api/v1/activity-log
GET/api/v1/activity-log/{id}
PATCH/api/v1/activity-log/{id}
DELETE/api/v1/activity-log/{id}

Writable fields

* required on create. PATCH treats every field as optional.

FieldTypeConstraintsNotes
entity_type*string
entity_id*uuid
action*string
changesjson
user_iduuid

Listing & filtering

  • Pagination: ?limit=50&offset=0 · max limit 200
  • Default sort: ?sort=created_at&order=desc
  • Sortable fields: created_at
  • Filters: ?entity_type= ?entity_id= ?action= ?user_id= , repeat any filter to OR multiple values

Examples

curlbash
curl 'https://productos.ca/api/v1/activity-log?limit=10' \
  -H "Authorization: Bearer $TOKEN"

Try it out

Paste a token and hit a real endpoint. The request goes from your browser straight to /api/v1/activity-log. The token is held in this page only for the request and is never stored.

Try it out

Issue tokens in Settings → API tokens. Token never leaves this page.

GET/api/v1/activity-log?limit=3

Generated from the API's entity configuration. This page is rebuilt on every deploy, so it always matches the live API.