public/api-v1/space/Invoke-ConfluenceDeleteSpace.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
#https://developer.atlassian.com/cloud/confluence/rest/#api-space-delete function Invoke-ConfluenceDeleteSpace { [CmdletBinding()] param ( # The key of the new space [Parameter(Mandatory,Position=0,ValueFromPipeline,ValueFromPipelineByPropertyName)] [Alias("SpaceKey")] [string] $Key, # The AtlassianContext object to use for the request (use New-AtlassianContext) [Parameter()] [object] $RequestContext ) begin { $results = @() } process { $functionPath = "/wiki/rest/api/space/$Key" $verb = "DELETE" $method = New-PACRestMethod $functionPath $verb $results += $method.Invoke($RequestContext) } end { $results } } |