Like or favourite a resource
/org-content/resource/{resource_id}/activitySets whether the acting user likes and favourites the resource, changing only the flags sent, and returns the engagement. It always acts as the token's user: user_id, author or author_id returns 422 missing. An empty body changes nothing. Emits org_content_activity.updated only when a flag really changes; no email or notification. Sending the opposite values undoes it. dry_run shows the result without saving it.
Path parameters
The resource's id.
Query parameters
Validate and run the call without committing it, returning what the real call would return with
meta.dry_runset.
Request body
application/json, required · OrgContentActivityUpdate
Whether the acting user likes the item.
Whether the acting user has favourited the item.
{
"liked": true
}Responses
{
"data": {
"likes": 12,
"comments": 3,
"liked": true,
"favourited": false
}
}Authorization failed. error.code is one of org_disabled,
ip_blocked, missing_scope, scope_disabled, user_disabled.
The request can't be processed (HTTP 422): validation_failed with one ErrorDetail per
problem, or a code documented on the operation.
Examples
curl -X PUT https://your-org-domain/kong/core/api/v2/org-content/resource/{resource_id}/activity\
-H "Authorization: Bearer $HELM_API_KEY"\
-H "Content-Type: application/json"\
-d '{
"liked": true
}'