Check Docs with HEAD
Check lightly that the documentation indexes respond on `HEAD /api/public/docs` and `HEAD /api/app/docs` with `200 OK` and no body. This action does not validate articles, assets, language filters or the freshness of `articles.json`.
In this article
Use this guide when support or onboarding need to confirm that the built-in help is available without loading the documentation content.
The public route does not require a session. The app route requires a valid session with `Authorization: Bearer` or an `access_token` cookie, but it applies no additional granular documentation permissions.
Before you start
- The server must be deployed with the documentation routes registered.
- `HEAD /api/public/docs` does not require signing in.
- `HEAD /api/app/docs` requires a valid session through `Authorization: Bearer` or an `access_token` cookie.
- `backend/docs-content/articles.json` does not need to exist or be up to date for the index `HEAD` to respond, because this flow does not load content.
Instructions
- 1.
Choose the index to check
Use `HEAD /api/public/docs` to validate the public availability of the help index. Use `HEAD /api/app/docs` to validate the authenticated help route from an operational session. Do not apply this check to asset routes such as `/api/app/docs/assets/{path}` or `/api/public/docs/assets/{path}`.
- 2.
Send the request with the HEAD method
The call must run with the `HEAD` method. If the documentation service is configured, the expected result is `200 OK` with no JSON, no sections, no `article_count` and no article detail.
- 3.
Interpret common errors
If `/api/app/docs` responds with an authentication error, check that the Bearer token or the `access_token` cookie are still valid. A validated token with no `UserID` produces `401 token invalido`. A method other than `GET` or `HEAD` produces `405 metodo no permitido`. If documentation is not configured on the server, the expected response is `503 documentacion no configurada`.
- 4.
Use GET to validate content
When you need to confirm sections, localised articles, media, search or the real state of `articles.json`, use `GET /api/public/docs` or `GET /api/app/docs`. `HEAD` only confirms that the index route responds and does not apply the `Cache-Control` of `docsContentService`.
Validations and limits
- The correct response of the main flow is `200 OK` with no body.
- `HEAD /api/public/docs` and `HEAD /api/app/docs` work as a lightweight route availability check, not as validation of the documentation bundle.
- The `locale`, `platform`, `device`, `theme` and `q` parameters are not validated in this action; they belong to the `GET` flows.
- The current code can also return `200` for `HEAD` on non-asset docs sub-routes, but operational documentation should only advertise `HEAD` for `/api/public/docs` and `/api/app/docs`.
- There is no dedicated test for `HEAD /api/public/docs` or `HEAD /api/app/docs`; the existing test covers index `GET`, detail `GET` and asset `GET`.
Expected result
The basic availability of the documentation indexes is verified without loading `articles.json`, without returning a body and without producing visual captures.