Created
June 5, 2023 10:51
-
-
Save flcdrg/c87cecfc8ceaa19ae19efa53b5fcf3af to your computer and use it in GitHub Desktop.
Azure DevOps REST APIs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Param( | |
[string]$organisation, | |
[string]$project, | |
[int] $releaseId, | |
[string]$token | |
) | |
$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f "",$token))) | |
# https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}?approvalFilters={approvalFilters}&propertyFilters={propertyFilters}&$expand={$expand}&$topGateRecords={$topGateRecords}&api-version=7.0 | |
$uri = "https://vsrm.dev.azure.com/$($organisation)/$($project)/_apis/release/releases/$($releaseId)?propertyFilters=Example&api-version=7.0" | |
$uri | |
$result = Invoke-RestMethod -Uri $uri -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} | |
$result.name |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment