[Spce-user] add a lot of alias-numbers [SOLVED]

Kevin Masse kmasse at questblue.com
Mon Nov 24 07:43:56 EST 2014


Good day, I have a question to this [Solved] post.
Is this same format allowed in v2.8?   domain/SOAP/Provisioning.wsdl?

Currently we need to read in all the alias numbers that are there into
memory, then add the one we need and then write back all the alias
numbers at once to avoid removing the existing alias numbers in the
list.

Thanks
Kevin













-----Original Message-----
From: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] On Behalf
Of fry
Sent: Tuesday, November 18, 2014 12:26 PM
To: spce-user at lists.sipwise.com
Subject: Re: [Spce-user] add a lot of alias-numbers [SOLVED]

Hi,

PATCH was perfectly okey - as I won't add a new user - but add lots of 
alias-numbers..
bur of the syntax was not perfect, but now i found it.. importet over 
150 alias-numbers i one command.. really nice.. ;-)

curl -i -X PATCH -H 'Connection: close' -H 'Content-Type: 
application/json-patch+json' -H 'Prefer: return=minimal' --insecure 
'https://URL:1443/api/subscribers/SUBSCRIBERNUMBER' --data-binary '[ { 
"op": "add", "path": "/alias_numbers", "value" : [ { "cc" : 41, "ac" : 
44, "sn" : 2111120 }, {"ac" : 44, "cc" : 41, "sn" : 2111122 } , 
....[LOTS MORE]....] } ]' -u USER:PWD

only you have to take care is that you override existing alias_numbers..

thnaks for any advice hope this helps anyone other,
fry



Am 18.11.2014 um 18:05 schrieb Andreas Granig:
> Hi,
>
> On 11/18/2014 04:30 PM, Daniel Grotti wrote:
>> Hi,
>> I would use the PUT, not PATCH
>>
>> Example
>> curl -i -X PUT -H 'Connection: close' -H 'Content-Type:
>> application/json' -H 'Prefer: return=minimal' --cert
>> NGCP-API-client-certificate.pem --cacert ca-cert.pem
>> 'https://example.org:1443/api/subscribers/2' --data-binary '{
>> "customer_id" : 4, "domain_id" : 4, "password" : "test", "username" :
>> "test" }'
> Well, PATCH is perfectly fine to modify only a single field. Please
> check the /var/log/ngcp/api.log for the error. 500 shouldn't be
returned
> in any case as it's only emitted on internal errors, not sure what the
> problem is as I can't reproduce it over here.
>
> Andreas
> _______________________________________________
> Spce-user mailing list
> Spce-user at lists.sipwise.com
> https://lists.sipwise.com/listinfo/spce-user

_______________________________________________
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