The POST method can be performed on a SBC resource to modify the resource with or without an action parameter in the URL.

The following examples demonstrate how to use the POST Method on a resource using cURL:


POST on a Resource without action query parameter /rest/isdnsg/{identifier}

Usage Example:

./curl.exe --cookie PHPSESSID=ima0r3nkaeg8mo0suln67vg4m7 --cacert 192.168.1.183.crt \
-i https://192.168.1.183/rest/isdnsg/10001 --data "Description=Set from cURL&IsdnSgTimerT301=90"

Header Response

 
HTTP/1.1 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 17 May 2011 19:39:35 GMT

XML Response

Sample XML Response
<?xml version="1.0">
<root>
 <status>
  <http_code>200</http_code>
 </status>
 <isdnsg id="10001" href="https://192.168.1.183/rest/isdnsg/10001">
  <ActionsetTableNumber>0</ActionsetTableNumber>
  <ApplyToPortName href="https://192.168.1.183/linecard/1/telcods1port/2">1.2</ApplyToPortName>
  <ConfigIEState>1</ConfigIEState>
  <Description>Set from cURL</Description>
  <IsdnAllowCallingNameDisplayToSwitch>0</IsdnAllowCallingNameDisplayToSwitch>
  <IsdnServiceMessageCapability>1</IsdnServiceMessageCapability>
  <IsdnSgDirection>2</IsdnSgDirection>
  <IsdnSgHuntMethod>0</IsdnSgHuntMethod>
  <IsdnSgOverlapRxMode>0</IsdnSgOverlapRxMode>
  <IsdnSgRingbackPlayPolicy>0</IsdnSgRingbackPlayPolicy>
  <IsdnSgSideOrientation>0</IsdnSgSideOrientation>
  <IsdnSgSwitchVariant>6</IsdnSgSwitchVariant>
  <IsdnSgTimerT301>90</IsdnSgTimerT301>
  <IsdnSgTimerT302>15</IsdnSgTimerT302>
  <IsdnSgTimerT303>4</IsdnSgTimerT303>
  <IsdnSgTimerT305>30</IsdnSgTimerT305>
  <IsdnSgTimerT308>4</IsdnSgTimerT308>
  <IsdnSgTimerT309>6</IsdnSgTimerT309>
  <IsdnSgTimerT310>30</IsdnSgTimerT310>
  <IsdnSgTimerT313>4</IsdnSgTimerT313>
  <IsdnSgTimerT314>4</IsdnSgTimerT314>
  <IsdnSgTimerT316>120</IsdnSgTimerT316>
  <IsdnSgTimerT322>4</IsdnSgTimerT322>
  <IsdnSgTimerT3M1>120</IsdnSgTimerT3M1>
  <IsdnStopFarEndT310UponTryingFromSip>1</IsdnStopFarEndT310UponTryingFromSip>
  <RouteTableNumber href="https://192.168.1.183/routingtable/2">2</RouteTableNumber>
  <ToneTableNumber href="https://192.168.1.183/tonetable/10">10</ToneTableNumber>
 </isdnsg>
</root> 


POST with action query parameter /rest/system?action=setdatetime

Usage Example:

 
./curl.exe --cookie PHPSESSID=ima0r3nkaeg8mo0suln67vg4m7 --cacert 192.168.1.183.crt \
-i https://192.168.1.183/rest/system?action=setdatetime --data "epochTime=1305759192"

Header Response

 
HTTP/1.1 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 17 May 2011 19:39:35 GMT

XML Response

Sample XML Response
 
<?xml version="1.0">
<root>
<status>
<http_code>200</http_code>
</status>

File Upload using POST /rest/system?action=importconfig

Usage Example:

 
./curl.exe --cookie PHPSESSID=ima0r3nkaeg8mo0suln67vg4m7 --cacert 192.168.1.183.crt \
-i https://192.168.1.183/rest/system?action=importconfig -F "Filename=@symphonyconfig.xml"

Header Response

 
HTTP/1.1 200 OK
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Date: Tue, 17 May 2011 19:39:35 GMT

XML Response

Sample XML Response
 
<?xml version="1.0">
<root>
<status>
<http_code>200</http_code>
</status>

File Download using POST /rest/system?action=backup

Usage Example:

 
./curl.exe --cookie PHPSESSID=ima0r3nkaeg8mo0suln67vg4m7 --cacert 192.168.1.183.crt \
-i https://192.168.1.183/rest/system?action=backup -o backup.tar.gz

XML Response

Sample XML Response
 
Not Applicable. 
The file is sent as a MIME type of application/x-tgz. Client will have to write the contents into a local file.