
h1. Activities REST service {anchor:id=SOCref.Developer_references.ActivitiesRESTService}

|| Name || Service URL || Location|| Description ||
| *ActivitiesRestService* | {noformat}{restContextName}/{portalName}/social/activities{noformat} |  *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service|Provide REST services for activity applications: like/unlike; comment; delete activity. |

* *API*:
|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
| *destroyActivity* | {noformat}{restContextName}/{portalName}/social/activities/destroy/{activityId}.{format}{noformat} |portalName {example}{example} activityId{example}{example} format | String{example}{example} String{example}{example}String: json or xml| Destroy activity and get the JSON/XML format. |
| *showLikes* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/show.{format}{noformat} | portalName{example}{example} activityId{example}{example} format|String{example}{example} String{example}{example}String: json or xml |Show the list of likes by activityId and return the JSON/XML format. |
| *updateLike* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/update.{format}{noformat} | portalName{example}{example} activityId{example}{example} format|String{example}{example} String{example}{example}String: json or xml | Update the list of likes by the JSON/XML format. |
| *destroyLike* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/destroy/{identity}.{format}{noformat} |  portalName{example}{example} activityId{example}{example} identityId {example}{example}format|String {example}{example}String{example}{example} String{example}{example}String: json or xml |Destroy *like* by identityId and get the JSON/XML format return format. |
| *showComments* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/show.{format}{noformat} |  portalName{example}{example} activityId{example}{example} format|String{example}{example} String{example}{example}String: json or xml | Show the comment list by the JSON/XML format. |
| *updateComment* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/likes/update.{format}{noformat} | portalName{example}{example} activityId{example}{example} format|String{example}{example} String{example}{example}String: json or xml | Update the comment by the JSON/XML format. |
| *destroyComment* | {noformat}{restContextName}/{portalName}/social/activities/{activityId}/comments/destroy/{commentId}.{format}{noformat} | portalName{example}{example} activityId{example}{example} commentId {example}{example}format|String {example}{example} String{example}{example} String{example}{example}String: json or xml | Destroy comments and return the JSON/XML format. |


Example:

http://localhost:8080/rest-socialdemo/socialdemo/social/activities/s08d397dg6/likes/destroy/abc.json

h1. Apps REST service {anchor:id=SOCref.Developer_references.AppsRESTService}
|| Name || Service URL || Location || Description ||
| *AppsRestService* | {noformat}{restContextName}/social/apps/{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Provide REST services for the application registry gadget: shows application list. |

* *API*:
|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
| *showApps* | {noformat}{restContextName}/social/apps/show.{format}{noformat} | format |String: json or xml |Show applications by the JSON/XML format. |


Example:

http://localhost:8080/rest-socialdemo/social/apps/show.json

h1. Identity REST service {anchor:id=SOCref.Developer_references.IdentityRESTService}

|| Name|| Serive URL || Location || Description ||
| *IdentityRestService* |{noformat} restContextName}/{portalName}/social/identity/{username}/id {noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Get identityId by the username.|

* *API*:
|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
| *UserId getId* | {noformat}{restContextName}/{portalName}/social/identity/{username}/id/show.json{noformat} |username {example}{example}portalName | String{example}{example} String | Get the identity by username and return by the JSON format. |

Example:

http://localhost:8080/rest-socialdemo/socialdemo/social/identity/john/id/show.json


h1. Linkshare REST service {anchor:id=SOCref.Developer_references.LinkshareRESTService}


|| Name || Service URL || Location || Description ||
|  *LinkshareRestService* | {noformat}{restContextName}/social/linkshare{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Get information from a provided link. |

* *API*:

|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
| *getLink* | {noformat}{restContextName}/social/linkshare/show.{format}{noformat} | format | String: json or xml |Get the link content by posting a linkShare request. |


Example:

http://localhost:8080/rest-socialdemo/social/linkshare/show.json

h1. People Rest Service {anchor:id=SOCref.Developer_references.PeopleRestService}


|| Name || Service URL || Location|| Description ||
| *PeopleRestService* | {noformat}{restContextName}/social/people{noformat}| *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service| Provide REST services for manipulating jobs related to people. |

* *API*:

|| Name || Service URL Endpoint || Parameters || Expected Values|| Description ||
|*suggestUsernames*|{noformat}{restContextName}/social/people/suggest.{format}{noformat}| nameToSearch {example}{example}currentUser{example}{example}typeOfRelation {example}{example}spaceURL {example}{example} format | String{example}{example}String {example}{example}String {example}{example}String {example}{example}String: json or xml|Get and return a list of usernames which match the input string for suggest.|


Example:
http://localhost:8080/rest-socialdemo/social/people/suggest.json


h1. Spaces REST service {anchor:id=SOCref.Developer_references.SpacesRESTService}


|| Name || Service URL || Location || Description ||
|*SpacesRestService* |{noformat}{restContextName}/{portalName}/social/spaces{noformat} | *Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.component.service | Provide REST services for space gadget to display users' spaces and pending spaces.  |


* *API*:

|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
| *showMySpaceList* | {noformat}{restContextName}/social/spaces/mySpaces/show.{format}{noformat}| portalName {example}{example} format| String {example}{example} String: json or xml | Show mySpaceList by the JSON/XML format. |
| *showPendingSpaceList* | {noformat}{restContextName}/social/spaces/pendingSpaces/show.{format}{noformat}|portalName {example}{example} format |  String {example}{example} String: json or xml| Show pendingSpaceList by the JSON/XML format.|
| *suggestSpacenames*|{noformat}{restContextName}/social/spaces/spaceNames/suggest.{format}{noformat}|portalName {example}{example}conditionToSearch{example}{example}typeOfRelation{example}{example} currentUser{example}{example} format| String {example}{example} String{example}{example} String{example}{example} String {example}{example} String: json or xml| Get and return space's names that match the input string for suggest.|


Example:

http://localhost:8080/rest-socialdemo/social/spaces/mySpaces/show.xml

h1. Widget Rest Service {anchor:id=SOCref.Developer_references.WidgetRESTService}

|| Name || Service URL || Location|| Description ||
| *WidgetRestService* |{noformat}{restContextName}/spaces/{containerName}{noformat} |*Maven groupId*: org.exoplatform.social {example}{example} *ArtifactId*: exo.social.extras.widget.rest |Provide REST services for creating spaces or getting spaces'information.|


* *API*:
|| Name || Service URL Endpoint || Parameters || Expected Values || Description ||
|*spaceInfo*| {noformat}{restContextName}/spaces/{containerName}/space_info{noformat}  |containerName {example}{example} portalName{example}{example} spacePrettyName {example}{example}description |String {example}{example} String (default value: classic) {example}{example}String {example}{example}String| Return the HTML page for displaying the information of the space. Two query parameters needed: _spaceName_ and _description_.|

Example:

http://localhost:8080/rest-socialdemo/spaces/socialdemo/space_info?name=Social&description=Social

h1. Location {anchor:id=SOCref.Developer_references.Location}
* *Maven groupId*: org.exoplatform.social
* *ArtifactId*: exo.social.component.service
