This guide describes how to perform regular healthcheck API calls to the API in order to remotely monitor its status. You can directly jump to the Healthchecks section to proceed to the healthchecks.

Please note that the current procedure does not cover how to perform healthchecks per core machine, only per hosting. If you require core-level status, get in touch with your Pryv tech contact.

Table of contents

  1. Variables
  2. Tools
    1. DNS checks:
    2. HTTP calls
  3. Preparation
    1. Create account
    2. Create token
  4. Healthchecks
    1. DNS
    2. Register
    3. Core


As this guide is platform agnostic, we will use variables ${VARIABLE_NAME} which must be replaced in the commands.

In particular, the following variables should be replaced :


Depending on your skill set, this can be done using CLI tools or a web interface.

DNS checks:

HTTP calls


As the current version does not have dedicated API endpoints for a thorough healthcheck, we create a dedicated user account in order to do so. This preparation phase describes how to create an account and obtain a non-expirable token. This must be done once and the username/token pairs stored for automatic API healthcheck calls.

Create account

We begin by creating an account. We propose to use the following credentials, but these can be modified at the user’s discretion:

curl -i -X POST -H 'Content-Type: application/json' \
    -d '{"hosting":"${HOSTING_NAME}",
    "username": "healthmetrics01",
    "email": "healthmetrics01@${DOMAIN}",
    "language": "en",
    "appid":"pryv-metrics"}' \

for DNS-less, use:

curl -i -X POST -H 'Content-Type: application/json' \
    -d '{"hosting":"${HOSTING_NAME}",
    "username": "healthmetrics01",
    "email": "healthmetrics01@${DOMAIN}",
    "language": "en",
    "appid":"pryv-metrics"}' \

If you are using a default configuration, you can use the default web app:

  1. Go to https://sw.${DOMAIN}/access/register.html
  2. Fill the fields with:
    • email : healthmetrics01@${DOMAIN}
    • username : healthmetrics
    • password : healthmetrics
    • password confirmation : healthmetrics

Create token

In order to obtain a non-expirable access token, you must do 2 calls. First sign in with the user password to obtain a temporary personal token, and then use it to obtain a non-expirable one.

- Sign in:

curl -i -H "Content-Type: application/json" \
    -H "Origin: https://sw.${DOMAIN}" \
    -X POST \
    -d '{"username":"healthmetrics01",
    "appId":"pryv-metrics"}' \

The response body should contain a valid personal token under the field token:

    "meta": {

- Obtain token

curl -i -X POST -H 'Content-Type: application/json' \
    -H 'Authorization: ${PERSONAL_TOKEN}' \
    -d '{"name":"metricsAccess",
    "permissions":[{"streamId":"*","level":"manage"}]}' \

The response body should contain a valid access token under the access:token field:

    "access": {
        "permissions": [
    "meta": {

If you are using a default configuration, you can use the default web app:

  1. Go to${DOMAIN}/service/info (${HOSTNAME}/reg/service/info for DNS-less)
  2. Click on Master Tokenradio button
  3. Click on Request Access button
  4. Click on Sign in Pryv button
  5. Enter credentials: healthmetrics01/healthmetrics01 in the pop-up window
  6. Click on Sign in button
  7. Click on Accept button
  8. Copy the Access token and save it for this machine’s healthchecks. We will refer to it as ${ACCESS_TOKEN}.



Run Dig A healthmetrics01.${DOMAIN}

The expected result: An answer.


The call to perform: HTTP GET https://reg.${DOMAIN}/healthmetrics01/check_username (https://${HOSTNAME}/reg/healthmetrics01/check_username for DNS-less)

Run curl https://reg.${DOMAIN}/healthmetrics01/check_username (curl https://${HOSTNAME}/reg/healthmetrics01/check_username for DNS-less)

The expected result: Status: 200


Authorization header: ${ACCESS_TOKEN}

The call to perform: HTTP GET https://healthmetrics01.${DOMAIN}/events?limit=1

Run curl -i -H 'Authorization: ${ACCESS_TOKEN}' "https://healthmetrics01.${DOMAIN}/events?limit=1"

The expected result: Status: 200