How to get all jobs in Agent pools

Rajendar Talatam 1 Reputation point

what is the API call which all jobs in each pools .
I know the API for listing all agent pool , I need API get All jobs which are aatched to that agent pool
please advice

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
30,486 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Monalla-MSFT 8,131 Reputation points

    Hello @Rajendar Talatam - Thanks for reaching out.

    You can use the REST API GET{organiztion}/_apis/distributedtask/pools/{poolId}/jobrequests?api-version=6.0

    directly, e.g. via CURL, PowerShell.

    1. CURL sample:

    curl -u :<PAT>{organiztion}/_apis/distributedtask/pools/{poolId}/jobrequests?api-version=6.0

    1. Powershell Sample:

    az pipelines pool list [--action {manage, none, use}]
    [--detect {false, true}]
    [--pool-type {automation, deployment}]

    Reference - use-personal-access-tokens-to-authenticate

    Hope that helps.


    If the above response was helpful, please feel free to "Accept as Answer" so it can be beneficial to the community.

    0 comments No comments