Add user over API, mandatory parameters
Posted: Thu Dec 17, 2020 10:12 am
Hi,
I'm trying to add a user via the API, but it always complains that it's missing mandatory parameters:
But I always get the same error. What are the mandatory parameters for adding a user? Or how I can troubleshoot it in Eve-NG? api.txt is always 0 bytes.
I'm trying to add a user via the API, but it always complains that it's missing mandatory parameters:
I've used a GET on an existing user and based on the returned parameters, plus the Howto documentation, I've tried various combinations with the following:HTTP 400 - Bad Request, Message {"code":400,"status":"fail","message":"Cannot create user, missing mandatory parameters (60043)."}
Code: Select all
user_data = {
'username': 'testuser',
'password': 'notneeded-extauthused',
'email': 'test.user@email.com',
'extauth': 'radius',
'ram': '-1',
'cpu': '-1',
'expiration': '-1',
'datestart': '-1',
'name': 'Test User',
'role': 'admin',
'pod': '-1',
'pexpiration': '-1',
'session': '-1'
}