User permissions from api

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?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!