how we do post in maas-api (1.8.2)
How to do post in maas-api with version 1.8.2
Get is working fine. When i try to get the details from the api, it got success. But in case of user and other post it is notworking.
I tried with SSh key it seems working with the following code
sshKeys = {"key": [keyValue]}
#Creating the sshkey
maas_access.
But in case of user, zones etc seems not working.
from apiclient import maas_client
maas_access = maas_client.
keyAndData = {"name": "defaulttest", "description": "test"}
maas_access.
File "/usr/lib/
url, method="POST", headers=headers, data=body)
File "/usr/lib/
res = urllib2.
File "/usr/lib/
return _opener.open(url, data, timeout)
File "/usr/lib/
response = meth(req, response)
File "/usr/lib/
'http', request, response, code, msg, hdrs)
File "/usr/lib/
return self._call_
File "/usr/lib/
result = func(*args)
File "/usr/lib/
raise HTTPError(
urllib2.HTTPError: HTTP Error 400: BAD REQUEST
I don't know what i am doing wrong. Please help me on this.
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Ubuntu maas Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: