Forum Discussion

Claudius's avatar
11 years ago

Getting unanswered messages older than 24h

I would like to pull via #REST_API all unanswered messages that are older than 24h (e.g. message post timestamp is older than 24h). Unfortunately the board message search does not really seem to offer such functionality:

https://community.lithium.com/t5/Community-API/bd-p/developers-rest-api?leaf-id=Board.search#Board.search.messages

 

Any alternative suggestions to achieve that?

Do I really have to manually compare timestamp with current time and omit all those that are too young?

Maybe LiQL allows for such magic? 

3 Replies

  • It seems this is the only way to achieve the results, you'll need to manually check for the threads within last 24 hours.
  • OlivierS's avatar
    OlivierS
    Lithium Alumni (Retired)
    11 years ago

    Claudius 

     

    I don't have the solution, but just a few thoughts.

     

    1- In the Admin Metrics, you have 'Minutes to First Response'. I'm not sure where it comes from, but you might have a field tracking the first response time. If this is null, we can assume there was no response. And if you can do a diff between now and the timestamp of the post, and it's greater thean 1440 minutes, you will get what you want. I hope!

     

    2- Another way, depending on what you're trying to achieve, would be to use the escalation. you set the value to 1440 (24 hours), and when a topic is unanswered within that time, it will be escalated by email to the email you've specified.

     

     

  • Claudius's avatar
    Claudius
    Boss
    11 years ago
    I want to show those messages in a widget to our super users, so the email escalation is not a route that would work for me.

    "Minutes to first response" seems to be an interesting path though: Any idea if that information is exposed through the Community API? The MessageMetaData documentation is a bit lightweight and doesn't expose which metadata is available: https://community.lithium.com/t5/Community-API/bd-p/developers-rest-api?branch=MessageMetadataAssociation