Environmental Monitoring Independent of Existing Infrastructure
Frontend & API
- REST API for communication with Gateway Nodes and wider applications
- Visual interface to see gathered live & historical data
- Zabbix Templates as showcase of functionality afforded by API
System Requirements
Environment capiable of running a .NET 5 web application. For this guide we will build on a linux instance (i.e. the Gateway Node)
- Configure .NET 5 runtime for Blazor Server app, with an Nginx reverse proxy Instructions and Instructions
- Configure MSSQL Server Instructions
- Copy published artifact to web root
- Import DB Schema from published artifact
- Configure
web.config
as required, e.g. to update database connection string. - Start kestrel service configured earlier.
Create Users
You MUST configure this on first-run, else you will not be able to access the API.
Use a suitable DBMS, such as SSMS
New User
INSERT INTO ApiUser (
name,
apiKey
) VALUES (
<name>,
<64-character uuid>
)
Grant Permissions
Note, you can inspect available permissions from the ApiPermissions
table
INSERT INTO ApiUserPermission (
userID,
permissionID
) VALUES (
<userID>,
<permissionID>
)
Create Gateway, Sensor nodes, etc
Follow API Spec, login with an API key created above to access Swagger documentation.