42 lines
524 B
Markdown
42 lines
524 B
Markdown
## GET /api/v1/role/{id}
|
|
|
|
_Requires an authorization header_
|
|
|
|
Returns a role with id = {id}
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"communityId": "string",
|
|
"creationDate": 0
|
|
}
|
|
```
|
|
|
|
## POST /api/v1/role
|
|
|
|
_Requires an authorization header_
|
|
|
|
### Request:
|
|
|
|
```json
|
|
{
|
|
"name": "string",
|
|
"communityId": "string",
|
|
"permissions": "string[]"
|
|
}
|
|
```
|
|
|
|
Creates a new role and returns it
|
|
|
|
### Response:
|
|
|
|
```json
|
|
{
|
|
"id": "string",
|
|
"name": "string",
|
|
"communityId": "string"
|
|
}
|
|
```
|