The VSTS REST API lets you list builds and agent queues.
This is documented at https://www.visualstudio.com/en-us/docs/integrate/api/overview
What I did not find documented is how to get the list of agents.
Based on request logging, it seems this is used:
https://<name>.visualstudio.com/_apis/distributedtask/pools/<id>/agents?includeCapabilities=false&includeAssignedRequest=true
Please add to the docs if this is supported.
hi @jawn , this information can be found here, I believe:
https://docs.microsoft.com/en-us/rest/api/vsts/clt/agents
Let me know if that's not quite what you're looking for, I'll have to ping the product team if not.
That seems to refer to cloud load test agents, which is different in my opinion.
I agree. Right now the resources for Build Agent Pools are there, but they are just not documented.
This definitely needs adding!
Hi all! This seems to be a pretty popular request so I've reached out to the Build team to see what they have!
Hey folks. Pipelines platform PM here. I'll try to get some docs added. In full transparency, it might be a while; we have a lot of other things we need to focus on right now.
In the meantime, feel free to use tools like Fiddler, Visual Studio IntelliSense on the .NET clients, or looking at the Node.JS client source to discover these APIs. Anything in the _apis/ namespace is a public contract and should not have breaking changes.
Here is how you can get agent pool at organization level
https://organizationname.visualstudio.com/_apis/build/Queues
https://organizationname.visualstudio.com/_apis/distributedtask/pools?api-version=5.0-preview.1
Here is how you can get agent pool at project level
https://organizationname.visualstudio.com/projectname/_apis/distributedtask/queues
This is in progress.
Still trying to get this through. I'm a PM, not a dev, so I don't normally have to make changes in the core codebase. It turns out there are various gates I wasn't previously aware of 馃榿
@vtbassmatt thanks for your grit.
Most helpful comment
Here is how you can get agent pool at organization level
https://organizationname.visualstudio.com/_apis/build/Queues
https://organizationname.visualstudio.com/_apis/distributedtask/pools?api-version=5.0-preview.1
Here is how you can get agent pool at project level
https://organizationname.visualstudio.com/projectname/_apis/distributedtask/queues