Forum Discussion

Suchith's avatar
6 years ago

API V1 and V2 returning different result.

Hi,

I wanted to check total number of users in our community. I did both V1 and V2 calls and Results are attached.

API v1:
/users/count

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

API v2:
select count(*) from users

{

"status": "success",
"message": "",
"http_code": 200,
"data": {
"count": 60750
},
 
"metadata": {}

}

Why I am getting difference in user count.

Thanks,

  • Suchith,

    We are also getting the same difference in multiple communities.I have tested this with registered and verified users.

    I think this should be reported to Lithium so they can give the possible solution on this query.

  • ClaudiusH's avatar
    ClaudiusH
    Khoros Alumni (Retired)

    I would assume it has to do with closed accounts and / or the partially completed profiles functionality. Are you using either on your community?

    Since closing accounts was added as a feature quite some time after Lithium moved to API v2 it is quite likely that v1 counts all users, including closed ones.