Public/Remove-GCKnowledgeDocument.ps1
|
<# .SYNOPSIS Deletes a knowledge document. .DESCRIPTION Removes a document from a knowledge base in Genesys Cloud. Uses the DELETE /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 delete. .EXAMPLE Remove-GCKnowledgeDocument -KnowledgeBaseId 'kb-id' -DocumentId 'doc-id' .NOTES Genesys Cloud API: DELETE /api/v2/knowledge/knowledgebases/{knowledgeBaseId}/documents/{documentId} #> function Remove-GCKnowledgeDocument { [CmdletBinding()] param( [Parameter(Mandatory = $true)] [string]$KnowledgeBaseId, [Parameter(Mandatory = $true)] [string]$DocumentId ) $endpoint = "knowledge/knowledgebases/$KnowledgeBaseId/documents/$DocumentId" return Invoke-GCApiRequest -Endpoint $endpoint -Method DELETE } |