📖 API Documentation
I'm still updating this documentation. If you have any questions, please don't hesitate to contact me :)
Get Started
To use the REST API of your WGDashboard, you need to obtain an API Key.
Create API Key
To request an API Key, simply login to your WGDashboard, go to Settings, scroll to the very bottom. Click the switch on the right to enable API Key.
Click the blur Create button, set an expiry date you want or never expire, then click Done.
Use API Key
Simply add
wg-dashboard-apikey
with the value of your API key into the HTTP Header.
Request Method
It will only be POST
or GET
Endpoint URL Format
There are 2 types of URL format
Regular URL
For example:
/api/getWireguardConfigurations
Regular URL with a parameter in the path
For example:
/api/deletePeers/<configName>
.Currently,
configName
is the only URL parameter. To use it, simply replace it with an existing WireGuard configuration name. Such aswg0
Now you're ready
Please visit this page for details of Endpoints