How to query for SCMRepository object in Web Services API

Document ID : KB000057531
Last Modified Date : 14/02/2018
Show Technical Document Details

Issue

How to query for SCMRepository object in Web Services API

Resolution

Below are three examples of queries. Replace the ObjectID 12352608129 used in the examples with the ObjectID of your workspace.

1. All respositories in the workspace:

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/12352608129

User-added image

Notice that the default pagesize in WS API is 20. If more than 20 results are expected, set pagesize query parameter to max allowed 200

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/12352608129&pagesize=200

If more than 200 are expected, a manual paging is required. A second query can be issued with start query parameter set to 201:

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/12352608129&pagesize=200&start=201

2. All respositories in the workspace with an explicit fetch statement:

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/12352608129&fetch=Projects,Name

User-added image

3. Filtered by an attribute, e.g. Name:

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/12352608129&query=(Name = "repo2")

User-added image

Related article:
How to create an SCMRepository and Changeset in Web Services API