[Spce-user] Requesting subscriber id via REST API
Walter Klomp
walter at myrepublic.net
Thu Apr 5 22:53:22 EDT 2018
Thank you, works perfectly :-)
> On 6 Apr 2018, at 1:36 AM, Irina Peshinskaya <ipeshinskaya at sipwise.com> wrote:
>
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20180406/af261f4c/attachment-0001.html>
More information about the Spce-user
mailing list