Hello!
Is there any possibility to add approvers group into pipeline environment by using REST API? I know that we can create environment by REST api: https://learn.microsoft.com/en-us/rest/api/azure/devops/distributedtask/environments/add?view=azure-d... but I couldn't find any information that we can add approvers by REST API. Manual steps looks like in the picture
I tested solution described here: https://stackoverflow.com/questions/72557511/how-to-add-update-approvers-for-environments-through-rest-api-on-azure-devops
but I couldn't get configuration ID using REST API GET: https://learn.microsoft.com/en-us/rest/api/azure/devops/approvalsandchecks/check-configurations/list?view=azure-devops-rest-7.1&tabs=HTTP
I got error:
Invoke-RestMethod : {"$id":"1","innerException":null,"message":"Value cannot be null.\r\nParameter name:
resourceType","typeName":"System.ArgumentNullException,
mscorlib","typeKey":"ArgumentNullException","errorCode":0,"eventId":0}
when I run GET https://dev.azure.com/{organization}/{project}/_apis/pipelines/checks/configurations?api-version=7.1-preview.1
Thanks
@azure-envionments
@azure-approvals