Add role assign/unassign
This commit is contained in:
parent
c37a81e8fd
commit
91e22ed95d
2 changed files with 51 additions and 0 deletions
1
VERSION
Normal file
1
VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
0.3.1
|
||||
|
|
@ -40,3 +40,53 @@ Creates a new role and returns it
|
|||
"communityId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/role/{id}/assign
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
### Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Assigns a role to a user
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"communityId": "string",
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/role/{id}/unassign
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
### Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
Unassigns a role from a user
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"communityId": "string",
|
||||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue