We can use python-maas-client for accessing the maas API.

I need to know the way of performing the post request towards maas using the python-maas-client.

Here it is important links:

Link for MAAS API documentation:


Making GET request sample:

how to query maas API with curl

Some one please provide me with a sample post request.

sshKeys = {"key": [keyValue]}
maas_access.post(u"account/prefs/sshkeys/", "new", **sshKeys)

The above code will post the ssh key into the maas using maas-api.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.