" class="nav-category">Career
This widget could not be displayed.
  • IT Topics
  • This widget could not be displayed.
  • Repo
  • This widget could not be displayed.
  • This widget could not be displayed.
  • ">MSPs
    This widget could not be displayed.
  • Community News
  • cancel
    Showing results forย 
    Search instead forย 
    Did you mean:ย 
    Disclaimer
    JUMPCLOUD EXPRESSLY DISCLAIMS ALL REPRESENTATIONS, WARRANTIES, CONDITIONS, AND LIABILITIES OF ANY KIND ARISING FROM OR RELATED TO THIRD-PARTY SOFTWARE, SCRIPTS, REPOSITORIES, AND APIS. JUMPCLOUD IS NOT REQUIRED TO SUPPORT ANY SUCH THIRD-PARTY MATERIALS AND ALL RISKS RELATED TO THIRD-PARTY MATERIALS ARE YOUR RESPONSIBILITY. PLEASE ALSO REVIEW THE JUMPCLOUD TOS.

    Python - Get a list of users but filter by specific username

    scheng
    Novitiate I

    Hi,

    I'm trying to get the ID of a specific user by filtering via username, but for some reason, the filter specifically doesn't work in Python; I can get it to filter in Postman using the yaml, but I can't get it to work in Python. I followed this based on the Jumpcloud API v1.0 but it returns all IDs (though it only prints 10 due to the limit) Any advise would be appreciated.

     
    querystring = {
                    "limit":"10",
                    "fields": "id", # Assuming you want to include the user ID in the response
                    "filter": {"username":{"$eq":username}}
                }

    Thanks,

    A Struggling User

    1 REPLY 1

    urvashi
    Bronze I
    Bronze I

    Hi @scheng which endpoint are you working with? I can do some testing on my end and get back to you. You can also skip/change the limit field so it will give you more responses. 

    You Might Like

    New to the site? Take a look at these additional resources:

    Community created scripts:

    Our new Radical Admin blog:

    Keep up with Product News:

    Read our community guidelines

    Ready to join us? You can register here.