-
Notifications
You must be signed in to change notification settings - Fork 4
Community Templates
JananiVenkat edited this page Jul 14, 2017
·
9 revisions
Method | API | Desc |
---|---|---|
GET | /communitytemplates/ | Get the list of templates |
GET | /communitytemplates/allpurposes | Get the list of purposes |
GET | /communitytemplates ?purpose=purpose | Get the specified templates on purpose |
GET | /communitytemplates/:templatename | Get the specified template on template name |
HTTP GET /communitytemplates
Required : None
Required : None
code : 200
content : [
{
"name": "surgeon",
"purpose": "medical",
"description": "This template will provides you the required tools and roles to create a medical community",
"tags": [
"medcare",
"doctor"
],
"tools": [
{
"toolId": "forum",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit",
"share"
],
"activityEvents": [
"newannouncement",
"like",
"remove"
]
},
{
"toolId": "WeMedUp",
"actions": [
"postmesage",
"read",
"Likemessage"
],
"activityEvents": [
"newannouncement",
"remove"
]
},
{
"toolId": "sermo",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit"
],
"activityEvents": [
"like",
"remove"
]
}
],
"rolesActions": [
{
"role": "admin",
"toolsActions": [
{
"toolId": "sermo",
"actions": {
"edit": "self",
"post": "post_self"
}
},
{
"toolId": "WeMedUp",
"actions": {
"bookmark": "self",
"post": "post_self"
}
},
{
"toolId": "forum",
"actions": {
"edit": "self",
"post": "post_self"
}
}
]
}
]
},{
"name": "developer",
"purpose": "technical",
"description": "This template will provides you the required tools and roles to create a technical
community",
"tags": [
"IDE",
"platform"
],
"tools": [
{
"toolId": "Stackoverflow",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit",
"share"
],
"activityEvents": [
"newannouncement",
"remove"
]
},
{
"toolId": "Quora",
"actions": [
"postmesage",
"read",
"Likemessage",
"comment",
"share",
"invitation"
],
"activityEvents": [
"like",
"remove"
]
},
{
"toolId": "Github",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit",
"upload"
],
"activityEvents": [
"newannouncement",
"like"
]
}
],
"roleActions": [
{
"role": "moderator",
"toolsActions": [
{
"toolId": "forum",
"actions": {
"edit": "self",
"post": "post_self"
}
},
{
"toolId": "scholastic.com",
"actions": {
"bookmark": "self",
"post": "post_self"
}
},
{
"toolId": "theteacherscorner.net",
"actions": {
"edit": "self",
"post": "post_self"
}
}
]
}
]
}]
code:404
content:{error: "Templates not found"}
OR
code:500
content:{error: "Unauthorised internal error occurred..."}
HTTP GET /communitytemplates/allpurposes
Required : None
Required : None
code : 200
content : [
"Medical",
"Technical",
"Teaching",
"Arts"
]
code:404
content:{error: "purposes not found"}
OR
code:500
content:{error: "Unauthorised internal error occurred..."}
HTTP GET /communitytemplates?purpose=purpose
Required : None
Required : purpose = [string]
If the query parameter is not mentioned, then /communitytemplates API will get called
code : 200
content : [
{
"name": "surgeon",
"purpose": "medical",
"description": "This template will provides you the required tools and roles to create a medical
community",
"tags": [
"medcare",
"doctor"
],
"tools": [
{
"toolId": "forum",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit",
"share"
],
"activityEvents": [
"newannouncement",
"like",
"remove"
]
},
{
"toolId": "WeMedUp",
"actions": [
"postmesage",
"read",
"Likemessage"
],
"activityEvents": [
"newannouncement",
"remove"
]
},
{
"toolId": "sermo",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit"
],
"activityEvents": [
"like",
"remove"
]
}
],
"rolesActions": [
{
"role": "admin",
"toolsActions": [
{
"toolId": "sermo",
"actions": {
"edit": "self",
"post": "post_self"
}
},
{
"toolId": "WeMedUp",
"actions": {
"bookmark": "self",
"post": "post_self"
}
},
{
"toolId": "forum",
"actions": {
"edit": "self",
"post": "post_self"
}
}
]
}
]
},
code:500
content:{error: "Unauthorised internal error occurred"}
OR
code:400
content:{error: "Bad request"}
HTTP GET /communitytemplates/:templatename
Required : templatename = [string]
Required : None
code:200
content : [
{
"name": "surgeon",
"purpose": "medical",
"description": "This template will provides you the required tools and roles to create a medical
community",
"tags": [
"medcare",
"doctor"
],
"tools": [
{
"toolId": "forum",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit",
"share"
],
"activityEvents": [
"newannouncement",
"like",
"remove"
]
},
{
"toolId": "WeMedUp",
"actions": [
"postmesage",
"read",
"Likemessage"
],
"activityEvents": [
"newannouncement",
"remove"
]
},
{
"toolId": "sermo",
"actions": [
"postmesage",
"read",
"Likemessage",
"edit"
],
"activityEvents": [
"like",
"remove"
]
}
],
"rolesActions": [
{
"role": "admin",
"toolsActions": [
{
"toolId": "sermo",
"actions": {
"edit": "self",
"post": "post_self"
}
},
{
"toolId": "WeMedUp",
"actions": {
"bookmark": "self",
"post": "post_self"
}
},
{
"toolId": "forum",
"actions": {
"edit": "self",
"post": "post_self"
}
}
]
}
]
},
code:500
content:{error: "Unauthorised internal error occurred"}
OR
code:400
content:{error: "Bad request"}