Likes REST API endpoint
Disclaimer: This endpoint documentation is generated from the latest Sitevision version. It might differ from the actual Sitevision environment where your website resides.
Use the RestApi utility of the Public API for server-side access of this endpoint.
Likes
Get likes, like and unlike.
Applicable to: sv:timelineEntry, sv:timelineWallEntry, sv:timelineFileEntry, sv:timelineFileWallEntry, sv:timelineShareEntry, sv:timelineSharePageEntry, sv:topicTimelineEntry, sv:comment, sv:pageComment, sv:page, sv:article, sv:collaborationGroupPage, sv:sitePage, sv:file of a sv:personalFileRepository and sv:image of a sv:personalImageRepository.
GET
Returns an object containing total like count and an array of liking identities (sv:userIdentity).
Requirements
- The feature "social collaboration" and that social collaboration is enabled on the sv:site.
Permissions
- The caller must be authorized to READ the node.
Parameters
| Name | Type | Default | Values | Description |
|---|---|---|---|---|
| skip | number |
0 | Any positive value | Skips leading number of likes. |
| limit | number |
10 | 1-250 | Limits the number of likes to return. |
Example URL
420.3957727c1634ecea12c27/likes
Example input
{
"limit": 2
}
Example response
{
"totalCount": 5,
"likes": [
{
"id": "400.121b5f47163912d1436c",
"fullName": "Jane Doe",
"BuddyIconSize_SMALL": "/svplaceholder/32/400.121b5f47163912d1436c.png",
"BuddyIconSize_LARGE": "/svplaceholder/48/400.121b5f47163912d1436c.png",
"BuddyIconSize_X_LARGE": "/svplaceholder/64/400.121b5f47163912d1436c.png",
"disabled": false
},
{
"id": "400.121b5f47163912d14362",
"fullName": "John Doe",
"BuddyIconSize_SMALL": "/svplaceholder/32/400.121b5f47163912d14362.png",
"BuddyIconSize_LARGE": "/svplaceholder/48/400.121b5f47163912d14362.png",
"BuddyIconSize_X_LARGE": "/svplaceholder/64/400.121b5f47163912d14362.png",
"disabled": false
}
]
}
POST
Like a node by the requesting sv:userIdentity.
Returns an object containing the total like count.
Requirements
- The feature "social collaboration" and that social collaboration is enabled on the sv:site.
- The caller must have a sv:userIdentity.
Permissions
- Liking a node owned by a sv:userIdentity requires that the sv:userIdentity is available and the caller is authorized to READ the sv:site.
- Liking a node owned by a sv:collaborationGroup requires that the caller is allowed to view the group and is authorized to READ the sv:collaborationGroupPage.
- Liking a node owned by a sv:topic requires that the caller is a member of the topic.
- Liking a sv:page, sv:article, sv:collaborationGroupPage or a sv:sitePage requires that the caller is authorized to READ the node.
Example URL
4.62ceb8e1632a4c7c721dd/likes
Example response
{
"totalCount": 2
}
DELETE
Unlike a node by the requesting sv:userIdentity.
Returns an object containing the total like count.
Requirements
- The feature "social collaboration" and that social collaboration is enabled on the sv:site.
- The caller must have a sv:userIdentity.
Permissions
- Unliking a node owned by a sv:userIdentity requires that the sv:userIdentity is available and the caller is authorized to READ the sv:site.
- Unliking a node owned by a sv:collaborationGroup requires that the caller is allowed to view the group and is authorized to READ the sv:collaborationGroupPage.
- Unliking a node owned by a sv:collaborationGroup requires that the caller is a member of the topic.
- Unliking a sv:page, sv:article, sv:collaborationGroupPage or a sv:sitePage requires that the caller is authorized to READ the node.
Example URL
404.3957727c1634ecea12c54/likes
Example response
{
"totalCount": 1
}