Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
May 10, 2022 3:01:03 PM
Jamie_Gregory
Mar 6, 2021 9:05:13 AM
The article upload a file to a content library demonstrates how to add a file to content library.
As opposite, the code-extract below provides a way to remove a file from a content library using PowerShell (check Qlik Community for alternative api).
Example: using "deletecontent" to remove image "flagB.png" from "Default" in content library.
# use deletecontent o remove image $img = "flagB.png" $hdrs = @{} $hdrs.Add("X-Qlik-xrfkey","12345678qwertyui") $url = "https://qlikserver1.domain.local/qrs/contentlibrary/Default/deletecontent?externalpath=$($img)&xrfkey=12345678qwertyui" Invoke-RestMethod -WebSession $session -UseDefaultCredentials -Uri $url -Method Delete -Headers $hdrs