Reputation: 715
I am trying to get the name of the agent that executed a given build from the TFS Web API.
There is a LOT of great details in there, but the Agent that ran the build does not seem to be in there. This is a surprise to me.
Upvotes: 0
Views: 269
Reputation: 26982
You have to go to the timeline of the build:
https://learn.microsoft.com/en-us/rest/api/vsts/build/timeline/get?view=vsts-rest-4.1
This will return a Timeline
, which has an array of TimelineRecords
. The workerName
of the timeline records contains the name of the agent running the operation.
Upvotes: 1