Fix role membership management endpoints & ctrls

This commit is contained in:
Denis Arh
2019-02-24 09:32:22 +01:00
parent 518efe9c5c
commit e2c2c9df4a
11 changed files with 163 additions and 51 deletions
+19 -5
View File
@@ -318,20 +318,34 @@ An organisation may have many roles. Roles may have many channels available. Acc
| roleID | uint64 | PATH | Source Role ID | N/A | YES |
| destination | uint64 | POST | Destination Role ID | N/A | YES |
## Add member to a role
## Returns all role members
#### Method
| URI | Protocol | Method | Authentication |
| --- | -------- | ------ | -------------- |
| `/roles/{roleID}/memberAdd` | HTTP/S | POST | Client ID, Session ID |
| `/roles/{roleID}/members` | HTTP/S | GET | Client ID, Session ID |
#### Request parameters
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
| roleID | uint64 | PATH | Source Role ID | N/A | YES |
| userID | uint64 | POST | User ID | N/A | YES |
## Add member to a role
#### Method
| URI | Protocol | Method | Authentication |
| --- | -------- | ------ | -------------- |
| `/roles/{roleID}/member/{userID}` | HTTP/S | POST | Client ID, Session ID |
#### Request parameters
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
| roleID | uint64 | PATH | Source Role ID | N/A | YES |
| userID | uint64 | PATH | User ID | N/A | YES |
## Remove member from a role
@@ -339,14 +353,14 @@ An organisation may have many roles. Roles may have many channels available. Acc
| URI | Protocol | Method | Authentication |
| --- | -------- | ------ | -------------- |
| `/roles/{roleID}/memberRemove` | HTTP/S | POST | Client ID, Session ID |
| `/roles/{roleID}/member/{userID}` | HTTP/S | DELETE | Client ID, Session ID |
#### Request parameters
| Parameter | Type | Method | Description | Default | Required? |
| --------- | ---- | ------ | ----------- | ------- | --------- |
| roleID | uint64 | PATH | Source Role ID | N/A | YES |
| userID | uint64 | POST | User ID | N/A | YES |
| userID | uint64 | PATH | User ID | N/A | YES |