Forum Discussion

packet's avatar
packet
Mentor
12 years ago

Recreate the 'user-search-result-email-block' using REST

 

I'd like to recreate the information block returned when performing a user search using REST. Before I run off and spend a lot of time figuring out all of the calls needed, I figured I ask to see if anyone else had successfully created something similar. 

 

The goal is to provide an off domain service that allows a community user ID to be looked up and have all of the 'pertinent' information displayed. 

 

~ packet

    • packet's avatar
      packet
      Mentor

      Thanks for the nudge in the right direction. 

       

      It looks like I can get everything except page views from the following calls:

       

      • /search/users?q=<substring>
      • /users/login/<login>
      • /users/login/<login>/ranking
      • /users/login/<login>/posts/count

      The only thing I can't seem to recreate is the "Page Views" number.

       

      I've tried adding these and the resulting number does not match:

       

      User: /views/boards/style/all/count
      User: /views/boards/style/blog/count
      User: /views/boards/style/forum/count
      User: /views/boards/style/idea/count
      User: /views/posts/style/all/count
      User: /views/topics/style/blog/count
      User: /views/topics/style/idea/count

       

      Is there a user REST call that provides the same "Page Views" number?

       

      Thanks. 

       

      -- Packet

       

      • DougS's avatar
        DougS
        Khoros Oracle

        For page views, you can get the page_views user metric:

         

        /restapi/vc/users/id/<user id>/metrics/name/page_views

        /restapi/vc/users/login/<user login>/metrics/name/page_views