Forum Discussion

babbk's avatar
babbk
Contributor
2 years ago

API extract messages after a specific time

Hi, all.  I'm new.  I need to build an api extract that will pull all messages that have been updated since a specific date/time.  This includes any message added, updated, or deleted.  It looks like LiQL will allow me to pull by the field last_edit, which I'm hoping will give me anything deleted, as well.

The api also needs to pull back any replies and kudos added, updated, or deleted since that same specific date.  I'm not finding anything in the LiQL documentation that would allow that.  Or, did I miss something?

Or, is there a better way to accomplish this?

Thanks, all.

  • DougS's avatar
    DougS
    Khoros Oracle

    Here is the documentation for that constraint:

    https://developer.khoros.com/khoroscommunitydevdocs/docs/messages#conversationlast_posting_activity_time

    As it says, it:

    Filters messages by the larger of these two date fields:

    • the last post time (equivalent to the conversation.last_post_time constraint)
    • the last time the topic message was published (the last time a non-draft edit was made)

    The "last post time" it refers to (what the conversation.last_post_time constraint is for) means the last time a reply to the conversation was posted.

    -Doug

    • babbk's avatar
      babbk
      Contributor

      I am writing an interface that will pull any new/updated/deleted messages from Khoros, and update another system.  It will run on a regular interval, so I would only need any information that had changed since the last time my process was run.  This should include all messages, replies, and kudos.  Thanks for your help!

  • babbk,

    I am afraid we don't have that option, Bulk Data API is the best way to pull that data. 

    It's more that we have two main architectures one is the current state of the data in the database, and the other is more of an event/analytics log. When you edit content, we change the content. If you want a record of what was said, when it was created, and when it was edited or you wish to access events such as delete (which aren’t always captured, especially if things are removed vs set as a status deleted) then some of the data you are trying to get may not be accessible or may not be very performant to poll for on a regular cadence.

     
  • Maybe MohammedSh could shine some light on what exactly entails conversation.last_posting_activity_time (e.g. what actions trigger an update of this value, commenting on that topic?, updating a comment or the initial post?, deleting a comment? Kudoing the initial post or a comment?), if we knew that we might be able to work something out by using that field as some sort of "pre-filter"...

  • DougS does conversation.last_post_time reflect when a reply is edited and saved as well?