Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I'm working with Qlik Sense SaaS using an OAuth2 connection to one of my tenants with Python3 in Ubuntu.
The handshake works fine and I'm able to hit the rest connector and get information about my managed spaces.
#Sending params to the API request
payload={'type':'managed'}
response = client.rest(path="/spaces", method="get",params=payload).json()
print(json.dumps(response, indent=4, separators=(". ", " = ")))
I've now tried creating a space. My code is as follows and fails with a bad request error:
payload={"name":"string","type":"shared","description":"string"}
response = client.rest(path="/spaces", method="post", params=payload)
print(response)
I'm hopeful it's a simple fix. The scope I'm using is admin_classic
Any help would be appreciated!
Managed to resolve this and it was frustrating simple. Had to use data rather than params:
payload={'name':'The API Made this 2','type':'shared','description':'Long Description here'}
response = client.rest(path="/spaces", method="post", data=payload).json()
print(json.dumps(response, indent=4, separators=(". ", " = ")))
Managed to resolve this and it was frustrating simple. Had to use data rather than params:
payload={'name':'The API Made this 2','type':'shared','description':'Long Description here'}
response = client.rest(path="/spaces", method="post", data=payload).json()
print(json.dumps(response, indent=4, separators=(". ", " = ")))