azure-devops-dotnet-samples
azure-devops-dotnet-samples copied to clipboard
Pipelines/Checks/Configurations Example
Hello! I'm working on setting up ServiceConnections with this api. You can now setup approvals/checks on Service Connections. I can see the website using _apis/pipelines/checks/configurations/$id
but I'm struggling to figure out how to do that with this API.
Are there any examples that I'm missing?
Hi @wjdavis5
I was able to get the API request working by issuing a POST against: https://dev.azure.com/{organization}/{project_name}/_apis/pipelines/checks/configurations?api-version=5.2-preview.1
Using Basic authentication, with a Personal Access Token (PAT) as the password.
And the following in the body:
{ "type": { "id": "8C6F20A7-A545-4486-9777-F762FAFE0D4D", "name": "Approval" }, "settings": { "approvers": [ { "displayName": "[Your Name]", "id": "[Your User Id]", "uniqueName": "[Your Email Address]" } ], "executionOrder": 1, "instructions": "", "blockedApprovers": [], "minRequiredApprovers": 0, "requesterCannotBeApprover": false }, "resource": { "type": "environment", "id": "1", "name": "Test" }, "timeout": 43200 }