The endpoint for the WebHare API is at /.wh/api/v1. You can also find the SwaggerUI documentation and openapi.json here.
Before you can use this API you need to create an api token for a user with sysop right. Eg:
wh auth create-api-token --expires P1Y --scopes system:sysop --title 'My test key' sysop@example.net
The secret-token: prefix is part of the token you will need to provide.
The following examples assume you've stored the token in a variable called APITOKEN and that your server URL is stored in BACKENDURL. To do this:
APITOKEN=$(wh auth create-api-token --expires P1Y --scopes system:sysop --title 'My test key' sysop@example.net)
BACKENDURL=$(wh get backendurl)
To verify API access:
curl -H"Authorization: bearer $APITOKEN" "$BACKENDURL".wh/api/v1/meta