Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get-qliktask #148

Closed
boazs opened this issue Dec 25, 2020 · 2 comments
Closed

get-qliktask #148

boazs opened this issue Dec 25, 2020 · 2 comments
Labels

Comments

@boazs
Copy link

boazs commented Dec 25, 2020

first i want to say wonderful work
second
ihave a problem with get-qlik task
i run the cmd let
Get-QlikTask -id 514d1a01-4f3b-4c31-aa55-fedf6f12213f
and i got

Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\Qlik-Cli\1.20.0\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

when i run
Get-QlikReloadTask -id 514d1a01-4f3b-4c31-aa55-fedf6f12213f

i got normal resonse
so i think there is a bug.
i have a reload task that run every hour and i want to automate the check the last execution time and status
thanks a lot

@Nillth
Copy link
Collaborator

Nillth commented Jan 12, 2021

this appears to be a bug in the Qlik-CLI-Windows module.
/qrs/task api does not support the Task ID in the Path (which is what the -ID Parameter on the Get-QlikTask function does)
https://help.qlik.com/en-US/sense-developer/November2020/APIs/RepositoryServiceAPI/index.html?page=627

where as the Get-QlikReloadTask does
https://help.qlik.com/en-US/sense-developer/November2020/APIs/RepositoryServiceAPI/index.html?page=441

you can however use the Filter Parameter to achieve the outcome you are looking to for,

Get-QlikTask -filter "id eq 514d1a01-4f3b-4c31-aa55-fedf6f12213f" -full

The Get-QlikTask function will need to be updated to either remove the -ID Parameter or map it to a "id eq $id" filter.
@ahaydon thoughts?

@Nillth Nillth added the bug label Jan 12, 2021
@boazs
Copy link
Author

boazs commented Jan 12, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants