Forum Discussion

gleung's avatar
gleung
Mentor
11 years ago

revoking Kudos, rest API

Hi,

I am trying to use the 'revoke' method for kudos found here : Kudos revoke doc. But I get the following error response, using a POST request to  'community-name/restapi/vc/messages/id/151/kudos/revoke/

 

    code: 501

    message: "Unknown path element at node 'message.kudos'."

 

Is the kudos revoke method actually implemented? I am able to give kudos, but not revoke.

 

Thanks

  • For lithium community, I tried GET, but for our other community, both GET /POST works for give and revoke.

5 Replies

  • What API did you use to add Kudos, AFAIK, it works fine for revoke as well as long as you are an admin. Usually the revoke is not enabled for normal users.

    It doesn't seems the permission related issue.
  • gleung's avatar
    gleung
    Mentor
    11 years ago

    Thanks for the reply grazitti,

    I am using the following API, 'community-name/restapi/vc/messages/id/151/kudos/give to add Kudos, which works fine, but revoking with on the same messageId gives me that error. I am also performing all these requests as an admin, so it shouldn't be a permission issue.

  • gleung's avatar
    gleung
    Mentor
    11 years ago

    Interesting.

     

    Did you perform these using the 'GET' method?

     

    So I found that the main difference is that I have been testing on a lithium staging environment where I see these error messages.

    I was able to recreate a successful 'give' and 'revoke' using a production environment with 'GET' request, (which is interesting, since the docs say that these are suppose to be 'POST' methods. But I still get the same error when testing these requests in the staging environment.

     

    So in summary:

     

    Staging Enviroment:

    GET method, result  = code":504,"message":"Method 'get' is not supported off of node 'message.kudos.revoke'.

    POST method, result = code: 501, message: "Unknown path element at node 'message.kudos'."

     

    Production Environment:

    GET method, result = works!

    POST method, haven't tested yet (hoping that this will work)

     

    Is this expected behaviour ?

    Thanks

     

     

  • For lithium community, I tried GET, but for our other community, both GET /POST works for give and revoke.