Public/Cloud/Get-BitbucketCloudEnvironments.ps1
Function Get-BitbucketCloudEnvironments { param([Parameter(Mandatory=$false)] $Session = (Get-BitbucketSession), [Parameter(Mandatory=$true)] [String] $Workspace, [Parameter(Mandatory=$true)] [String] $Repository) return (Invoke-RestMethod ` -Method GET ` -Uri "$($Session.Server)/$($Session.Version)/repositories/$Workspace/$Repository/environments/" ` -Headers @{ "Content-Type"= "application/json" Authorization = $Session.Authorization }).values } |