Rally Software

  • 1.  Use curl to get full list of user accounts

    Posted Jun 13, 2018 03:22 PM

    I want to get a full list of all active users using a curl command. 

    I can get logged in and can see some users but can't get the full list.



  • 2.  Re: Use curl to get full list of user accounts

    Broadcom Employee
    Posted Jun 13, 2018 04:25 PM

    Hi Marc,

    Are you asking for a full list of users per the entire subscription? a certain workspace?

    What's the context or confines of the list you're trying to get?

     

    Thanks,

    Sagi



  • 3.  Re: Use curl to get full list of user accounts

    Posted Jun 13, 2018 04:28 PM

    Hi Sagi,

     

    Sorry, I am trying to get a list of active users for the entire subscription.

     

    Thank You,

     

    Marc



  • 4.  Re: Use curl to get full list of user accounts
    Best Answer

    Broadcom Employee
    Posted Jun 14, 2018 12:40 AM

    Thanks Marc.

     

    How about this: let us know if this helps:

     

    curl -X GET \
    'https://rally1.rallydev.com/slm/webservice/v2.0/user?query=%28SubscriptionID%20=%20%22<YOUR SUB ID>%22%29&fetch=true&start=1&pagesize=20' \
    -H 'ZSESSIONID: <API KEY>'

     

    Thanks,

    Sagi



  • 5.  Re: Use curl to get full list of user accounts

    Posted Jun 14, 2018 03:36 AM

    Sagi is correct.  One item to tweak may be the start=1&pagesize=20.  This will only return the first 20 results.  If you have more users than that, update the pagesize to be more so you can see all the users in one query without the need to page.

     

    Michael