Skip to content

feat: add search and health check endpoints - #5

Open
ehippy wants to merge 1 commit into
mainfrom
feat/search-and-health-endpoints
Open

ehippy wants to merge 1 commit into
mainfrom
feat/search-and-health-endpoints

Conversation

@ehippy

@ehippy ehippy commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Adds two new read-only endpoints:

GET /search?q=keyword

Searches across all Things collections (today, inbox, upcoming, anytime, someday, logbook, projects) by task title and notes. Uses things.search() which runs SQL LIKE on the SQLite database.

Parameters: q (required), limit (optional, default 50)

Example: curl -u things:secret "http://localhost:8000/search?q=groceries"

GET /health

Health check that probes the Things 3 database via things.today(). Returns 200 if DB is accessible, 503 otherwise.

Example: curl -u things:secret http://localhost:8000/health

Why this matters

  • Search fills the most notable gap — users could read collections but had no way to find tasks by keyword
  • Health check enables monitoring setups (Prometheus, uptime checks) to verify the service and DB are working
  • Additions only, zero breaking changes
  • Both leverage existing things.search() and things.today() from the things.py library

- Add GET /search?q=keyword endpoint that searches across all Things
  collections (today, inbox, upcoming, anytime, someday, logbook) by
  task title and notes using things.search().

- Add GET /health endpoint that verifies Things 3 database accessibility
  via a things.today() probe. Returns 200 if OK, 503 if not.

- Update README.md with API docs and example curl commands for new endpoints.

- Update CLAUDE.md architecture section to document new endpoints.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant