<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Qlik Sense QRS API: How to avoid Error 429 error while repetitive activity need to be executed trough QRS API in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-How-to-avoid-Error-429-error-while-repetitive/ta-p/2046932</link>
    <description>&lt;P data-unlink="true"&gt;A DoS (Denial of Service) protection may trigger &lt;FONT face="courier new,courier"&gt;Error 429&lt;/FONT&gt; while generating repetitive calls to the QRS API.&lt;/P&gt;
&lt;P data-unlink="true"&gt;See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-Error-429-in-September-2020-and-later-when/ta-p/1798659" target="_self"&gt;Qlik Sense QRS API: Error 429 in September 2020 and later when uploading a file&lt;/A&gt;&amp;nbsp;for details.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The following PowerShell demonstrates how to use the API &lt;FONT face="courier new,courier"&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/APIs/RepositoryServiceAPI/index.html?page=1339" target="_blank" rel="noopener"&gt;/qrs/selection&lt;/A&gt;&lt;/FONT&gt;&amp;nbsp;to run an action (such as &lt;FONT face="courier new,courier"&gt;delete&lt;/FONT&gt;) on multiple items of a Qlik Management Console resource (example: App) while preventing the &lt;FONT face="courier new,courier"&gt;HTTP 429&lt;/FONT&gt; error triggered by sending too many requests.&lt;/P&gt;
&lt;P&gt;The same approach prevents the engine stall if the DoS (Denial of Service) protection is disabled as shown on the article&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-Error-429-in-September-2020-and-later-when/ta-p/1798659" target="_blank" rel="noopener"&gt;Qlik Sense QRS API: Error 429 in September 2020 and later when uploading a file&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here is a PowerShell sample that provides a command line interface for showing how to automatically delete all the&amp;nbsp;Apps of a Stream in a safe way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$ServerName =  "apcqscn01.apc.pri"
$StreamName =  "TestDeleteApp"
$AppsToDelete = Get-QlikApp -filter "stream.id eq $($Stream.id)"
$NAppsToDelete = $AppsToDelete.count
$Count = 1

Write-Host "Deleting $($NAppsToDelete) Apps from Stream $StreamNames "

$Selections = @()
foreach($AppToDelete in $AppsToDelete)
{    
	#$AppToDelete = $App.id   
	$Selections += [pscustomobject] @{
        type  = 'App'        
		objectID = $AppToDelete.id    
	}    
	#Write-Host "Deleted App '$($AppToDelete.name)' - $Count of App $NAppsToDelete "    
	$Count +=1
}

$SelectionsRequest = @{    
	items = $Selections
}

$Body = ConvertTo-Json $SelectionsRequest  -depth 10 -Compress
$Url = $("https://" + $ServerName + "/qrs/Selection")

$SelectionAnswer = Invoke-QlikPost -path /qrs/Selection -body $Body #-Verbose

$Path = $("/qrs/selection/" + $SelectionAnswer.id +"/app")

Measure-Command {    $DeleteRresult = Invoke-QlikDelete -path $Path #-Verbose
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script has been successfully tested to delete 300 App in a call on &lt;EM&gt;a small test environment&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A id="hoverCardLink" class="lia-link-navigation lia-product-hover-card-link lia-product-mention lia-tooltip-trigger" href="https://community.qlik.com/t5/c-cyjdu72974/Qlik+Sense+Enterprise+on+Windows/pd-p/qlikSenseEnterpriseWindows" target="_blank" rel="noopener" aria-describedby="hoverCardLink_0-tooltip-element" aria-controls="hoverCardLink_0-tooltip-element"&gt;#Qlik Sense Enterprise on Windows&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;September 2020 and later releases&lt;/P&gt;</description>
    <pubDate>Fri, 10 Mar 2023 11:49:07 GMT</pubDate>
    <dc:creator>Caterina_Fruci</dc:creator>
    <dc:date>2023-03-10T11:49:07Z</dc:date>
    <item>
      <title>Qlik Sense QRS API: How to avoid Error 429 error while repetitive activity need to be executed trough QRS API</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-How-to-avoid-Error-429-error-while-repetitive/ta-p/2046932</link>
      <description>&lt;P data-unlink="true"&gt;A DoS (Denial of Service) protection may trigger &lt;FONT face="courier new,courier"&gt;Error 429&lt;/FONT&gt; while generating repetitive calls to the QRS API.&lt;/P&gt;
&lt;P data-unlink="true"&gt;See&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-Error-429-in-September-2020-and-later-when/ta-p/1798659" target="_self"&gt;Qlik Sense QRS API: Error 429 in September 2020 and later when uploading a file&lt;/A&gt;&amp;nbsp;for details.&lt;/P&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H3&gt;
&lt;P&gt;The following PowerShell demonstrates how to use the API &lt;FONT face="courier new,courier"&gt;&lt;A href="https://help.qlik.com/en-US/sense-developer/APIs/RepositoryServiceAPI/index.html?page=1339" target="_blank" rel="noopener"&gt;/qrs/selection&lt;/A&gt;&lt;/FONT&gt;&amp;nbsp;to run an action (such as &lt;FONT face="courier new,courier"&gt;delete&lt;/FONT&gt;) on multiple items of a Qlik Management Console resource (example: App) while preventing the &lt;FONT face="courier new,courier"&gt;HTTP 429&lt;/FONT&gt; error triggered by sending too many requests.&lt;/P&gt;
&lt;P&gt;The same approach prevents the engine stall if the DoS (Denial of Service) protection is disabled as shown on the article&amp;nbsp;&lt;A href="https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-Error-429-in-September-2020-and-later-when/ta-p/1798659" target="_blank" rel="noopener"&gt;Qlik Sense QRS API: Error 429 in September 2020 and later when uploading a file&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Here is a PowerShell sample that provides a command line interface for showing how to automatically delete all the&amp;nbsp;Apps of a Stream in a safe way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;$ServerName =  "apcqscn01.apc.pri"
$StreamName =  "TestDeleteApp"
$AppsToDelete = Get-QlikApp -filter "stream.id eq $($Stream.id)"
$NAppsToDelete = $AppsToDelete.count
$Count = 1

Write-Host "Deleting $($NAppsToDelete) Apps from Stream $StreamNames "

$Selections = @()
foreach($AppToDelete in $AppsToDelete)
{    
	#$AppToDelete = $App.id   
	$Selections += [pscustomobject] @{
        type  = 'App'        
		objectID = $AppToDelete.id    
	}    
	#Write-Host "Deleted App '$($AppToDelete.name)' - $Count of App $NAppsToDelete "    
	$Count +=1
}

$SelectionsRequest = @{    
	items = $Selections
}

$Body = ConvertTo-Json $SelectionsRequest  -depth 10 -Compress
$Url = $("https://" + $ServerName + "/qrs/Selection")

$SelectionAnswer = Invoke-QlikPost -path /qrs/Selection -body $Body #-Verbose

$Path = $("/qrs/selection/" + $SelectionAnswer.id +"/app")

Measure-Command {    $DeleteRresult = Invoke-QlikDelete -path $Path #-Verbose
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script has been successfully tested to delete 300 App in a call on &lt;EM&gt;a small test environment&lt;/EM&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H4&gt;&lt;FONT color="#339966"&gt;&lt;STRONG&gt;Environment&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/H4&gt;
&lt;P class="lia-indent-padding-left-30px"&gt;&lt;A id="hoverCardLink" class="lia-link-navigation lia-product-hover-card-link lia-product-mention lia-tooltip-trigger" href="https://community.qlik.com/t5/c-cyjdu72974/Qlik+Sense+Enterprise+on+Windows/pd-p/qlikSenseEnterpriseWindows" target="_blank" rel="noopener" aria-describedby="hoverCardLink_0-tooltip-element" aria-controls="hoverCardLink_0-tooltip-element"&gt;#Qlik Sense Enterprise on Windows&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;September 2020 and later releases&lt;/P&gt;</description>
      <pubDate>Fri, 10 Mar 2023 11:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/Qlik-Sense-QRS-API-How-to-avoid-Error-429-error-while-repetitive/ta-p/2046932</guid>
      <dc:creator>Caterina_Fruci</dc:creator>
      <dc:date>2023-03-10T11:49:07Z</dc:date>
    </item>
  </channel>
</rss>

