0
votes

I am using the Azure DevOps REST APIs to do some branch policy audit work. I want to see all the policy configurations, active and deleted. The API: https://dev.azure.com/organization/project/_apis/policy/configurations/?api-version=5.0 only returns active policy configurations. In-active ones should have the isDeleted flag as true. I can access those policy configurations if I already know the configuration ID and if it is included in the API call like this: https://dev.azure.com/organization/project/_apis/policy/configurations/7001?api-version=5.0

I was wondering if there is a way to list deleted policy configurations associated with a repository or project.

1
No, you cannot retrieve deleted branch polcies using Azure DevOps REST API for policy configuration by default.Eriawan Kusumawardhono

1 Answers

0
votes

Rest API does not currently support querying deleted policy configuration. When get a list of policy configuration, REST API below only output the policy not deleted:

GET https://dev.azure.com/{organization}/{project}/_apis/policy/configurations?api-version=5.0

You could submit a suggestion ticket to suggest the new feature through this url to promote development of richer features.

Note: After suggest raised, you can vote and add your comments for this feedback. When there are enough communities vote and add comments for this feedback, the product team member will take this feedback seriously