Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
priyankapassi
Contributor III
Contributor III

Replace and publish app using using QLIK CLI

Hi ,

I want to publish the app by replacing existing app using QLIK CLI.

I am using below command to publish the app. Can anyone help me to replace existing app and then publish.

Publish-QlikApp -id 28989daa-22eb-4c2f-820a-c2e4a7730242 -stream "Everyone"

 

Thanks in Advance

Regards,

Priyanka 

 

 

2 Solutions

Accepted Solutions
Levi_Turner
Employee
Employee

This looks like it works:
Connect-Qlik
$new = Get-QlikApp -filter "name eq 'Operations Monitor(1)'"
$old = Get-QlikApp -filter "name eq 'Operations Monitor'"
Invoke-QlikPut -path /qrs/app/$($new.id)/replace?app=$($old.id) -Verbose

View solution in original post

Levi_Turner
Employee
Employee

@timmy : Yes. Both in the UI and via API you can publish and replace an app in a managed space. Example:

$sharedSpaceAppId = 'ec2fde04-a983-4db0-945c-15398964f837'
$managedSpaceAppId = 'de41a419-bc63-4271-a58a-6178e0d9362b'

qlik app publish update $($sharedSpaceAppId) --attributes-name "My App Name" --targetId $($managedSpaceAppId) --checkOriginAppId=false

View solution in original post

9 Replies
Levi_Turner
Employee
Employee

This looks like it works:
Connect-Qlik
$new = Get-QlikApp -filter "name eq 'Operations Monitor(1)'"
$old = Get-QlikApp -filter "name eq 'Operations Monitor'"
Invoke-QlikPut -path /qrs/app/$($new.id)/replace?app=$($old.id) -Verbose
vegard_bakke
Partner - Creator III
Partner - Creator III

Isn't this what Switch-QlikApp is supposed to do?

Switch-QlikApp -Id $New.Id -AppId $Old.Id

Probably followed by (again to avoid duplicate apps):

Remove-QlikApp -Id $New.Id

 

kalaisurya
Partner - Contributor
Partner - Contributor

Hi Turner,

Thanks for your commands, We can able to republish with existing apps using your above command but while trying to achieve the same with import command, we are getting 404 error. Please help us on this.

Thanks in advance.

Publish.png

 

vegard_bakke
Partner - Creator III
Partner - Creator III

Looks like your $new.id is blank.

 

Your URL is ".../qrs/app//replace..."

 

What happens to your variables if you step through your code one line at the time in Powershell ISE?

 

Vegard

srinivasamutha
Contributor
Contributor

same issue for me too. its not replacing the app. 

srinivasamutha
Contributor
Contributor

below is the cmd which i am using 

Import-QlikApp -file "F:\Srinivas\Migration\AppExport\64b5826d-8b37-46c2-9006-69e0eac01d79.qvf" -name "Report QAP" -upload | Publish-QlikApp -stream Test

timmy
Partner - Contributor III
Partner - Contributor III

Does this also exists for Qlik CLI Saas?

Levi_Turner
Employee
Employee

@timmy : Yes. Both in the UI and via API you can publish and replace an app in a managed space. Example:

$sharedSpaceAppId = 'ec2fde04-a983-4db0-945c-15398964f837'
$managedSpaceAppId = 'de41a419-bc63-4271-a58a-6178e0d9362b'

qlik app publish update $($sharedSpaceAppId) --attributes-name "My App Name" --targetId $($managedSpaceAppId) --checkOriginAppId=false
timmy
Partner - Contributor III
Partner - Contributor III

Thanks for the feedback @Levi_Turner!!! Helps alot 🙂