Likes API

Like / Unlike content

OVERVIEW

Like / Unlike content API

Request URI

Content's likes :

PUT /api/4/likes?contenttype=wiki&contentid=102&like=0

Content's Activity likes :

PUT /api/4/likes?contenttype=wiki&contentid=102&activitytype=CREATED&like=0

 

Parameter Name Value Description
contentid String

This the content id of the required content. e.g

blogid for contenttype=blog, taskid for contenttype=tasks

contenttype String


 /api/3/likes?contenttype=files&contentid=102&like=0

 

  • Microblogs
  • Files
  • Wiki
  • Blog
  • Events
  • Comments
like int

0 : Unlike

1 : Like

activitytype String
Content Type Scope of activities
Files    UPLOADED
   UPDATED
   LIKED
Wiki    CREATED
   EDITED
   LIKED
Blog    PUBLISHED
   EDITED
   LIKED
Events    CREATED
   EDITED
   LIKED
Comments    ADDED
Tasks    ADDED
   UPDATED
foldertype (Optional) String

This parameter is used for the QA attachment.

e.g  foldertype = QA 

It is optional and used for the QA attachment in version 5.0

api/5/likes?contenttype=files&contentid=1&like=0&foldertype=QA

 

Response

If successful, the API returns the 200 status code. If the operation fails, the API will return one of the following error codes: 


Response codes

 

CODE MEANING
    201    Comments returned successfully
    400    There is a problem with the parameters
    401     Unauthorised
    403    Validation failed | Forbidden
    500    Internal error occurred while returning comments

 

In case of an error code other than 201, an error object will be returned in the format 

 
Note :
In Collaborate, we are not supporting individual tasks however we are supporting task's activity. 

Comments


0 Comments

Last Updated: Nov 08,2024