Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I am trying to query for all tasks with this command using Qlik-CLI,
I am able to connect successfully,
The command is as follows:
Get-QlikTask -filter TASK_11
This produces the following error message:
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:66 char:23
+ $result = Invoke-RestMethod @paramInvokeRestMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebE
xception
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Any ideas what I'm doing wrong?
The Repository Service syntax (https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_Repository...) which Qlik-Cli-Windows leverages would be something like this:
Get-QlikTask -Filter "name eq 'Reload Operations Monitor'"
Hi Levi now is ok . thank you !!!
Now I have another challenge for you 😉
with this result (with -full parameter and the task name) I need to save this task id in a variable to be able to automate this task or several tasks . So the question is
How can I get the task id in powershell ? because when you create a new task you don´t know the task ID at the beginning . In order to start the task you need this as a parameter. Thanks
You're not using a proper filter syntax. What is "TASK_11"? A task name?
Hi Levi , "TASK_11" is the task name , should be another parameter ?
Thansk
The Repository Service syntax (https://help.qlik.com/en-US/sense-developer/Subsystems/RepositoryServiceAPI/Content/Sense_Repository...) which Qlik-Cli-Windows leverages would be something like this:
Get-QlikTask -Filter "name eq 'Reload Operations Monitor'"
Hi Levi now is ok . thank you !!!
Now I have another challenge for you 😉
with this result (with -full parameter and the task name) I need to save this task id in a variable to be able to automate this task or several tasks . So the question is
How can I get the task id in powershell ? because when you create a new task you don´t know the task ID at the beginning . In order to start the task you need this as a parameter. Thanks
Well, what information do you have?
In the QMC, you can expose the ID value for the task:
When using Qlik-Cli-Windows, you can use the Get-QlikTask function like above with an adjusted filter.
Hi Levi, I konw this .
The idea is to automate a reload task from the scratch using QLIK-CLI (not QMC), so I need create a script to do this :
I did all step except the (3) because when you create a task (allway using QLIK-CLI) you don´t know the new ID task (all in Powershell, the idea is not use the QMC) so I created a script in order to do this steps
as you can see in the attach I create a .txt file to get the id task number .
But I don´k now how can I get this id task in a variable in order to add in the script to reload the task (3 step)
Thanks
You didn't display where that JSON blob came from, but I'm guessing it's from the cat command on line 19. Something like this should work:
$myTask = (Get-Content /my/file.txt | ConvertFrom-Json).id
(cat is just an alias for Get-Content)
Hi I like to import an qvf app in Powershell using qlik-cli :
Import-QlikApp -file C:\Users\calarcon\Documents\PASAJES\FETR0013855\STG_TRANSACCIONES_N30_COMPLIANCE.qvf
the result is :
Invoke-RestMethod : The remote server returned an error: (400) Bad Request.
At C:\Program Files (x86)\WindowsPowerShell\Modules\Qlik-Cli\functions\core.ps1:66 char:23
+ $result = Invoke-RestMethod @paramInvokeRestMethod @params
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
Can you help me about this , how can I do this ?
Thanks