Forum Discussion

kckmurthy's avatar
kckmurthy
Contributor
10 years ago

Trying to fetch the user metrics by using v2 api call.

Hi,

 

By using v1 api call we are able to get user full metrics details. Following api call (/users/id/${user id}/metrics).

But we are unable to get same details using v2 api call (SELECT * FROM metrics WHERE user.id = '${user id}').

Kindly suggest the right api call.

 

Thanks,

Chinni.

6 Replies

  • kckmurthy's avatar
    kckmurthy
    Contributor
    10 years ago

    Hi VarunGrazitti,

     

    Thank you for your quick reply, We are looking for all metrics not for this specific one.

    We are expecting the same result in V2 which V1 api call (/users/id/${user id}/metrics) is giving.

     

    Thanks,

    Chinni.

     

  • VarunGrazitti's avatar
    VarunGrazitti
    Boss
    10 years ago

    kckmurthy - Sure, this document will help you. After you go through this, there is a PDF named Metrics_List in this document, which has all the available metrics which you can use in the APIs.

     

    I hope this helps.

  • kckmurthy's avatar
    kckmurthy
    Contributor
    10 years ago

    Hi VarunGrazitti,

     

    So there is no api call in v2 to get all user metrics in one api call like we have in v1 (/users/id/${user id}/metrics)?

     

    Thanks,

    Chinni.

     

     

  • VarunGrazitti's avatar
    VarunGrazitti
    Boss
    10 years ago

    kckmurthy - There may not be a direct call to fetch all these, but I found a very similar call here 

     

    SELECT * FROM metrics WHERE id IN('net_overall_posts','completed_registrations') AND user.id ='${user.id}'

     you can add all the required metrics name in the brackets, where I highlighted the text in red.

     

     

  • kckmurthy's avatar
    kckmurthy
    Contributor
    10 years ago

    Hi VarunGrazitti,

     

    This is not a suggestible option for our requirement,  We have to adjust the code every time when new metrics added into the system.

     

    Looks like v1 is the only option for us.

     

    Thanks,

    Chinni.