Skip to main content

Reaction APIs (1)

Download OpenAPI specification:Download

A collection of APIs used to get and set user reactions and comments for an article/page

Reaction

Remove Reaction

Remove an existing reaction to an article

path Parameters
contentId
required
string

The id of the article/comment

Responses

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Add Reaction

Add a new reaction to an article

path Parameters
contentId
required
string

The id of the article/comment

Request Body schema: application/json
type
required
string
Enum: "like" "unlike" "cry" "laugh"

Responses

Request samples

Content type
application/json
{
  • "type": "like"
}

Response samples

Content type
application/json
{
  • "id": "123e4567-e89b-12d3-a456-426614174000"
}

Get Reactions

Return the reactions for a specific article, comment, etc.

path Parameters
contentId
required
string

The id of the article/comment

query Parameters
pageNumber
required
integer >= 1
Default: 1

The current page number of the selected data

pageSize
required
integer >= 1
Default: 200

The maximum amount of data to return in one request

orderBy
required
string
Default: "id"

The field to order the request by

type
string
Enum: "like" "dislike" "laugh" "cry"
Example: type=like

The type of reaction the user had

Responses

Response samples

Content type
application/json
{
  • "pageNumber": 1,
  • "pageSize": 0,
  • "recordsTotal": 0,
  • "recordsFiltered": 0,
  • "data": [
    ]
}

Get Reaction Counts

Return the reaction counts for a specific article, comment, etc.

path Parameters
contentId
required
string

The id of the article/comment

query Parameters
type
string
Enum: "like" "dislike" "laugh" "cry"
Example: type=like

The type of reaction the user had

Responses

Response samples

Content type
application/json
{
  • "data": [
    ]
}