curl --request POST \
  --url https://{domain}-be.glean.com/rest/api/v1/updateanswerlikes \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "answerId": 3,
  "answerDocId": "ANSWERS_answer_3",
  "action": "LIKE"
}'
{
  "likes": {
    "likedBy": [
      {
        "user": {
          "name": "George Clooney",
          "obfuscatedId": "abc123"
        },
        "createTime": "2023-11-07T05:31:56Z"
      }
    ],
    "likedByUser": true,
    "numLikes": 123
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Scio-Actas
string

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

X-Glean-Auth-Type
string

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

Body

application/json
UpdateAnswerLikes request
answerId
integer
required

The opaque id of the answer to like.

Example:

3

action
enum<string>
required
Available options:
LIKE,
UNLIKE
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.

Example:

"ANSWERS_answer_3"

Response

200
application/json
OK
likes
object
required