WS API: How to query for workspace by name
search cancel

WS API: How to query for workspace by name

book

Article ID: 57602

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

How to query for workspace by name?

Resolution

Authentication:
The preferred method of authentication for rally1.rallydev.com is ApiKey but this article is using username/password for authenticating GET requests.

 

This user's default workspace is NM Chicago. Queries for a non-default workspace will require an additional workspace parameter. Queries to a default workspace do not require a worspace parameter because they are implicitly scoped to the user's default workspace.

1. Construct an endpoint for a default workspce:

https://rally1.rallydev.com/slm/webservice/v2.0/workspace?query=(Name = "NM Chicago")

2. Construct an endpoint for a non-default workspce:

If we construct this endpoint without the workspace parameter 0 results will be returned.
https://rally1.rallydev.com/slm/webservice/v2.0/workspace?query=(Name = "NMDS")
To make this endpoint work, the request must be scoped as shown below:

https://rally1.rallydev.com/slm/webservice/v2.0/workspace?query=(Name = "NMDS")&workspace=/workspace/<WORKSPACE_OID>

3. Endpoint to get all workspaces in the subscription.

Start with this endpoint to get the ObjectID of your subscription:

https://rally1.rallydev.com/slm/webservice/v2.0/subscription


The total result count of this query will vary depending on the permissions of the user who is authenticating the request. Since this user has access to 4 workspaces only, the total result count is 4. A different user may have a different total result count. A subscription administrator will get all workspaces in the subscription:

https://rally1.rallydev.com/slm/webservice/v2.0/Subscription/<SUBSCRIPTION_OID>/Workspaces