search cancel

Agile Central - WSAPI: How can I get a list of all users of a given workspace using Web Services API


Article ID: 109088


Updated On:


CA Agile Central On Premise (Rally) CA Agile Central SaaS (Rally)


How can I get all Users of a Workspace named: "ABC" using WS-API ?


Component: ACSAAS


1. Query the Workspace endpoint to get the ObjectID of the workspace. Make certain you specify 'ObjectID' in the Fetch argument (unless you use Fetch=True, to return all fields):

Query String:    (Name = "ABC") 

2. Use the ObjectID of the workspace and query the WorkspacePermission endpoint. 
(Workspace.ObjectID = <ObjectID retreived by step1>)

This query will return the total count of users for that workspace. If you are interested with the number then stop here and read the TotalResultCount.

3. If you need further information about these users (such as First Name, Last Name etc.. ) then you will need to refer to the actual User endpoint using the User._ref attribute in the JSON you just received in step #2.

So you need to loop over all your Users in the JSON from step 2, then call the User endpoint using the User._ref field, then read the user fields you're interested with and continue to your next user in the loop.