[Account Provisioning automation in kazoo][API to create account]

174 views
Skip to first unread message

Bilal Abbasi

unread,
May 26, 2016, 8:29:33 AM5/26/16
to 2600hz-users
Hi Users,

Actually i want to create an account using API in kazoo like we do with following command
/opt/kazoo/utils/sup/sup crossbar_maintenance create_account accountname realm username password

My work around:
1)I see on PUT command in following account API

2)I try creating a account using following URL
But unable to create that account, plus one more thing no password is specified for sub account actually i want to login as we do for master account.

3)Manual Process to create an account is given here
But i want that to automate using a API, should i need to code the manual process?

Ideally i want a simple API by which i can create an account as described by the SUP command.

Regards
Abbasi

James Aimonetti

unread,
May 26, 2016, 12:24:50 PM5/26/16
to 2600hz...@googlegroups.com
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


The SUP command wraps creating an account and a first user into one
command. Via API, you'll want to issue the PUT to create an account and,
using the new account id, a PUT to create the first user.
- --
James Aimonetti

Lead Systems Architect
"If Dialyzer don't care, I don't care"
2600HzPDX | http://2600hz.com
sip:ja...@2600hz.com
tel:415.886.7905
irc:mc_ @ freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJXRyNQAAoJENTKa+JPXCVgjjQH/2okSQALnCCRaYLbEPwWRIhh
goqZpsvl019a2RwgqWcFjmfNgMmCbeCxcJ4Mla3AhlJXnVAIUzFoT42dFwQrp3DO
yqhEZ+e66OC/NfOTbqL+p4qFOTrC1v4ciBzyXsrAB06Jxo5BsmT1lbniB1n2Djp0
Zpr8MvZ9fUhmPyRJa/ZKdj+EhG+lLs1grI4sIQzyKRBhcnF+blbpmJn0foQBXnmt
8FKGeRI1kkZ6Sp56D0pxPRqSmdV3HajL8LOECsx9lCwmwheNXpIcRkoco369yp/X
PrBhNjvXqGg0XL4IcMoSoYXGgGlcxE6aGOJK++tPuFXsVexEv6pWdHN3jxevxdg=
=Cqef
-----END PGP SIGNATURE-----

Bilal Abbasi

unread,
May 27, 2016, 2:43:15 AM5/27/16
to 2600hz-users
Hi Aimonetti,
Thanks for the answers, actually i am unable to create an account using the api, you can see the attachment for more info,

Request:
curl -X PUT http://127.0.0.1:8000/v1/accounts/8c8ea2155478c7044a0b759612935671 -H "X-Auth-Token: 621e754d54de934b49c527445f52007a" -d '{"data":{"name":"test", "realm": "abc.test.com"} }' | python -mjson.tool
Responce:
{
    "auth_token": "621e754d54de934b49c527445f52007a",
    "data": {},
    "request_id": "f57fbf8323e3d96b5cd195d0e02c6bd7",
    "revision": "undefined",
    "status": "success"
}

Please let me know what i am missing in the request(just wondering why its not giving me error in case  of missing arguments).
Plus where i can specify the username and password for this account for login in UI.

Regards
Abbasi
Capture.JPG
Reply all
Reply to author
Forward
0 new messages