Forum Discussion
irach15
Maven
hmmm... is it to delete one specific rating that was given by a user or delete all ratings for the message?
I'm a bit confused here,
the code snippet would help 🙂
it should be:
delete a rating from a specific user on a specific message
SuzieH
5 years agoKhoros Alumni (Retired)
HI irach15
The DELETE request will delete the single, specified rating, not all ratings. Each rating given has a unique ID.
To get the rating IDs and the associated user that gave each rating, you'd do something like this, where you constrain the query by message.id.
SELECT id, user FROM ratings WHERE message.id = '58'
Then you pass that rating ID (to delete that specific rating) to the /ratings/{rating-id} endpoint as VarunGrazitti demonstrated in his earlier post.
curl -X DELETE \
https://[COMMUNITY-DOMAIN]/api/2.0/ratings/20 \
-H 'li-api-session-key: [SESSION-KEY]'
Related Content
- 5 months ago
- 2 years ago
- 3 years ago
- 11 years ago