[Spce-user] Requesting subscriber id via REST API
Irina Peshinskaya
ipeshinskaya at sipwise.com
Thu Apr 5 13:36:35 EDT 2018
Dear Walter,
You can use alias and/or username filters of the /api/subscribers
interface to get subscribers info, including id:
curl -i -H'Content-type: application/json' --insecure --user
administrator:pwd -X GET
'https://127.0.0.1:1443/api/subscribers/?alias=111'
or
curl -i -H'Content-type: application/json' --insecure --user
administrator:pwd -X GET
'https://127.0.0.1:1443/api/subscribers/?username=%pilot%'
Best regards,
Irina Peshinskaya
On 2018-04-05 18:25, Walter Klomp wrote:
> Hi,
>
> Anybody?? Is there no such option?
>
> Currently in order to make modifications in subscriber preferences in REST API I first have to find the id of the subscriber.
> SELECT id FROM billing.voip_subscribers where username = '$fixednumber’';
>
> I do this by querying the database directly. However I’d like to change this to a REST API call…
>
> I do have the subscriber number (phone number) - how do I find the id with a REST call ?
>
> Is that at all possible? The handbook is cryptic at best and only shows how to get the id on creation. This doesn’t help me when migrating from SOAP interface…
>
> Thank you for any hints/ideas (php example?).
>
> Warmest Regards
> Walter.
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user
More information about the Spce-user
mailing list