Forum Discussion

Fellsteruk's avatar
9 years ago

Help with LiQl query

Hey,

 

I'm trying to get a count of all unique users who logged into the community within the past 30 days. It would appear the only way to do this is using Liql/API call however i'm no developer... Anyone care to share some code which would help me get a count for this? 

 

Thanks 

  • DougS's avatar
    DougS
    Khoros Oracle

    I do not think we have a way currently in the API to look up a set of users who have logged in over the last X number of days (nor by any other time-unit). The closest thing I think we have is a V2 call that tells you the last visit time for each user: 

     

    https://mycommunity.mydomain.com/api/2.0/search?q=SELECT+ last_visit_time+FROM+users

    You can add any of these fields to the WHERE clause of your LiQL users query.

     

    That list currently does not contain the last_visit_time field, but I could see us wanting to add something like that in the future. I would recommend posting an idea in our product ideas board requesting that the last_visit_time be added as a LiQL constraint so you can search for users that have signed in over the last 30 days.

     

    -Doug