Metaswitch/ellis — pull request #61 by rkd-msw (2014-08-05 17:35:57+00:00)
Title: [Reviewer: Ellie] Allow arbitrary numbers to be created by users with the NGV-API-Key

This change allows you to POST to /accounts//numbers/ to create an arbitrary number, as long as you have the NGV-API-Key to prove you're an admin user. As a bonus, I added a new_private_id parameter - this forces Ellis to create a password for the arbitrary private_id specified. (Previously, if you specified a private_id, Ellis assumed it already existed - otherwise, it would strip off the sip: prefix from the SIP URI it assigned and create that as a new private ID. That's still the behaviour when new_private_id is not specified.)

`wget -O - --http-user="Robert.Day@metaswitch.com" --header="NGV-API-Key: blahblahblah" -v --post-data="" "http://ellis.rkd.cw-ngv.com/accounts/Robert.Day%40metaswitch.com/numbers/sip:12345@rkd.cw-ngv.com?private_id=rkd@rkd.cw-ngv.com&new_private_id=true"`