Health endpoint GET /_/health for readiness checks
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 70/100
Research direction
The health endpoint needs to be added to the routing in routing/all.php. Start by examining the existing API routes and the access control configuration. Implement a controller or handler that performs a dummy database select and returns the appropriate JSON response with the correct HTTP status codes and cache headers. Test the endpoint to ensure it works without authentication and is excluded from caching.
Written by the indexing model from the issue text.
Description
Source: components-web-app/api-components-bundle#312 (PR #315)
GET /_api/_/health (the /_/health route under the application's API prefix):
200 {"status":"ok"}after a dummy select on the default database connection;503 {"status":"unavailable","reason":"database"}otherwise.- Never cached (
Cache-Control: no-store), no surrogate keys, no session; cheap enough to probe every few seconds. Use it for Docker/compose healthchecks and Kubernetes readiness probes, and exclude it from Souin's cache. - Imported through
routing/all.php. An application whoseaccess_controlrequires login for every GET must allow it:{ path: ^/_api/_/health, roles: PUBLIC_ACCESS }. - Only the database is checked; optional services (Mercure, the cache) don't fail it.
- Dominant language
- Vue
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from components-web-app/docs
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
components-web-app/docs#92 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
components-web-app/docs#91 ·
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
components-web-app/docs#88 ·
-
documentation
Difficulty 3/5 1-2 days Newbie friendliness 55/100
components-web-app/docs#90 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
components-web-app/docs#1 · 2 comments ·
All issues in components-web-app/docs
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
microsoft/magentic-ui#588 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
alexgorbatchev/simple-ptt#3 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
CorrelAid/formtransform#44 ·