Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
rsuresh
Contributor II
Contributor II

Exporting a task from qlik replicate server

I am facing issue while exporting the file using Rest api  it is not giving the exact file what we are exporting manually. please find the command which we are using powershell

$ExportResponse = Invoke-RestMethod -uri "https://qlikmanagerlab.cnppd.lab/attunityenterprisemanager/api/v1/servers/qlikreplicatelab/tasks/DB2..." -Headers $export_headers -Method 'GET' | ConvertTo-JSON | Set-Content "C:\Users\xt28034\Documents\sample1.json"

please find the attachment output of the sample1.json file

kindly help me on this issue

 

 

Labels (1)
  • API

2 Solutions

Accepted Solutions
KellyHobson
Former Employee
Former Employee

Hey @rsuresh 

Thank you for reaching out to the Community.

Are you trying to download the task json file as you would using the "Export Task" button in the Replicate UI?

Here is a community article outlining the steps:

https://community.qlik.com/t5/Knowledge/Replicate-How-to-export-task-with-server-configuration/ta-p/...

Example:

repctl -d "C:\Program Files\Attunity\Replicate\data" exportrepository task=postie_test_PK include_server_settings=TRUE

Output:

C:\Program Files\Attunity\Replicate\bin>repctl -d "C:\Program Files\Attunity\Replicate\data" exportrepository task=postie_test_PK include_server_settings=TRUE
command exportrepository response:
{
"message": "Export succeeded",
"file_path": "C:\\Program Files\\Attunity\\Replicate\\data\\imports\\postie_test_PK.json"
}
[exportrepository command] Succeeded


Please let us know if you have any additional questions.

Best,

Kelly

View solution in original post

Heinvandenheuvel
Specialist III
Specialist III

Why do you have   ConvertTo-JSON  in the pipeline?

Per documentation the response is already a JSON stream.

Try again without.

Hein.

 

View solution in original post

3 Replies
Seanog_Murphy
Creator III
Creator III

Hi @rsuresh 
Please note that I have moved the question to  the Qlik Replicate community as you are more likely to get an answer here.

KellyHobson
Former Employee
Former Employee

Hey @rsuresh 

Thank you for reaching out to the Community.

Are you trying to download the task json file as you would using the "Export Task" button in the Replicate UI?

Here is a community article outlining the steps:

https://community.qlik.com/t5/Knowledge/Replicate-How-to-export-task-with-server-configuration/ta-p/...

Example:

repctl -d "C:\Program Files\Attunity\Replicate\data" exportrepository task=postie_test_PK include_server_settings=TRUE

Output:

C:\Program Files\Attunity\Replicate\bin>repctl -d "C:\Program Files\Attunity\Replicate\data" exportrepository task=postie_test_PK include_server_settings=TRUE
command exportrepository response:
{
"message": "Export succeeded",
"file_path": "C:\\Program Files\\Attunity\\Replicate\\data\\imports\\postie_test_PK.json"
}
[exportrepository command] Succeeded


Please let us know if you have any additional questions.

Best,

Kelly

Heinvandenheuvel
Specialist III
Specialist III

Why do you have   ConvertTo-JSON  in the pipeline?

Per documentation the response is already a JSON stream.

Try again without.

Hein.