How to query for SCMRepository object in Web Services API
search cancel

How to query for SCMRepository object in Web Services API

book

Article ID: 57531

calendar_today

Updated On:

Products

Rally On-Premise Rally SaaS

Issue/Introduction

How to query for SCMRepository object in Web Services API

Resolution


1. All respositories in the workspace:

https://rally1.rallydev.com/slm/webservice/v2.0/scmrepository?workspace=/workspace/<WORKSPACE_OID>

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/<WORKSPACE_OID>&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/<WORKSPACE_OID>&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/<WORKSPACE_OID>&fetch=Projects,Name

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

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

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