v2024/src/PSSailpoint.V2024/Api/V2024TaskManagementApi.ps1
# # Identity Security Cloud V2024 API # Use these APIs to interact with the Identity Security Cloud platform to achieve repeatable, automated processes with greater scalability. We encourage you to join the SailPoint Developer Community forum at https://developer.sailpoint.com/discuss to connect with other developers using our APIs. # Version: v2024 # Generated by OpenAPI Generator: https://openapi-generator.tech # <# .SYNOPSIS Retrieve headers only for pending task list. .DESCRIPTION Retrieve headers for a list of TaskStatus for pending tasks. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Offset Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Limit Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Count If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS None #> function Get-V2024PendingTaskHeaders { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Limit}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${Count}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-V2024PendingTaskHeaders' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/task-status/pending-tasks' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getPendingTaskHeaders." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($Count) { $LocalVarQueryParameters['count'] = $Count } $LocalVarResult = Invoke-V2024ApiClient -Method 'HEAD' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Retrieve a pending task list. .DESCRIPTION Retrieve a list of TaskStatus for pending tasks. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Offset Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Limit Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Count If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS TaskStatus[] #> function Get-V2024PendingTasks { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Limit}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${Count}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-V2024PendingTasks' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/task-status/pending-tasks' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getPendingTasks." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($Count) { $LocalVarQueryParameters['count'] = $Count } $LocalVarResult = Invoke-V2024ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "TaskStatus[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Get task status by ID. .DESCRIPTION Get a TaskStatus for a task by task ID. .PARAMETER Id Task ID. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS TaskStatus #> function Get-V2024TaskStatus { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Switch] $WithHttpInfo ) Process { 'Calling method: Get-V2024TaskStatus' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/task-status/{id}' if (!$Id) { throw "Error! The required parameter `Id` missing when calling getTaskStatus." } $LocalVarUri = $LocalVarUri.replace('{id}', [System.Web.HTTPUtility]::UrlEncode($Id)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getTaskStatus." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental $LocalVarResult = Invoke-V2024ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "TaskStatus" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Retrieve a task status list. .DESCRIPTION Use this endpoint to get a list of **completed** tasks. To get a list of tasks **in-progress**, please use the [get pending tasks](https://developer.sailpoint.com/docs/api/beta/get-pending-tasks) endpoint. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER Limit Max number of results to return. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Offset Offset into the full result set. Usually specified with *limit* to paginate through the results. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Count If *true* it will populate the *X-Total-Count* response header with the number of results that would be returned if *limit* and *offset* were ignored. Since requesting a total count can have a performance impact, it is recommended not to send **count=true** if that value will not be used. See [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters) for more information. .PARAMETER Filters Filter results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#filtering-results) Filtering is supported for the following fields and operators: **id**: *eq, in* **sourceId**: *eq, in* **completionStatus**: *eq, in* **type**: *eq, in* .PARAMETER Sorters Sort results using the standard syntax described in [V3 API Standard Collection Parameters](https://developer.sailpoint.com/idn/api/standard-collection-parameters#sorting-results) Sorting is supported for the following fields: **created** .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS TaskStatus[] #> function Get-V2024TaskStatusList { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Limit}, [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Int32]] ${Offset}, [Parameter(Position = 3, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [System.Nullable[Boolean]] ${Count}, [Parameter(Position = 4, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Filters}, [Parameter(Position = 5, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Sorters}, [Switch] $WithHttpInfo ) Process { 'Calling method: Get-V2024TaskStatusList' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') $LocalVarUri = '/task-status' if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling getTaskStatusList." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if ($Limit) { $LocalVarQueryParameters['limit'] = $Limit } if ($Offset) { $LocalVarQueryParameters['offset'] = $Offset } if ($Count) { $LocalVarQueryParameters['count'] = $Count } if ($Filters) { $LocalVarQueryParameters['filters'] = $Filters } if ($Sorters) { $LocalVarQueryParameters['sorters'] = $Sorters } $LocalVarResult = Invoke-V2024ApiClient -Method 'GET' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "TaskStatus[]" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } <# .SYNOPSIS Update task status by ID .DESCRIPTION Update a current task status by task ID. Use this API to clear a pending task by updating the completionStatus and completed attributes. .PARAMETER Id Task ID. .PARAMETER XSailPointExperimental Use this header to enable this experimental API. .PARAMETER JsonPatchOperation The JSONPatch payload used to update the object. .PARAMETER WithHttpInfo A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response .OUTPUTS TaskStatus #> function Update-V2024TaskStatus { [CmdletBinding()] Param ( [Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] ${Id}, [Parameter(Position = 1, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [String] $XSailPointExperimental = "true", [Parameter(Position = 2, ValueFromPipelineByPropertyName = $true, Mandatory = $false)] [PSCustomObject[]] ${JsonPatchOperation}, [Switch] $WithHttpInfo ) Process { 'Calling method: Update-V2024TaskStatus' | Write-Debug $PSBoundParameters | Out-DebugParameter | Write-Debug $LocalVarAccepts = @() $LocalVarContentTypes = @() $LocalVarQueryParameters = @{} $LocalVarHeaderParameters = @{} $LocalVarFormParameters = @{} $LocalVarPathParameters = @{} $LocalVarCookieParameters = @{} $LocalVarBodyParameter = $null # HTTP header 'Accept' (if needed) $LocalVarAccepts = @('application/json') # HTTP header 'Content-Type' $LocalVarContentTypes = @('application/json-patch+json') $LocalVarUri = '/task-status/{id}' if (!$Id) { throw "Error! The required parameter `Id` missing when calling updateTaskStatus." } $LocalVarUri = $LocalVarUri.replace('{id}', [System.Web.HTTPUtility]::UrlEncode($Id)) if (!$XSailPointExperimental) { throw "Error! The required parameter `XSailPointExperimental` missing when calling updateTaskStatus." } $LocalVarHeaderParameters['X-SailPoint-Experimental'] = $XSailPointExperimental if (!$JsonPatchOperation) { throw "Error! The required parameter `JsonPatchOperation` missing when calling updateTaskStatus." } if ($LocalVarContentTypes.Contains('application/json-patch+json') -or ($JsonPatchOperation -is [array])) { $LocalVarBodyParameter = $JsonPatchOperation | ConvertTo-Json -AsArray -Depth 100 } else { $LocalVarBodyParameter = $JsonPatchOperation | ForEach-Object { # Get array of names of object properties that can be cast to boolean TRUE # PSObject.Properties - https://msdn.microsoft.com/en-us/library/system.management.automation.psobject.properties.aspx $NonEmptyProperties = $_.psobject.Properties | Where-Object {$null -ne $_.Value} | Select-Object -ExpandProperty Name # Convert object to JSON with only non-empty properties $_ | Select-Object -Property $NonEmptyProperties | ConvertTo-Json -Depth 100 } } $LocalVarResult = Invoke-V2024ApiClient -Method 'PATCH' ` -Uri $LocalVarUri ` -Accepts $LocalVarAccepts ` -ContentTypes $LocalVarContentTypes ` -Body $LocalVarBodyParameter ` -HeaderParameters $LocalVarHeaderParameters ` -QueryParameters $LocalVarQueryParameters ` -FormParameters $LocalVarFormParameters ` -CookieParameters $LocalVarCookieParameters ` -ReturnType "TaskStatus" ` -IsBodyNullable $false if ($WithHttpInfo.IsPresent) { return $LocalVarResult } else { return $LocalVarResult["Response"] } } } |