eapowertools-archive / qsaas

Unsupported - A wrapper for the Qlik Sense Enterprise SaaS APIs.
GNU General Public License v3.0
12 stars 0 forks source link

No 'data' key in response #1

Closed egononega closed 3 years ago

egononega commented 3 years ago

For example if you want to do something like q.get("reloads/5fe1dbfc61df020001f5639b") the response will be empty. For now I changed the get method with:

result = r.json()
  if 'data' in result:
    result = r.json()['data']

Now I get a result.

Do with it what you want :)

danielpilla commented 3 years ago

Hello -- thanks for raising this -- I missed this in my testing. Resolved with the following script:

if r.status_code == 200:
    result = r.json()
    if 'data' in result:
        result = result['data']