REST API and WebPush notifications for Cacti network monitoring service. Used for building mobile applications, tiny web clients etc.
Get auth token by cacti's user/password.
input:
{
username: 'user',
password: 'password'
}
output:
{
message: '',
token: 'password'
}
- message - empty or 'NOT_AUTHORIZED'
- token should be set to Http Header 'Token' for each request
Get all hosts from cacti.
output:
{
message: '',
hosts: []
}
Get only down-state hosts from cacti.
output:
{
message: '',
hosts: []
}
Subscribe your browser to WebPush notifications.
input:
{
endpoint: 'your endpoint',
publicKey: 'your publicKey',
authToken: 'your authToken',
}
output:
{
message: ''
}
Update subscription.
input:
{
endpoint: 'your endpoint',
publicKey: 'your publicKey',
authToken: 'your authToken',
}
output:
{
message: ''
}
Unsubscribe your browser from WebPush notifications.
input:
{
endpoint: 'your endpoint'
}
output:
{
message: ''
}
Copy and edit following configuration files:
cp compose/confs_web/.env.example compose/confs_web/.env
cp deploy/.env.example deploy/.env
cp deploy/inventory.example deploy/inventory
cd certs && make pwakeys
make up &
make migrate
git checkout -b deploy
git merge main
cd deploy && make deploy