Qlik Community

Integration, Extension & APIs

Discussion board where members can learn more about Integration, Extensions and API’s for Qlik Sense.

Announcements
Qlik Insider: SaaS capabilities for Data Integration and Analytics, May 25th! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
marcelinoa
Partner
Partner

Qlik Sense Simulating ODAG for Analyzer License

Hi, one of the extensions I'm have been developing has similar functionality to that of the ODAG Service, and we do so by creating an enigma session to the engine and doing what we need.

Now the problem I'm having is that the create (global.openDoc) and publish (doc.publish) don't work when a user with the Analyzer License tries to use the extension, only those with Professional License.

Is there a way to make this happen? Or are the API calls blocked if the User doesn't have permission?

1 Solution

Accepted Solutions
marcelinoa
Partner
Partner
Author

Solution here. It was the same problem/reason.

View solution in original post

4 Replies
marcelinoa
Partner
Partner
Author

I'm aware of the ODAGService but currently don't know how to use it. I'm trying to use the POST /links but don't know how to set the LinkAddPayload or how to send it.

marcelinoa
Partner
Partner
Author

I think I almost have it. But now I'm gettint this error.

rowEstRange.PNG

"Missing required app navigaiton link property rowEstRange", but I have it defined in the payload, maybe it's not well defined?

var copyURI = '/api/odag/v1/links';
var linkAddPayload = {
	name: 'ODAG API Test App ' + nowTime,
	selectionApp: '7b8286c1-5f5c-4759-998f-82185048b2c7',
	templateApp: 'f25cc3bd-8875-45b7-a5da-8228f12663c5',
	rowEstExpr: 'Sum(FLIGHT_COUNT)',
	properties: {
		rowEstRange : {
			context: '*',
			highBound: 100000
		},
		genAppLimit: {
			context: 'User_*',
			limit: 5
		}
	}
}
qlik.callRepository(copyURI, 'POST', linkAddPayload).success(function (reply) {
	console.log("Got reply from copy app:", reply);
})
marcelinoa
Partner
Partner
Author

So I figured the previous problem, I was missing the square brackets before defining the rowEstRange and genAppLimit.

So this:

rowEstRange : {
	context: '*',
	highBound: 100000
},
genAppLimit: {
	context: 'User_*',
	limit: 5
}

Becomes this:

rowEstRange : [{
	context: '*',
	highBound: 10000
}],
genAppLimit: [{
	context: 'User_*',
	limit: 5
}]

And with that I can successufly creat a link and see it was created with the call /api/odag/v1/links

 

Now onto calling the link to generate an app. I use the linkId from the previously made link and I make this call - /api/odag/v1/links/{linkId}/requests - and pass the following object:

var requestCreatePayload = {
	selectionApp: '7b8286c1-5f5c-4759-998f-82185048b2c7'
}

In the definition of the payload, there are two parameters that don't say they are optional nor they say they are required, and I don't know yet how to go about setting them and if they are indeed required. But just sending the selectionApp Id gives a POST 400 Bad Request error with no more information, so I don't know where to go from where to successfully generate the app.

Any help would be appreciated.

marcelinoa
Partner
Partner
Author

Solution here. It was the same problem/reason.