|
@@ -9,6 +9,7 @@ Not yet released.
|
|
|
|
|
|
### 🚀 New features
|
|
|
- [WHMCS Module](#whmcs-module)
|
|
|
+- [API endpoints for managing user accounts](#api-for-users)
|
|
|
- [Cronjobs can now be enabled/disabled and run on demand](#cron-disable)
|
|
|
- [Ubuntu 24.04 images](#ubuntu24-images)
|
|
|
- [Admin users can now be edited: rename, change password, suspend/unsuspend from OpenAdmin interface](#edit-admin-users)
|
|
@@ -97,6 +98,44 @@ To setup WHMCS to use your OpenPanel server follow these steps:
|
|
|
|
|
|
---
|
|
|
|
|
|
+### API for Users
|
|
|
+
|
|
|
+New API endpoints are available for automating various administrative tasks or integrating with billing solutions.
|
|
|
+
|
|
|
+
|
|
|
+- List accounts
|
|
|
+ ```bash
|
|
|
+ curl -X GET http://PANEL:2087/api/users -H "Authorization: Bearer JWT_TOKEN_HERE"
|
|
|
+ ```
|
|
|
+- Create account
|
|
|
+ ```bash
|
|
|
+ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" -d '{"email": "EMAIL_HERE", "username": "USERNAME_HERE", "password": "PASSWORD_HERE", "plan_id": "PLAN_ID_HERE"}' http://PANEL:2087/api/users
|
|
|
+ ```
|
|
|
+- Suspend account
|
|
|
+ ```bashcurl -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" -d '{"action": "suspend"}' http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+- Unsuspend account
|
|
|
+ ```bash
|
|
|
+ curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" -d '{"action": "unsuspend"}' http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+- Delete account
|
|
|
+ ```bash
|
|
|
+ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+- Change password
|
|
|
+ ```bash
|
|
|
+ curl -X PATCH -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" -d '{"password": "NEW_PASSWORD_HERE"}' http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+- Change plan
|
|
|
+ ```bash
|
|
|
+ curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" -d '{"plan_id": "PLAN_ID_HERE"}' http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+- Autologin
|
|
|
+ ```bash
|
|
|
+ curl -X CONNECT -H "Content-Type: application/json" -H "Authorization: Bearer JWT_TOKEN_HERE" http://PANEL:2087/api/users/USERNAME_HERE
|
|
|
+ ```
|
|
|
+
|
|
|
+---
|
|
|
|
|
|
### Improved install
|
|
|
|