Pax8API/Public/Webhooks/Set-Pax8Configuration.ps1
|
<#
.SYNOPSIS Update webhook configuration .DESCRIPTION Update a webhook's configuration. This will replace the configuration details OpenAPI: POST /webhooks/{id}/configuration Scope: Webhooks. Audience: https://api.pax8.com. .PARAMETER Id path parameter 'id'. .PARAMETER DisplayName Display name for the webhook .PARAMETER Url URL where webhook events will be sent .PARAMETER Authorization Authorization header value for webhooks .PARAMETER ContactEmail Email address to notify when webhook delivery errors occur .PARAMETER ErrorThreshold Number of times a webhook will be retried and consecutive errors will result in an email notification .PARAMETER Body Raw request body. This can be a hashtable, PSCustomObject, or pre-built JSON string. .EXAMPLE Set-Pax8Configuration -Id '00000000-0000-0000-0000-000000000000' .LINK https://devx.pax8.com/openapi/webhooks-api.json #> function Set-Pax8Configuration { [CmdletBinding()] param ( [Parameter(Mandatory = $true)] [guid]$Id, [string]$DisplayName, [string]$Url, [string]$Authorization, [string]$ContactEmail, [int]$ErrorThreshold, [Parameter(ValueFromPipeline = $true)] [object]$Body, [switch]$Raw ) process { $boundParameters = @{} foreach ($entry in $PSBoundParameters.GetEnumerator()) { $boundParameters[$entry.Key] = $entry.Value } Invoke-Pax8ApiOperation -CommandName $MyInvocation.MyCommand.Name -Parameters $boundParameters } } |