How to get the list of failed Agent pool jobs for the last 7 days in Azure DevOps

159 Views Asked by At

How to get the extended list of failed jobs when the incident occured since I can see only failed jobs for today.

enter image description here

1

There are 1 best solutions below

0
On

According to your description, you can see only failed jobs today, please check if you are setting the retention policy-> Project Settings -> under Pipeline -> Settings Retention policy and try to use the following REST API to list the jobs

https://dev.azure.com/{organiztion}/_apis/distributedtask/pools/{poolId}/jobrequests

If there are more than 7 days jobs shows, you could use the PowerShell script to filter the failed jobs.