Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Jet
Contributor II
Contributor II

REST API Import and Export Task

I am reviewing the QEM Dev Guide PDF and I got confused with Import and Export Task. Here are the URLs:

Import Task

https://{Host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{task}?action=import

Export Task

https://{Host}/attunityenterprisemanager/api/v1/servers/{ServerName}/tasks/{TaskName}?action=export&...

So my question is I am not sure where to indicate the destination server. For example, if I want to deploy a Task1 in DEV to PROD, and I want to use Import task. the {ServerName} is the DEV server, right? then the {TaskName} is Task1. So how should I indicate that Task1 will be imported to PROD? or the API will automatically import it to PROD when I run the URL? Also what if I have 3 replicate servers (DEV, STG, PROD)? How will the API know that I want to deploy Task1 from DEV to STG first? I just think the url is missing the target server name. or am I missing something here? Please advise. Thank you!

Labels (1)
1 Solution

Accepted Solutions
JitenderR
Employee
Employee

Look at the example in the user guide for 'import' and also the list of 'request parameters'. the parameter 'Body' will enable you to supply the physical copy of the JSON that you want to import in the target server. You will use the export API to get this physical JSON and save it in a staging location. This is by design and best practice as you wouldn't want to open firewalls between dev and prod, also establish source code control etc. in your environment. 

fvi_0-1593190456835.png

Regards

JR

View solution in original post

2 Replies
JitenderR
Employee
Employee

Look at the example in the user guide for 'import' and also the list of 'request parameters'. the parameter 'Body' will enable you to supply the physical copy of the JSON that you want to import in the target server. You will use the export API to get this physical JSON and save it in a staging location. This is by design and best practice as you wouldn't want to open firewalls between dev and prod, also establish source code control etc. in your environment. 

fvi_0-1593190456835.png

Regards

JR

Huey
Employee
Employee

Hi,
Are you trying to move tasks between environments?