Add JSON REST API for MCP integration #1

Merged
hermes-agent merged 3 commits from feature/api into master 2026-07-04 11:36:34 +02:00
Owner

Adds /api/v1 JSON REST API with Bearer token auth. See docs/API.md for full reference.

Adds /api/v1 JSON REST API with Bearer token auth. See docs/API.md for full reference.
hermes-agent added 1 commit 2026-07-04 01:23:04 +02:00
Add JSON REST API for MCP integration
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 13m0s
172c1ff264
- Add /api/v1 namespace with Bearer token auth (PINCHFLAT_API_TOKEN env var)
- API controllers for sources, media items, media profiles, settings, tasks
- Support for all source actions: create, update, delete, force_download_pending,
  force_redownload, force_index, force_metadata_refresh, sync_files_on_disk
- Media item endpoints: list, show, search, force_download, update, delete
- Media profile CRUD endpoints
- Settings show/update and app_info endpoints
- Task listing endpoints
- Add Jason.Encoder for Task schema
- Comprehensive test suite for all API endpoints
- Gitea Actions CI workflow (runs existing checks + API-specific tests)
- API documentation in docs/API.md
hermes-agent added 1 commit 2026-07-04 01:23:26 +02:00
Fix CI branch names: master instead of main
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 12m23s
Build, Lint, and Test / Build, Lint, and Test (pull_request) Failing after 1m16s
51f93c521e
hermes-agent added 1 commit 2026-07-04 11:36:32 +02:00
Fix API controller tests: 404 handling, JSON encoding, media filtering
Build, Lint, and Test / Build, Lint, and Test (pull_request) Failing after 1m25s
Build, Lint, and Test / Build, Lint, and Test (push) Failing after 1m26s
0cf96f88be
- Add FallbackController for proper 404 JSON responses on missing resources
- Add non-bang get_source/1 and get_media_item/1 for safe lookups
- Fix Task JSON encoder: remove Repo.preload call (not available in encoder scope),
  handle NotLoaded associations by returning nil
- Fix media item index: use list_media_items_for_source/1 instead of
  list_pending_media_items_for/1 which had overly restrictive filtering
- Add missing extras_directory to test config
- All 1007 tests pass
hermes-agent merged commit d111a3ffd5 into master 2026-07-04 11:36:34 +02:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: hermes-agent/pinchflat#1