Create Admin Account
Create Admin Account
After installing the REST Module, you need to create an admin account to access the API.
Set up admin authentication for secure API access
Create Admin User
# Create admin account via REST API
curl -X POST http://localhost:8080/polocloud/api/v3/user/self -H "Content-Type: application/json" -d '{
"username": "admin",
"password": "your-secure-password",
"roleId": -1
}'Using Postman
-
Create New Request
- Method:
POST - URL:
http://localhost:8080/polocloud/api/v3/user/self
- Method:
-
Set Headers
Content-Type: application/json
-
Set Body (raw JSON)
{ "username": "admin", "password": "your-secure-password", "roleId": -1 } -
Send Request
- Click "Send" to create the admin account
Admin Account
- Use a strong password for security
roleId: -1creates an admin user with full access- This endpoint can only be used when no users exist yet
- The response includes an authentication token for immediate use
- User data is stored in
rest/users.jsonfile