From 88f0be96933c287b99469edcfb6483cc91fa73c8 Mon Sep 17 00:00:00 2001 From: Alexander Strizhakov Date: Mon, 22 Apr 2019 07:19:53 +0000 Subject: Feature/826 healthcheck endpoint --- docs/api/pleroma_api.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'docs/api') diff --git a/docs/api/pleroma_api.md b/docs/api/pleroma_api.md index dbe250300..4b8062d37 100644 --- a/docs/api/pleroma_api.md +++ b/docs/api/pleroma_api.md @@ -197,3 +197,20 @@ See [Admin-API](Admin-API.md) * `remote`: BOOLEAN field, receives notifications from people on remote instances * `local`: BOOLEAN field, receives notifications from people on the local instance * Response: JSON. Returns `{"status": "success"}` if the update was successful, otherwise returns `{"error": "error_msg"}` + +## `/api/pleroma/healthcheck` +### Healthcheck endpoint with additional system data. +* Method `GET` +* Authentication: not required +* Params: none +* Response: JSON, statuses (200 - healthy, 503 unhealthy). +* Example response: +```json +{ + "pool_size": 0, # database connection pool + "active": 0, # active processes + "idle": 0, # idle processes + "memory_used": 0.00, # Memory used + "healthy": true # Instance state +} +``` -- cgit v1.2.3