Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
raf77raf
Contributor
Contributor

Start Task through API by POWERSHELL

I tried in two ways to start the task through the API with Powershell, but I'm not succeeding.

1 - Option
Command: 

Invoke-RestMethod -Uri "https://localhost:4242/qrs/task/start?name='Reload task of TEST'&xrfkey=12345678qwertyui" -Method Post -Headers $hdrs  -Certificate $cert
 

Error:

Invoke-RestMethod : The remote server returned an error: (400) Bad Request.

 

2 - Option
Command: 

Invoke-RestMethod -Uri "https://localhost:4242/qrs/task/3606d57e-5713-42f4-88d3-6b1439da2f93/start/synchronous?xrfkey=123456..." -Method Post -Headers $hdrs -Certificate $cert
 

Returns:

value
-----
00000000-0000-0000-0000-000000000000
 
Can someone help me?
Labels (1)
1 Reply
jprdonnelly
Employee
Employee

@raf77raf - Your first example might be failing because the name hasn't been URL encoded. Your second example isn't failing, but it is telling you that it can't start the task because of a limited set of reasons.

Option #2 is working from a "authenticated and successfully issued a reload task request", however some other layer in Qlik Sense is denying the actual execution. This should be visible in that local node's log files.

- @jprdonnelly