Forum Discussion

raghavbijjula's avatar
raghavbijjula
Copper Contributor
Oct 31, 2023

Fetch the queue size of ADO agents

Hello,

 

I am trying to build auto-scaling solution to scale private ADO agent pool based on the queue size.

 

I see following message when the pool is full

The agent request is not running because all potential agents are running other requests. Current position in queue: 1

 

I would like the queue position value using ADO API and use it as metric to scale up/down the pool instances.

 

Could you please help.

 

Thanks,

Raghav.

 

 

1 Reply

  • You may consider API endpoint:

     

    https://dev.azure.com/{organization}/{project}/_apis/distributedtask/queues?api-version=7.1

     

Resources