Skip to content

Instantly share code, notes, and snippets.

@fdervishi90
Last active February 7, 2019 08:38
Show Gist options
  • Save fdervishi90/28227648399f856cfae03082105a3ba6 to your computer and use it in GitHub Desktop.
Save fdervishi90/28227648399f856cfae03082105a3ba6 to your computer and use it in GitHub Desktop.
#wifi #api
1. Login
POST: https://172.28.150.60:8443/api/login
Body:
{
"username": "",
"password": "",
"remember": true
}
2. Get all sites info
GET: https://172.28.150.60:8443/api/self/sites
3. Create Voucher
POST: https://172.28.150.60:8443/api/s/{site}/cmd/hotspot
Body: {
"cmd": "create-voucher", // command to create voucher
"expire": 1440, // expire in 24h
"expire_number": 1,
"expire_unit": 1440, // 24h
"n": 1, // number of vouchers
"quota": 0 // one user
}
4. Get list of Voucher
GET: https://172.28.150.60:8443/api/s/{site}/stat/voucher
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment