From b7b42e832ad711ebb5af5c03e1c8e8a471c6bde0 Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:05:14 +0100 Subject: [feature] Add healthcheck endpoints `/livez` and `/readyz` (#2783) * [feature] Add healthcheck endpoints `/livez` and `/readyz` * use select that returns no data --- docs/api/swagger.yaml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'docs/api') diff --git a/docs/api/swagger.yaml b/docs/api/swagger.yaml index 51d8b6e78..e962c6724 100644 --- a/docs/api/swagger.yaml +++ b/docs/api/swagger.yaml @@ -7878,6 +7878,23 @@ paths: summary: View instance information. tags: - instance + /livez: + get: + operationId: liveGet + responses: + "200": + description: OK + summary: Returns code 200 with no body if GoToSocial is "live", ie., able to respond to HTTP requests. + tags: + - health + head: + operationId: liveHead + responses: + "200": + description: OK + summary: Returns code 200 if GoToSocial is "live", ie., able to respond to HTTP requests. + tags: + - health /nodeinfo/2.0: get: description: 'See: https://nodeinfo.diaspora.software/schema.html' @@ -7892,6 +7909,27 @@ paths: summary: Returns a compliant nodeinfo response to node info queries. tags: - nodeinfo + /readyz: + get: + description: If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals). + operationId: readyGet + responses: + "200": + description: OK + "500": + description: Not ready. Check logs for error message. + summary: Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT. + tags: + - health + head: + description: If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals). + operationId: readyHead + responses: + "200": + description: OK + summary: Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT. + tags: + - health /users/{username}/collections/featured: get: description: |- -- cgit v1.2.3