I'm trying to use the TeamCity REST API to obtain a list of all my VCS roots that are unused.
I've attempted to make a GET call to this endpoint: {my-server-name}/app/rest/vcs-roots, and then loop over them, trying to check their instances to see if the 'count = 0' by making a GET call to this endpoint: {my-server-name}/app/rest/vcs-roots/{vcs-root-ID}/instances. Eventually, I'm getting a list of all my unused VCS roots, but I also get a few more VCS roots that are not labeled as unused in the TeamCity UI.
Has anyone tried to do this? Does anyone know how to fix it?