POST in maas-api

Bug #1498002 reported by Binoy M V on 2015-09-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
maas-test
Undecided
Unassigned

Bug Description

How to add a user using maas api. I am getting error from the maas api while tring to do the post request.

Following is my code for the MAASAPI

from apiclient import maas_client
# using the object can access the maas
maas_access = maas_client.MAASClient(maas_client.MAASOAuth(*APIKEY.split(":")), maas_client.MAASDispatcher(), MAAS_URL)
data = {'username':'test','email':'<email address hidden>','password':'test','is_superuser': "0"}
maas_access.post(u"users/", "new", data)

Please help me on this.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers