[GH-ISSUE #2148] Version and Health API endpoints #1324

Closed
opened 2026-03-02 11:56:32 +03:00 by kerem · 6 comments
Owner

Originally created by @sli-cka on GitHub (Nov 17, 2025).
Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2148

Describe the feature you'd like

I would like to request the addition of two new API endpoints in Karakeep:

  • A /server/version or /admin/version endpoint that returns the currently installed Karakeep version.

  • A /server/health or /admin/health endpoint that returns a simple OK/healthy response indicating that the service is running properly. This could include information about the service connections to search engine, browser and queue system (similar to the /admin/overview page)

Describe the benefits this would bring to existing Karakeep users

Currently I am working on a Home Assistant integration for Karakeep and I would like to include an entity which is showing the current version or if a new update is available. Users could then be notified about new versions.

The health endpoints could also be used for notifications about problems with the monitored Karakeep instance.

Can the goal of this request already be achieved via other means?

Yes, but only partially.
The current version and health information is displayed in the web UI, but there is (as far as I know) no stable programmatic way to fetch this information.

Have you searched for an existing open/closed issue?

  • I have searched for existing issues and none cover my fundamental request

Additional context

No response

Originally created by @sli-cka on GitHub (Nov 17, 2025). Original GitHub issue: https://github.com/karakeep-app/karakeep/issues/2148 ### Describe the feature you'd like I would like to request the addition of two new API endpoints in Karakeep: - A `/server/version` or `/admin/version` endpoint that returns the currently installed Karakeep version. - A `/server/health` or `/admin/health` endpoint that returns a simple OK/healthy response indicating that the service is running properly. This could include information about the service connections to search engine, browser and queue system (similar to the /admin/overview page) ### Describe the benefits this would bring to existing Karakeep users Currently I am working on a Home Assistant integration for Karakeep and I would like to include an entity which is showing the current version or if a new update is available. Users could then be notified about new versions. The health endpoints could also be used for notifications about problems with the monitored Karakeep instance. ### Can the goal of this request already be achieved via other means? Yes, but only partially. The current version and health information is displayed in the web UI, but there is (as far as I know) no stable programmatic way to fetch this information. ### Have you searched for an existing open/closed issue? - [x] I have searched for existing issues and none cover my fundamental request ### Additional context _No response_
Author
Owner

@MohamedBassem commented on GitHub (Nov 18, 2025):

Hi, looking forward to the home assistant plugin!

We already have a health endpoint (/api/health), and it should be straightforward to add a version endpoint as well.

@claude implement GET /api/version that returns the configured server version from the serverConfig.

<!-- gh-comment-id:3547136427 --> @MohamedBassem commented on GitHub (Nov 18, 2025): Hi, looking forward to the home assistant plugin! We already have a health endpoint (/api/health), and it should be straightforward to add a version endpoint as well. @claude implement GET /api/version that returns the configured server version from the serverConfig.
Author
Owner

@claude[bot] commented on GitHub (Nov 18, 2025):

Claude finished @MohamedBassem's task —— View jobclaude/issue-2148-20251118-1133Create PR ➔


Implementing GET /api/version endpoint

Tasks

  • Gather context - find existing /api/health endpoint
  • Locate serverConfig and version property
  • Implement GET /api/version endpoint
  • Skip typecheck/lint (pnpm not available in CI environment)
  • Commit and push changes
  • Provide PR creation link

Summary

I've successfully implemented the GET /api/version endpoint following the same pattern as the existing /api/health endpoint. The endpoint returns the server version from serverConfig.serverVersion, which is configured via the SERVER_VERSION environment variable.

Implementation details:

  • Created packages/api/routes/version.ts following the same structure as health.ts
  • Registered the route in packages/api/index.ts
  • Returns JSON with format: { "version": "x.y.z" } or { "version": "unknown" } if not configured

The endpoint will be available at /api/version and can be used by the Home Assistant integration to check the current Karakeep version.

--- | Branch: claude/issue-2148-20251118-1133

<!-- gh-comment-id:3547139310 --> @claude[bot] commented on GitHub (Nov 18, 2025): **Claude finished @MohamedBassem's task** —— [View job](https://github.com/karakeep-app/karakeep/actions/runs/19464642090) • [`claude/issue-2148-20251118-1133`](https://github.com/karakeep-app/karakeep/tree/claude/issue-2148-20251118-1133) • [Create PR ➔](https://github.com/karakeep-app/karakeep/compare/main...claude/issue-2148-20251118-1133?quick_pull=1&title=feat%3A%20add%20GET%20%2Fapi%2Fversion%20endpoint&body=Implements%20a%20new%20API%20endpoint%20that%20returns%20the%20server%20version%20from%20serverConfig.%0A%0AThis%20will%20be%20used%20for%20Home%20Assistant%20integration%20to%20check%20for%20updates.%0A%0AFixes%20%232148%0A%0A----%0A%0AGenerated%20with%20%5BClaude%20Code%5D%28https%3A%2F%2Fclaude.ai%2Fcode%29) --- ### Implementing GET /api/version endpoint #### Tasks - [x] Gather context - find existing /api/health endpoint - [x] Locate serverConfig and version property - [x] Implement GET /api/version endpoint - [x] Skip typecheck/lint (pnpm not available in CI environment) - [x] Commit and push changes - [x] Provide PR creation link #### Summary I've successfully implemented the GET `/api/version` endpoint following the same pattern as the existing `/api/health` endpoint. The endpoint returns the server version from `serverConfig.serverVersion`, which is configured via the `SERVER_VERSION` environment variable. **Implementation details:** - Created `packages/api/routes/version.ts` following the same structure as `health.ts` - Registered the route in `packages/api/index.ts` - Returns JSON with format: `{ "version": "x.y.z" }` or `{ "version": "unknown" }` if not configured The endpoint will be available at `/api/version` and can be used by the Home Assistant integration to check the current Karakeep version. --- | [Branch: claude/issue-2148-20251118-1133](https://github.com/karakeep-app/karakeep/tree/claude/issue-2148-20251118-1133)
Author
Owner

@sli-cka commented on GitHub (Nov 19, 2025):

Hi @MohamedBassem Thanks for pointing out the /api/health endpoint! I was unaware of it.
Looking forward to the merge of the /api/version endpoint

<!-- gh-comment-id:3553253942 --> @sli-cka commented on GitHub (Nov 19, 2025): Hi @MohamedBassem Thanks for pointing out the `/api/health` endpoint! I was unaware of it. Looking forward to the merge of the `/api/version` endpoint
Author
Owner

@MohamedBassem commented on GitHub (Nov 23, 2025):

The version endpoint is now merged, and will be available in the next release.

<!-- gh-comment-id:3568033780 --> @MohamedBassem commented on GitHub (Nov 23, 2025): The version endpoint is now merged, and will be available in the next release.
Author
Owner

@sli-cka commented on GitHub (Nov 23, 2025):

Great! Thank you very much for this and also for creating and maintaing Karakeep! 👍

<!-- gh-comment-id:3568061720 --> @sli-cka commented on GitHub (Nov 23, 2025): Great! Thank you very much for this and also for creating and maintaing Karakeep! 👍
Author
Owner

@MohamedBassem commented on GitHub (Nov 23, 2025):

Looking forward to the HA integration!

<!-- gh-comment-id:3568067316 --> @MohamedBassem commented on GitHub (Nov 23, 2025): Looking forward to the HA integration!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1324
No description provided.