Forum Discussion

lenovoesupport's avatar
lenovoesupport
Contributor
8 years ago

API to get Moved Message and the Moved Message Url

 

 
Is there any API to tell if a message has been moved (i.e. check if a message is a placeholder message)?
I am currently using V2 API query “SELECT * FROM messages WHERE id IN ('one id','other id') and placeholder = true”. But placeholder’s value will be set to true only if I have set the setting “Leave placeholder” while moving a message. So this placeholder = true is not a setting on which I can totally rely on to check if the message is moved message or not.
 
Also, if I select setting “Merge with an existing topic, article, idea, or entry” then a moved message URL is coming into the placeholder but when I hit the API “/restapi/vc/messages/id/[id]/body” then moved message URL is not coming under body content. So how will I get the moved message new URL with the help of REST API.

 

  • Hi lenovoesupport  you can use canonical URL to identify the moved message.  If canonical URL is different than view href URL  it means it is moved message. (see screenshot)


    Screenshot (1).png
    • lenovoesupport's avatar
      lenovoesupport
      Contributor

      VikasB

      Thanks for your reply.

      For the moved thread, We've tried V2 API to query the message detail, but didn't see a field called canonical_url;

      The same thing is for V1 API, but the value is null.

      I am not sure if extra settings are required to show the canonical url property in the API.

      If we could see canonical_url, I think the solution should work.

       

      Thanks