Skip to content

The File System Watchers API lets you create and manage file system watchers that monitor paths for changes and stream events in real time via Server-Sent Events (SSE) or WebSocket connections. Use these endpoints to configure watchers, retrieve event history, and subscribe to live event streams.

Check the health status of the watch service.

This endpoint takes no parameters.

Terminal window
curl https://api.hoody.com/api/v1/watch/health

List all configured file system watchers with pagination.

NameInTypeRequiredDescription
pagequeryintegerNoPage number (1-based).
limitqueryintegerNoItems per page (1-200).
Terminal window
curl "https://api.hoody.com/watchers?page=1&limit=20"

Create a new file system watcher.

The request body is defined by the watch_CreateWatcherRequest schema.

Terminal window
curl -X POST https://api.hoody.com/watchers \
-H "Content-Type: application/json" \
-d '{
"paths": ["/home/user/documents"],
"recursive": true,
"include": ["*.txt", "*.md"],
"exclude": ["*.tmp"],
"ignore_dirs": ["node_modules"],
"kinds": ["created", "modified", "removed"],
"coalesce_ms": 100,
"history_size": 1000
}'

Get details for a specific watcher.

NameInTypeRequiredDescription
idpathstringYesWatcher id
Terminal window
curl https://api.hoody.com/watchers/a1b2c3d4-e5f6-7890-abcd-ef1234567890

Delete a file system watcher and stop all associated streams.

NameInTypeRequiredDescription
idpathstringYesWatcher id
Terminal window
curl -X DELETE https://api.hoody.com/watchers/a1b2c3d4-e5f6-7890-abcd-ef1234567890

Retrieve paginated event history for a watcher. Use since_id or since_timestamp to replay events from a specific point.

NameInTypeRequiredDescription
idpathstringYesWatcher id
since_idqueryintegerNoReplay events strictly after this event id.
since_timestampquerystringNoReplay events strictly after this timestamp. Accepted formats: RFC3339 (e.g. 2026-02-11T15:30:00Z), Unix seconds (e.g. 1739287800), Unix milliseconds (e.g. 1739287800123).
pagequeryintegerNoPage number (1-based).
limitqueryintegerNoItems per page (1-200).
Terminal window
curl "https://api.hoody.com/watchers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/events?page=1&limit=50"

Stream watcher events in real time via Server-Sent Events (SSE). The connection remains open and emits events as they occur. Use since_id or since_timestamp to replay missed events before live streaming begins.

NameInTypeRequiredDescription
idpathstringYesWatcher id
since_idqueryintegerNoReplay events strictly after this event id.
since_timestampquerystringNoReplay events strictly after this timestamp. Accepted formats: RFC3339 (e.g. 2026-02-11T15:30:00Z), Unix seconds (e.g. 1739287800), Unix milliseconds (e.g. 1739287800123).
Terminal window
curl -N "https://api.hoody.com/watchers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/events/sse?since_id=1739287800000"

Stream watcher events in real time via WebSocket. The connection is upgraded to a WebSocket and remains open, emitting events as they occur. Use since_id or since_timestamp to replay missed events before live streaming begins.

NameInTypeRequiredDescription
idpathstringYesWatcher id
since_idqueryintegerNoReplay events strictly after this event id.
since_timestampquerystringNoReplay events strictly after this timestamp. Accepted formats: RFC3339 (e.g. 2026-02-11T15:30:00Z), Unix seconds (e.g. 1739287800), Unix milliseconds (e.g. 1739287800123).
Terminal window
curl -N \
-H "Connection: Upgrade" \
-H "Upgrade: websocket" \
"https://api.hoody.com/watchers/a1b2c3d4-e5f6-7890-abcd-ef1234567890/events/ws?since_id=1739287800000"