Api/WorkspaceApi.ps1
# # Cloud Governance Api # Contact: support@avepoint.com # <# .SYNOPSIS get group/teams metadata .DESCRIPTION No description available. .PARAMETER Id No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS RequestMetadata[] #> function Get-GroupMetadata { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Id}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-GroupMetadata' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/workspace/groups/{id}/metadata' if (!$Id) { throw "Error! The required parameter `Id` missing when calling getGroupMetadata." } $LocalVarUri = $LocalVarUri.replace('{id}', $Id) if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "RequestMetadata[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get O365 group/teams information .DESCRIPTION No description available. .PARAMETER Id No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS ApiMyGroup #> function Get-MyGroupInformation { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Id}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-MyGroupInformation' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/workspace/groups/{id}' if (!$Id) { throw "Error! The required parameter `Id` missing when calling getMyGroupInformation." } $LocalVarUri = $LocalVarUri.replace('{id}', $Id) if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "ApiMyGroup" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get site information .DESCRIPTION No description available. .PARAMETER Id No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS MySite #> function Get-MySiteInformation { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject] ${Id}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-MySiteInformation' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/workspace/sites/{id}' if (!$Id) { throw "Error! The required parameter `Id` missing when calling getMySiteInformation." } $LocalVarUri = $LocalVarUri.replace('{id}', $Id) if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "MySite" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get site metadata .DESCRIPTION No description available. .PARAMETER Url No description available. .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS CustomMetadata[] #> function Get-SiteMetadata { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Url}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-SiteMetadata' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/workspace/sites/metadata' if (!$Url) { throw "Error! The required parameter `Url` missing when calling getSiteMetadata." } $LocalVarQueryParameters['url'] = $Url if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "CustomMetadata[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS get my workspace items .DESCRIPTION No description available. .PARAMETER Filter Use **eq**(equal) or **ne**(not equal) to filter the results (e.g. field1 eq 'value1' and field2 ne 'value2'), supported fields :<br/> id, name, type, siteUrl, groupEmail, primaryContact, phase, isCurrentRenewer, createdTime, status, autoImportProfileId, pendingAction, secondaryContact, policy, policyId, description, primaryAdmin, additionalAdmin, geoLocation, storageLimit, storageUsage, classification, privacy, sensitivity .PARAMETER Orderby Order by one field, supported fields:<br/> id, name, type, siteUrl, groupEmail, primaryContact, phase, isCurrentRenewer, createdTime, status, autoImportProfileId, pendingAction, secondaryContact, policy, policyId, description, primaryAdmin, additionalAdmin, geoLocation, storageLimit, storageUsage, classification, privacy, sensitivity .PARAMETER Search Search for name .PARAMETER Top Define the number of records you want to return, max value is 200, default value is 200 .PARAMETER Skip Define the number of records you want to skip, default value is 0 .PARAMETER Nexttoken Use the next token to get the next paging result .PARAMETER ReturnType Select the return type (optional): text/plain, application/json .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS WorkspaceListPageResult #> function Get-WorkspaceItems { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filter}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Orderby}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Search}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Top}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Skip}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Nexttoken}, [String] [ValidateSet("text/plain", "application/json")] $ReturnType, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-WorkspaceItems' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null $Configuration = Get-Configuration # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('text/plain', 'application/json') if ($ReturnType) { # use the return type (MIME) provided by the user $LocalVarAccepts = @($ReturnType) } $LocalVarUri = '/workspace/my' $LocalVarQueryParameters['filter'] = $Filter $LocalVarQueryParameters['orderby'] = $Orderby $LocalVarQueryParameters['search'] = $Search $LocalVarQueryParameters['top'] = $Top $LocalVarQueryParameters['skip'] = $Skip $LocalVarQueryParameters['nexttoken'] = $Nexttoken if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["clientSecret"]) { $LocalVarHeaderParameters['clientSecret'] = $Configuration["ApiKey"]["clientSecret"] Write-Verbose ("Using API key 'clientSecret' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } if ($Configuration["ApiKey"] -and $Configuration["ApiKey"]["userPrincipalName"]) { $LocalVarHeaderParameters['userPrincipalName'] = $Configuration["ApiKey"]["userPrincipalName"] Write-Verbose ("Using API key 'userPrincipalName' in the header for authentication in {0}" -f $MyInvocation.MyCommand) } $LocalVarResult = Invoke-ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "WorkspaceListPageResult" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |