improve README
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-01-09 15:28:38 +11:00
parent 43fa0b02aa
commit 00f87ccb71
3 changed files with 41 additions and 35 deletions

View File

@@ -107,20 +107,31 @@ This API call can only be made once after the service has started. Subsequent ca
### User Operations
#### Register User
POST `/api/admin/user/register`
POST `/api/admin/user/add`
Data
Create a new user record by specifying groupId
Body
```
{
"username": "",
"password": "",
"RoleId": 2
"userName": "Test User",
"password": "Example Password",
"groupId": "1",
}
```
OLD: This operation can only be performed by a user with a role that is admin enabled. There are 3 built in roles, which can be viewed via the `/api/admin/roles` endpoint.
Create a new user record by specifying groupName
Body
```
{
"userName": "Test User",
"password": "Example Password",
"groupName": "Users",
}
```
NEW: This operation can only be performed by a user that is a member of a group with the admin flag enabled.
Registering a user requires specifying the group to which the user will belong. There are 2 built-in groups, with groupName of 'Administrators' or 'Users' and corresponding groupId of 1 and 2 respectively. Available groups can be retrieved via the `/api/admin/groups/list`
This operation can only be performed by a user that is a member of a group with the admin flag enabled, or a user who has the admin flag enabled individually on their database record.
#### Remove User
POST `/api/admin/user/delete`
@@ -134,13 +145,21 @@ Data
This operation can only be performed by a user with a role that is admin enabled. Removes user account corresponding to specified userName.
#### List Users
GET `/api/admin/users`
This operation can only be performed by a user with a role that is admin enabled. Lists currently defined users.
### Role Operations
### Group Operations
#### List Groups
GET `/api/admin/groups/list`
This operations has not yet been implemented.
This operation can only be performed by a user with a role that is admin enabled. Lists currently defined groups.
### Role Operations - Deprecated
#### List Roles
GET `/api/admin/roles`