User permissions from api

  • Thread starter Thread starter wimbo
  • Start date Start date
W

wimbo

Guest
Hello.

I encountered a problem with Proxmox API.

I Use Python 2.7.

If i use this code:
Code:
import pyproxmox
a = prox_auth(127.0.0.1, 'root@pam', 'password')
obj = pyproxmox(a)
print (obj.getClusterStatus())

I had output:
Code:
{u'data': [{u'name': u'picnic', u'level': u'', u'local': 1, u'nodeid': 0, u'pmxcfs': 0, u'state': 1, u'type': u'node', u'id': u'node/picnic'}]}

But when i use this code:
Code:
import pyproxmox
a = prox_auth('127.0.0.1', 'user@pve', 'password')
obj = pyproxmox(a)
print (obj.getClusterStatus())

I had output:
Code:
{u'data': None}

In web-interface i had user "user" with Administrator permissions.

Why is that?