Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I am searching for some automated solution how to backup created QAAs, but facing issues like...
Any ideas here? Anyone was facing the same challenge?
Hi @rusnakpe
I could be mistaken but there are two API endpoints that are provided for the automations route.
1. Get the specific automation definitions endpoint
Automations REST | Qlik Developer Portal
2. Create an automation endpoint
Automations REST | Qlik Developer Portal
Those two in theory should help you backup your QAA automations.
This is the request body schema you need in order to create an automation
Automations REST | Qlik Developer Portal
And i think the endpoint in point one gets you that.
Best Regards
Hi @rusnakpe
I could be mistaken but there are two API endpoints that are provided for the automations route.
1. Get the specific automation definitions endpoint
Automations REST | Qlik Developer Portal
2. Create an automation endpoint
Automations REST | Qlik Developer Portal
Those two in theory should help you backup your QAA automations.
This is the request body schema you need in order to create an automation
Automations REST | Qlik Developer Portal
And i think the endpoint in point one gets you that.
Best Regards
Hi @Shai_E ,
finally I got it. I had some issues with Postman and body specification, but now it seems that I am able to "restore" (create) automation after it is backed up.
Any idea for second bullet? I can imagine to change the ownership first, make a backup and change it back. But it might cause lot of troubles as we do not have business off hours specified.
Thanks
Hi @rusnakpe
Good question on the second point, this needs checking.
Hi @rusnakpe
As far as i can see, you will run into trouble with automations not owned by you, if you try to get their definitions you will run into an insufficient permissions error.
Its either changing owners, and then the automation gets disabled and needs enablement..
And who knows what other issues you might come across changing the owners.
Or maybe there is a possibility of doing something if each user in the tenant has an API key, but its complicated.
Best Regards
If you are doing this via external script, could you leverage the new OAuth M2M impersonation capabilities to retrieve automations owned by other users.
E.g. retrieve a token for each user, which then permits you to access their resources.
Hi @DaveChannon
Had a similar idea i would say using the API token API.
Best Regards
Hi @DaveChannon ,
that is good idea. I found this article Guiding principles for OAuth impersonation | Qlik Developer Portal.
However I use qlik cli command for some backup solution. As it was mentioned before, there is an issue to get content of QAA not owned by specified user. But where the user is specified during OAuth creation? There is only scope which gives you permissions to specified sources (read and manage automations does not mean that you can see their definition, which is what I want to backup). Context is created under user privileged to create OAuth which is probably that specified user as I can get content of his QAAs.
Idea was to use qlik cli --login option to login given user and be able to get content of his QAAs. But anytime I want to use my login credentials, I will get this error even I am pretty sure that my password is correct.
PS C:\Users\qsserver1> qlik context login
Using context 'QCBCK', with URL 'https://tenantID.us.qlikcloud.com'
Enter Username (domain\user): DOMAIN\username
Enter Password: Error: Not able to get the 'X-Qlik-Session' cookie, please check your password.
I meant it is somehow connected to Allow M2M user impersonation option so I enabled it for my configured OAuth, but still the same.
Btw: Once I create OAuth with specified scope and then decide to change it, it is not reflected or I do not know how to do that. Tried qlik context update command, restart console or recreate context...nothing worked. Needed to create new OAuth.
Thanks for your inputs!
Good questions @rusnakpe. I'll need to check with the team on where we are with impersonation in qlik-cli, as it might need some updates to support it. We are planning on adding it to automations (Platform Operations connector) this month to the RAW API blocks.
Let me check and get back to you.
@rusnakpe no ETA yet on support in Qlik-CLI, we'll discuss further next week.
On the automations side, we expect to release the blocks next week.