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

|| Name || Service URL || Location|| Description ||
| *ActivitiesRestService* | {{{{restContextName}/{portalName}/social/activities}}} |  *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* | {{{{restContextName}/{portalName}/social/activities/destroy/{activityId}.{format}}}} |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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/likes/show.{format}}}} | 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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/likes/update.{format}}}} | 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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/likes/destroy/{identity}.{format}}}} |  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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/likes/show.{format}}}} |  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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/likes/update.{format}}}} | 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* | {{{{restContextName}/{portalName}/social/activities/{activityId}/comments/destroy/{commentId}.{format}}}} | 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* | {{{{restContextName}/social/apps/}}} |*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* | {{{{restContextName}/social/apps/show.{format}}}} | 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* |{{{ restContextName}/{portalName}/social/identity/{username}/id }}}| *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* | {{{{restContextName}/{portalName}/social/identity/{username}/id/show.json}}} |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* | {{{{restContextName}/social/linkshare}}} | *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* | {{{{restContextName}/social/linkshare/show.{format}}}} | 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* | {{{{restContextName}/social/people}}}| *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*|{{{{restContextName}/social/people/suggest.{format}}}}| 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* |{{{{restContextName}/{portalName}/social/spaces}}} | *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* | {{{{restContextName}/social/spaces/mySpaces/show.{format}}}}| portalName {example}{example} format| String {example}{example} String: json or xml | Show mySpaceList by the JSON/XML format. |
| *showPendingSpaceList* | {{{{restContextName}/social/spaces/pendingSpaces/show.{format}}}}|portalName {example}{example} format |  String {example}{example} String: json or xml| Show pendingSpaceList by the JSON/XML format.|
| *suggestSpacenames*|{{{{restContextName}/social/spaces/spaceNames/suggest.{format}}}}|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* |{{{{restContextName}/spaces/{containerName}}}} |*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*| {{{{restContextName}/spaces/{containerName}/space_info}}}  |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
