Public/Set-GCKnowledgeDocument.ps1
|
<# .SYNOPSIS Updates an existing knowledge document. .DESCRIPTION Partially updates a document in a knowledge base in Genesys Cloud. Uses the PATCH /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId} endpoint. .PARAMETER KnowledgeBaseId The unique identifier of the knowledge base. .PARAMETER DocumentId The unique identifier of the document to update. .PARAMETER Body The updated document properties. .EXAMPLE $docBody = @{ title = 'Updated Title' } Set-GCKnowledgeDocument -KnowledgeBaseId 'kb-id' -DocumentId 'doc-id' -Body $docBody .NOTES Genesys Cloud API: PATCH /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId} #> function Set-GCKnowledgeDocument { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$KnowledgeBaseId, [Parameter(Mandatory = $true)] [string]$DocumentId, [Parameter(Mandatory = $true)] [object]$Body ) $endpoint = "knowledge/knowledgebases/$KnowledgeBaseId/documents/$DocumentId" return Invoke-GCApiRequest -Endpoint $endpoint -Method PATCH -Body $Body } |