Skip to main content
Version: 7.0

Health check

Overview

The HEALTH_CHECK_TOKEN parameter is used to activate the /api/v1/app/health-check endpoint, which checks the status of Passwork. To access the endpoint, a token must be provided — standard authorization is not used. If the token is not set, the endpoint is considered disabled.

Activation

In the config.env file, specify the following parameter with a value:

HEALTH_CHECK_TOKEN=custom_token

The configuration file config.env is located in the following directories (depending on the Passwork installation choice):

  • Linux — /var/www/init/config.env
  • Windows Server — C:\inetpub\wwwroot\passwork\init\config.env
  • Docker — /<passwork>/conf/keys/config.env

Example request

curl --request POST \
--url "https://passwork.example.com/api/v1/app/health-check" \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"token": "custom_token"
}'

Example output

{
"states": {
"mongodb": "ok"
},
"errors": []
}

If the response received from Passwork is in the format:

{
"format": "base64",
"content": "eyJzdGF0ZXMiOnsibW9uZ29kYiI6Im9rIn0sImVycm9ycyI6W119"
}

You need to decode the content value:

# Command
echo "eyJzdGF0ZXMiOnsibW9uZ29kYiI6Im9rIn0sImVycm9ycyI6W119" | base64 -d
# Output
{"states":{"mongodb":"ok"},"errors":[]}