0
votes

I need to know whether we have an API to check repository permissions for git in azure devops + rest api.

I need an API which could give me the data ..for the path shown below:

Path: Azure Devops --->Project--->Project settings--->repositories -->Security for all Git repositories

1

1 Answers

1
votes

I'm afraid that there no such directly rest api provided can achieve all of the security of groups. Since these groups which under different repository has different configuration, so we could not use one directly api to get all of these info. This is a complex operation.

Though these api does not documented, if you still want to use api to get these info, here I suggest you can track these apis from Network through press F12 in pages.

enter image description here

Open the Repositories permission setting page, press F12 to track api.

As test, I have been get some:

https://dev.azure.com/{org name}/{project name}/_api/_security/DisplayPermissions?__v=5&tfid={tfid}&permissionSetId=2e9eb7ed-3c0a-47d4-87c1-0ffdd275fd87&permissionSetToken=repoV2%2F0xxxxxxxe7475323

Note: The permissionSetId are consistent, so just need to change the tfid and the permissionSetToken according to your repos.

Since this api does not documented, you can raise one suggest on our support community and PG team will consider this feature suggestion.