我正在使用 Azure DevOps rest api 在 Releases 中创建文件夹。不确定,如何在同一路径中创建多个文件夹、子文件夹?
代码 :
'
Param(
[string]$organisation = "org",
[string]$project = "testdatafactory",
[string]$keepForever = "true",
[string]$user = "id",
[string]$token = "token",
[string]$path= "\\")
$headers = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($token)")) }
$uri = "https://vsrm.dev.azure.com/$organisation/$project/_apis/release/folders/$path ?api-version=6.0-preview"
Write-Host "Uri :" $uri
$params =
@"
{
"createdBy": "id",
"createdOn": "",
"description": "test",
"lastChangedBy": "",
"lastChangedDate": "",
"path": "test1"
}
"@
$result = Invoke-RestMethod -Uri $uri -Method POST -Body $params -Headers $headers -ContentType "application/json" -Verbose -Debug
'


