Forum Discussion

RogerZhang's avatar
15 years ago

How can I get all users's metrics

I  know  there  have  one  REST  API ( '

 

/restapi/vc/users/id/43/metrics

' )  can  get  one  user's  metrics  ,  like  'kudos_events_received' , 'posts', 'logins', 'board_views' , 'page_views' etc.

 

But ,  at  my  site  there are  more  than  1000 user,  when  I  export  their  metrics  to  excel  file  I  need  call  the  API  1000  times,  for example,  it  take 2 seconds every  time  the  API  is  called,  it   will  take  more than 2000 seconds  in  the  whole  process. Oh no.......

 

I  don't  know  if  there  have  one  API  can  get  all  user's  metrics  by  call  only  one time;

or   how  can  I  spend less time  to  get   user's  metrics ?

 

Thanks  for   your help!

3 Replies

  • JakeR's avatar
    JakeR
    Khoros Oracle
    15 years ago
    Well, I think in this day and age, it probably *could* be done faster, but you know, 2000 seconds is really only about 35 minutes, so it could be a lot worse. :)

    Seriously though, that is the only call there is for this and that is the only method in which you can automatically receive this info today. You can do it manually, on a user-by-user basis, in User Metrics, but that is even slower.

    The only other option is to engage our Professional Services team to deliver, for a charge, an automated report that could be delivered to you.
  • bouleau's avatar
    bouleau
    Adept
    13 years ago

    Hi,

     

    Unless anyone minds, I'd like to bump this thread.

     

    Does anyone know if this has been made possible in an update since the original post? Given how very pleasant the Lithium API normally is to work with I'd be surpised if I'd have to crawl through our entire user base (of nearly 100.000) to get simple metrics like this. 

     

    /Felix

  • YuriK's avatar
    YuriK
    Khoros Expert
    13 years ago

    Hey Felix,

     

    Currently there isn't a way to use the apis to get all the user's metrics in one shot. I would love to know what you are trying to solve for with this.

     

    If you're just trying to create a user report to pull into Excel, you can try the following.

     

    1. Go to Admin->Metrics
    2. Click on User Reports tab
    3. Set up the report the way you want
    4. Click Export to CSV

    Hope this helps,

     

    Yuri