I am getting an error message when trying to delete an SCMRepository objects in Rally with the API
The SCMRepository must be empty before deleting it.
I was able to successfully delete the repository without the error after I had deleted every changeset and pull request in the Repository first.
You can do this with a delete call to the changeset endpoint:
https://rally1.rallydev.com/slm/webservice/v2.0/changeset/ObjectID