Add more services
This commit is contained in:
parent
91e22ed95d
commit
36c952fe81
7 changed files with 172 additions and 16 deletions
|
|
@ -11,7 +11,25 @@ Returns a role with id = {id}
|
|||
"id": "string",
|
||||
"name": "string",
|
||||
"communityId": "string",
|
||||
"creationDate": 0
|
||||
"creationDate": "number"
|
||||
}
|
||||
```
|
||||
|
||||
## GET /api/v1/role/{id}/permissions
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
Returns a role with id = {id} and permissions
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"communityId": "string",
|
||||
"permissions": "string[]".
|
||||
"creationDate": "number"
|
||||
}
|
||||
```
|
||||
|
||||
|
|
@ -41,6 +59,32 @@ Creates a new role and returns it
|
|||
}
|
||||
```
|
||||
|
||||
## PATCH /api/v1/role/{id}
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
### Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "string?",
|
||||
"permissions": "string[]?"
|
||||
}
|
||||
```
|
||||
|
||||
Updates a role with id = {id}
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"communityId": "string",
|
||||
"permissions": "string[]"
|
||||
}
|
||||
```
|
||||
|
||||
## POST /api/v1/role/{id}/assign
|
||||
|
||||
_Requires an authorization header_
|
||||
|
|
@ -90,3 +134,18 @@ Unassigns a role from a user
|
|||
"userId": "string"
|
||||
}
|
||||
```
|
||||
|
||||
## DELETE /api/v1/role/{id}
|
||||
|
||||
_Requires an authorization header_
|
||||
|
||||
Removes a role with id = {id}
|
||||
|
||||
### Response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": "string",
|
||||
"communityId": "string"
|
||||
}
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue