How to get get revision of vcsroot on the moment of build start with API?
I need get revision of a specific vcsroot of a build; for example, I need get revision of second VCSRoot for build "19126-8.7.522.54427":

Seems there is no API for it, by now I try to get initial build in build chain to this build, and try get the changes in the initial build, but the problem is that the initial build may triggered from TC setting, not from the second vcsroot.
Is there any way to get the revision? Thanks!
Please sign in to leave a comment.
Hi,
The %build.vcs.number.x% that you can use as a build parameter should contain the revision number of the VCS Root x. Can you check whether that's what you need?
Thanks Denis, but I think it's not what I need, I need get the value with API, seems there is no such API.
You should be able to gather that value also from the API. The "builds" endpoint will offer, among others, a "revisions" field that will include the revisions being applied on that build.
You can use this endpoint to check the values returned: http://<server_url>/app/rest/builds/id:<build_id>?fields=revisions(revision(*))
Thanks, I know the revisions field forthe API result, but it does not helps for my scenario.
For my build type, there are 2 vcsroot can trigger the build ("TC Setting" and vcsroot for product code repository).
If a build was triggered by changes in product code repository, then I can get the correct revision from "revisions" field;
But if a build was triggered by vcsroot "TC Setting", then the "revisions" field does not helps since it does not contains any change from product code repository;
So I'm wondering if there is an API to get revisions of all vcsroots connecting to the build type (As you see on the screenshot, we can find it from web page).