The following are Examples of POST, DELETE, PUT, GET, PATCH, and Operations commands.

POST 

curl -i -X POST -k -u username:userpassword -s https://10.54.153.148/restconf/data/ -H "Content-type:application/yang-data+xml" --data '<addressContext><name>ADDR_CONT_1</name></addressContext>' 

DELETE

curl -i -X DELETE -ku username:userpassword -H "Accept: application/yang-data+xml" https://<SBC_MGT_IP>/restconf/data/sonusAddressContext:addressContext=ADDR_CONT_1/

PUT

curl -i -X PUT -ku username:userpassword -s http://<SBC_MGT_IP>/restconf/data/sonusAddressContext:addressContext=ADDRESS_CONTEXT_1  -H "Content-Type: application/yang-data+xml" --data '  <addressContext>    <name>ADDRESS_CONTEXT_1</name>  <ipInterfaceGroup>  <name>LIG1</name>  </ipInterfaceGroup>   </addressContext> '

GET

curl -kisu 'admin:myPassword123@' -X GET 'https://172.29.85.47/restconf/data/sonusAddressContext:addressContext=default/sonusZone:zone=defaultSigZone'

HTTP/1.1 200 OK
Date: Wed, 02 Feb 2022 06:25:41 GMT
Server: Apache
Last-Modified: Wed, 02 Feb 2022 06:16:59 GMT
Content-Type: application/yang-data+xml
Content-Security-Policy: default-src 'self' blob: data: 'unsafe-eval' 'unsafe-inline';frame-ancestors 'self';
X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
X-Permitted-Cross-Domain-Policies: master-only
Strict-Transport-Security: max-age=31536000, includeSubDomains, preload
Cache-Control: no-cache, no-store, must-revalidate, private
Pragma: no-cache
Transfer-Encoding: chunked
 
 
<zone xmlns="http://sonusnet.com/ns/mibs/SONUS-ZONE/1.0" xmlns:ZONE="http://sonusnet.com/ns/mibs/SONUS-ZONE/1.0" xmlns:ADDRESS_CONTEXT="http://sonusnet.com/ns/mibs/SONUS-ADDRESS-CONTEXT/1.0">
<name>defaultSigZone</name>
<id>1</id>
<filterSipSrcStatistics xmlns="http://sonusnet.com/ns/mibs/SONUS-FILTER-SIP-SRC/1.0">
<name>defaultSigZone</name>
<filteredSipMsgCount>0</filteredSipMsgCount>
</filterSipSrcStatistics>
</zone>

 PATCH

curl -u  username:userpassword -i -ks -X PATCH  https://<SBC_MGT_IP>/restconf/data/sonusSystem:system/sonusOrcaSystem:security/pki/certificate=defaultSBCCert -H "Content-type:application/yang-data+xml" --data '<certificate><state>disabled</state></certificate>'

 Operations Example

To create a RESTART server, using the POST operation : 

request system serverAdmin papaya restart
curl -u username:userpassword -X POST  -i -s http://localhost:8008/restconf/operations/system/serverAdmin=papaya/restart -H "Content-Type: application/yang-data+xml" --data '<restart></restart>'