Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys,
I am trying to upload a Qlik Sense app into the QMC with a python script using the REST API.
I am using the following script:
import requests
I am struggling all the day with this issue I have no idea what I am doing wrong in Python. Has anybody an idea what could be the problem with the script?
BR,
Rumen
https://github.com/clintcarr/qrspy/blob/d6950b4d746cbe99b88edbd830bfb9e923544f2d/qrspy.py#L794
def import_app(self, name, filename):
"""
Imports an application
:param name: Name of application to import
:param filename: Path and file of qvf
:returns: HTTP Status Code
"""
path = 'qrs/app/upload?name={0}'.format(name)
headers["Content-Type"] = "application/vnd.qlik.sense.app"
headers["Connection"] = "Keep-Alive"
with open(filename, 'rb') as app:
return self.post(path, app)
https://github.com/clintcarr/qrspy/blob/d6950b4d746cbe99b88edbd830bfb9e923544f2d/qrspy.py#L794
def import_app(self, name, filename):
"""
Imports an application
:param name: Name of application to import
:param filename: Path and file of qvf
:returns: HTTP Status Code
"""
path = 'qrs/app/upload?name={0}'.format(name)
headers["Content-Type"] = "application/vnd.qlik.sense.app"
headers["Connection"] = "Keep-Alive"
with open(filename, 'rb') as app:
return self.post(path, app)
It works fine! Thank you @Marc