FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Exact example of using "GET /api/user/search?queryString={queryString}" or search_users_by_query(self, request)

    Scheduled Pinned Locked Moved
    Q&A
    2
    2
    939
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dhait
      last edited by

      I have not found any examples and I can not get a simple query to work. For example,

      r=client.search_users_by_query("{ tenantId:a103befb-beb5-49c3-8481-0c832f061a3b }")
      

      returns an error.

      Can someone show the EXACT method of using this search API?

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        An easy way to see the elastic search string for some queries is to go to the user search in the admin screen, click 'advanced' and then click 'show elastic query'.

        Here's an example elastic search post: https://fusionauth.io/community/forum/topic/110/how-can-i-get-all-users-for-an-application-using-the-api

        I know this isn't exactly what you asked for, but hope it helps some.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 1
        • First post
          Last post