Forum Discussion

gangadharaiah's avatar
3 years ago

How to retrieve all the users data using LiQL/API with email/SSO_id filter?

Hi All,

 

New to Khoros and I am trying to figure out how to retrieve and as well as update the bulk users data.

How can I retrieve all the users data using LIQL/ API calls? I need to retrieve all the users to update the email of bulk users (replacing invalid emails with valid emails).

 

How can I query all the users in our community?  also how to use SSO_ID or email with LIKE or MATCH in LiQL to query users that has email/SSO_ID with certain pattern (query all user with email or sso ends with "@company.com").

It seems like email cannot be user in where and SSO_Id cannot be used with LIKE, are there any other ways to apply filter for these two columns?

I do see that API 2.0 results in only 25 records when I execute with below API

https://community.mycompany.com//api/2.0/search?q=select+*+from+users.

 

Appreciate any direction 

  • https://developer.khoros.com/khoroscommunitydevdocs/docs/users

    Here is the 'Users' collection's reference. It mentions all the fields, filters as well as sorts you can use with this collection. Example LiQL Query:

    SELECT first_name,email,sso_id FROM users LIMIT 50

    You can increase or decrease the number of records by using LIMIT records_limit at the end of the query.

    You can make API V2 LiQl calls using liql('query') in Freemarker.

    • gangadharaiah's avatar
      gangadharaiah
      Guide

      Thanks akshays 

      I am looking for a solution for one time bulk update of users is and work arounds for limitations/restrictions around of SSO_ID and email fields in the LIKE and WHERE clause of LiQL.

      I cannot use SSO_ID with LIKE and email in WHERE of LIiQL.

      I  need this to query/update the data based on filter criteria.