-
Notifications
You must be signed in to change notification settings - Fork 4
Get Role Actions
prakharsrivastava25 edited this page Jul 8, 2017
·
14 revisions
| API | Desc |
|---|---|
| GET /communityrole/:domainName | GET (Distinct)Roles & Theirs Actions for specified domain |
| POST /communityrole/:domainname | POST Add a new Role with Actions |
| PATCH /communityrole/:domainname/roles/:rolename | Update Role for change Actions |
- get role actions of a specified community
- get roles in a specified community (in a community what role exists)
- Post the domain role actions and toolid.
- Add/Update role and actions of a specified community
/communityrole/:domainName
GET
domainName:text
-
code:200 -
content: { "domain": "Engineer", "roleactions": [ { "role": "admin", "toolid": "forum", "action": "edit", "grant": "self" }, { "role": "admin", "toolid": "forum", "action": "likes", "grant": "true" }, { "role": "admin", "toolid": "quora", "action": "post", "grant": "true" } ] }
- code:400
- content:please enter an existing domain
/communityrole/:domainName?onlyroles=true
GET
domainName:text
-
code:200 -
content:[ { "role": "professor" }, { "role": "student" } ]
-
code:500 -
content:{"error": "Unexpected error occurred, please try again...!"}
/communityroles/:domainname
POST
[
{
"role":"admin",
"actions": {
"post": "post",
"guest": "true"
},
"toolId": "git"
},
{
"role":"moderator",
"actions": {
"post": "false",
"like": "true"
},
"toolId": "quora"
}
]
-
code:200 -
content:Added
-
code:400 -
content:{"error": "entry already exists"}
/communityroles/:domainname/roles/:rolename
Patch
[
{
"actions": {
"post": "false",
"likes": "false"
},
"toolId": "quora"
},
{
"actions": {
"post": "true",
"likes": "true"
},
"toolId": "forum"
}
]
domainName:text role:text
-
code:200 -
content:Updated
-
code:400 -
content:{"error": "Error in operation, please try later..!"}