Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
danelooman
Creator
Creator

Enigma - exportApp throwing "Invalid Parameters"

Below is some simple code that is giving me problems. I have two problems. The first is that I can't even get it to run without the Invalid Parameters problem. The second is that I am not quite sure where a good place to store these qvf files is. I see in the JSON request they store them in a folder like /tempcontent/someHashID/filename.qvf . The code below executes and does give me the objectIDs so I know that enigma is opening the app without data, getting me the ids, but then it is failing. 

 const appId = "b012bf2f-797a-418a-9067-6f789dc487af"; //--Dummy Data App

const schema = await (await fetch('https://unpkg.com/enigma.js/schemas/3.2.json')).json();
	
const url = `wss://${config.host + (config.port ? ":" + config.port : "") + config.prefix}app/${appId}`;
	
const session = window.enigma.create({ schema, url }); //---Session API entry

const global = await session.open(); //---Global API entry---
	
const doc = await global.openDoc({
	  "qDocName": appId,
	  "qNoData": true
	}); //----Entry into Doc API with no Data---
	
const allObjects = await doc.getAllInfos({});
		[
		  {
			"qId": "value",
			"qType": "value"
		  }
		]
		
let ids = [] //---Holder for all ids of all objects in App
allObjects.forEach(obj => {
		ids.push(obj.qId)
	})
		
const result = await global.exportApp({
	  "qTargetPath": "/",
	  "qSrcAppId": appId,
	  "qIds": ids,
	  "qNoData": true
	});
	
console.log(result)
Labels (1)
  • API

1 Solution

Accepted Solutions
Aiham_Azmeh
Employee
Employee

Hi @danelooman ,

This is strange, it should have worked, please report the issue.

Regarding export app, the easier way will be to use the QRS API docs: https://help.qlik.com/en-US/sense-developer/November2022/APIs/RepositoryServiceAPI/index.html?page=9...

 

View solution in original post

1 Reply
Aiham_Azmeh
Employee
Employee

Hi @danelooman ,

This is strange, it should have worked, please report the issue.

Regarding export app, the easier way will be to use the QRS API docs: https://help.qlik.com/en-US/sense-developer/November2022/APIs/RepositoryServiceAPI/index.html?page=9...