When I try and delete a rating with the following (token shortened for brevity):
curl -X DELETE -H "Authorization OAuth client_idxxxx" http://ugc/odata.svc/Ratings(Id=634)
I get the following error:
<message xml:lang="en-US">The appropriate delete claim has not been set.</message>
My logs show:
2014-03-26 17:52:58,965 DEBUG ClaimStore - put: uri=taf:request:uri, value=/odata.svc/Ratings(Id=634) 2014-03-26 17:52:58,965 DEBUG JPARatingDAO - Searching for rating with id 634 in storage. 2014-03-26 17:52:58,965 DEBUG ClaimStore - put: uri=taf:claim:contentdelivery:webservice:post:allowed, value=false 2014-03-26 17:52:58,965 DEBUG ODataService - ODATA.NET: Removing entity with path: Ratings(Id=634) 2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: com.tridion.ambientdata.dotnet.DotNetClaimStore@76e86c03, thread: Thread-15 2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-15 2014-03-26 17:56:29,395 DEBUG WebContext - setCurrentClaimStore: null, thread: Thread-32
Is there something specific I need to do to set this "delete" claim?
Whilst I have my answer - we're trying to avoid the default behaviour of the same user being able to post multiple ratings for the same item, so where actually checking if this user had rated already then delete any existing rating.
Is it possible for the visitor service to delete a rating?