Tarun
Tarun

Reputation: 53

How to do search in Users schema in TrueVault?

In my application a provider will be linked to many clients. Now I want to search all the clients of a particular provider. Both client and providers are storing in user's schema. Can anybody please guide me how to do search in user's schema so that I can get the list of all clients for a particular provider. I searched using SearchUser APi but getting blank document array.
Below is the response that I am getting from the SearchUser API:-

{ "data": { "documents": [], "info": { "current_page": 0, "num_pages": 0, "per_page": 100, "total_result_count": 0 } }, "result": "success", "transaction_id": "00745c12-d4e5-4266-a655-d5b6c71819fa" }

Upvotes: 1

Views: 206

Answers (1)

Dan Cleary - TrueVault
Dan Cleary - TrueVault

Reputation: 111

I answered this same question on our discussion forums, but will repeat here:

For the example you gave, you can use this filter:

{ "filter":{ "username":{ "type":"eq", "value":"+91XXXXXXXXXX" } } }

For a full list of filters available for both Document and User Search, you can reference TrueVault's API Documentation.

Cheers, Dan

Upvotes: 0

Related Questions