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 |
|
||||||||||||||
| like | int |
0 : Unlike 1 : Like |
||||||||||||||
| activitytype | String |
|
||||||||||||||
| 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
Comments
0 Comments