[Spce-user] API REST PUT subscriberregistration

Javier Valencia jv at voiper.es
Wed Sep 20 05:07:22 EDT 2017


Hi there!

I own a SIPProvider-CE mr3.8.10, and I'm develop a API wrapper to our 
customer's control panel.

The problem it's when I do a PUT over /api/subscriberregistration API 
endpoing, the ID of the object (subscriberregistration) it's incrementer 
by one and I have no news about this on HTTP response.

HTTP Response:

# curl -i -X PUT -H 'Connection: close' -H 'Content-Type: 
application/json' -H 'Prefer: return=representation' --cert 
NGCP-API-client-certificate-1505719693.pem -k 
'https://192.168.1.+200:1443/api/subscriberregistrations/6' --data 
'{"contact":"sip:s at foobar.com:5060","nat":false,"expires" : 
"1970-01-01T01:00:00+00:00","q":1,"subscriber_id":5}'

HTTP/1.1 200 OK
Server: nginx
Date: Wed, 20 Sep 2017 07:40:34 GMT
Content-Type: application/hal+json; 
profile="http://purl.org/sipwise/ngcp-api/"
Content-Length: 686
Connection: close
Link: </api/subscriberregistrations/>; rel=collection
Link: <http://purl.org/sipwise/ngcp-api/>; rel=profile
Link: </api/subscriberregistrations/6>; rel=self
Link: </api/subscribers/5>; 
rel="http://purl.org/sipwise/ngcp-api/#rel-subscribers"
Preference-Applied: return=representation
Set-Cookie: ngcp_panel_session=7fdc166a8ddb27936397f4387597f70347ea010a; 
path=/; expires=Wed, 20-Sep-2017 08:40:33 GMT; HttpOnly
Strict-Transport-Security: max-age=15768000

{
    "_links" : {
       "collection" : {
          "href" : "/api/subscriberregistrations/"
       },
       "curies" : {
          "href" : "http://purl.org/sipwise/ngcp-api/#rel-{rel}",
          "name" : "ngcp",
          "templated" : true
       },
       "ngcp:subscribers" : {
          "href" : "/api/subscribers/5"
       },
       "profile" : {
          "href" : "http://purl.org/sipwise/ngcp-api/"
       },
       "self" : {
          "href" : "/api/subscriberregistrations/6"
       }
    },
    "contact" : "sip:s at 192.168.1.212:5060",
    "expires" : "1970-01-01T01:00:00+00:00",
    "id" : 6,
    "nat" : false,
    "q" : 1,
    "subscriber_id" : 5,
    "user_agent" : "SIP Router MI Server"
}

A screenshot from SIPProvider CE:

This it's not a REST behaviour for PUT request.


-- 
Logo <http://www.voiper.es/>

	
Javier Valencia | CTO
Centro de Negocios Martín Buendía
Camino de las Cañadas, nº 1C, Portal 1, 2ºG
29649 Mijas (Málaga)

# 	951562080 (T) <tel:951562080> | 687486759 (M) <tel:687486759>
# 	www.voiper.es <http://www.voiper.es/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170920/176727e6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Captura de pantalla de 2017-09-20 11-01-28.png
Type: image/png
Size: 20123 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170920/176727e6/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abjkeihchjhbhikh.png
Type: image/png
Size: 7800 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170920/176727e6/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pidaikbloiljanml.png
Type: image/png
Size: 334 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170920/176727e6/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beagolmdljanclad.png
Type: image/png
Size: 453 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20170920/176727e6/attachment-0003.png>


More information about the Spce-user mailing list