Open degville opened 7 years ago
For reference to anyone working ( #633 ) on this right now, here is a working settings I had using postman to talk to the maas REST API
Your maas api key looks like
"xxxxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyyyy:zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz",
which are your
Authorisation: Type: Oauth 1.0 Add to: Request Headers Keys Consumer Key: xxxxxxxxxxxxxxxxxx Consumer Secret: [literally a single whitespace character] Access Token: yyyyyyyyyyyyyyyyyy Token Secret: zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Signature Method: PLAINTEXT
using the above I could request 127.0.0.1:5240/MAAS/api/2.0/machines/
There is a bug here, workaround is you have to request json. for some endpoints: 127.0.0.1:5240/MAAS/api/2.0/machines/dpywmk/?format=json
If you're using python you'll want to use libmaas but if some reason you don't, this worked for me: https://gist.github.com/gnuoy/c3775ebdf1b00f38fd36fa8b9014349c
Expand on the current language examples, include curl example.
taken from #633: