Forum Discussion

ann_eav's avatar
5 years ago

Community API v1: filter registered users to get real numbers

Hi everyone!! 

I was playing with v1 of the Community API to create some custom components and I was trying to display the total members registered.

I found out that the query https://COMMUNITY/restapi/vc/users/registered/count returns me a bigger number than the one I see in my metrics in the Studio zone.

I was thinking if there is a way to filter this by registered and not erased members, to get the current total registered members. I know I also have some SSO members that haven't finished the registration so I also would like to not count them as full registered members. 

I have not found in the documentation a way to get more specific counts so I was hoping to know if anyone has any ideas about this. 

  • ann_eav 

    Sorry if I am missing the point here but why not just use APIv2? Select count(*) from users will get you what you need.

  • Hi ann_eav ,

    Please look for the following API:

    https://COMMUNITY/restapi/vc/users/registered/count

    Please Give Kudos if you find this post useful and also mark this as Accepted Solution if this is the required solution.

    Regards

    Tarun Kumar

    • ann_eav's avatar
      ann_eav
      Ace

      Thanks for the quick reply!! 

      Sorry, I misspelt the endpoint, I was talking about the registered one.

      If a user has made SSO to our Community but they have abandoned the process before setting a username, the Count counts them as a registered user, and not as an incomplete one, and I think that's my main problem to have a difference between my metrics and this endpoint.

      So that why I am asking if there's any way to filter by login field not empty or something like that.

      The result of the endpoint:

       

      <response status="success">
      <value type="int">1138</value>
      </response>

       

      The result of my metrics dashboard (from the start of the Community until today):

      • ann_eav 

        Sorry if I am missing the point here but why not just use APIv2? Select count(*) from users will get you what you need.