⚠️ This documentation pertains to a preview endpoint. This feature is not yet ready for API consumption and may change.
For inquiries or feedback, please contact us at Glean.

Update Answer likes

post/updateanswerlikes

Update the likes for an existing user-generated Answer. Examples are liking or unliking the Answer.

SecurityBearerAuth
Request
header Parameters
X-Glean-Auth-Type
string

Auth type being used to access the endpoint (should be non-empty only for global tokens).

X-Scio-Actas
string <email>

Email address of a user on whose behalf the request is intended to be made (should be non-empty only for global tokens).

Request Body schema: application/json
required

UpdateAnswerLikes request

action
required
string
Enum: "LIKE" "UNLIKE"
answerId
required
integer

The opaque id of the answer to like.

answerDocId
string

Glean Document ID of the Answer. The Glean Document ID is supported for cases where the Answer ID is unavailable. If both are available, using the Answer ID is preferred.

Responses
200

OK

Response Schema: application/json
required
object (AnswerLikes)
400

Invalid request

401

Not Authorized

429

Too Many Requests

Request samples
application/json
{
  • "answerId": 3,
  • "answerDocId": "ANSWERS_answer_3",
  • "action": "LIKE"
}
Response samples
application/json
{
  • "likes": {
    • "likedBy": [
      • {
        • "user": {
          • "name": "George Clooney",
          • "obfuscatedId": "abc123"
          },
        • "createTime": "2019-08-24T14:15:22Z"
        }
      ],
    • "likedByUser": true,
    • "numLikes": 0
    }
}