How can I list and count ALL bookmarks in the system?
I have been asked to analyze bookmarks, to determine such things as
- How many users make use of the bookmark feature in Khoros?
- What is the maximum number of bookmarks for a user?
- What is the average number of bookmarks for users with bookmarks?
To do this, I would normally use LiQL v2 API to do
{{prod}}/api/2.0/search?q=select count(*) from bookmarks
however this always returns 0! If I add a where clause for a user such as
{{prod}}/api/2.0/search?q=select * from bookmarks where subscriber.id = '5375'
it works fine. But I have 500k users so I am don't want to do it that way.
The filter by target.type does not work either.
I am logged in as Admin user. Any help would be appreciated.
If we use 'select count(*) from bookmarks,' it will only give the bookmarks at the current logged-in user level.
If we want all users bookmarks, we can use 'select * from bookmarks where subscriber.id = '${user.id}'.
1. Create an endpoint.
2. Get all users using the users API with cursor (recommended) or offset.
3. Then pass each user ID in the bookmarks query.
4. This endpoint will provide all the data in one place.