Skip to main content

Record a file view (ASK-134)

POST 

/files/:file_id/view

Records that the authenticated user opened/previewed this file. Inserts an append-only row into file_views for analytics, then upserts file_last_viewed so the recents sidebar (GET /api/me/recents) reflects the new timestamp.

Fire-and-forget from the client. Permission-less: any authenticated user can record a view of any non-deleted file -- access control is enforced when the file's contents are actually read, not on the view event itself.

Returns 204 No Content on success. Returns 404 when the file is missing or in any deletion state, so dangling view rows cannot accumulate.

Request

Responses

View recorded