I am using Azure DevOps rest api , to create folder in Releases. Not sure, how can I create multiple folders, subfolders in same path?
code :
'
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
'


