Ribbon Documentation Portal will be unavailable Thursday February 2nd 2023 between 2:00 PM EST ~ 12:00 PM. More Info
Skip to end of metadata
Go to start of metadata

Table of Contents

Getting Started

Starting with Release 3.0 of SBC 1000/2000 firmware, the REST license is free of charge and you can use it for multiple scenarios.

REST APIs are provided for developers who want to programmatically integrate the SBC 1000/2000 into their applications, and for administrators who want to script interactions with the SBC 1000/2000.

An example is scripting provisioning, which allows you to program multiple SBCs with the same parameters, instead of manually programming each one. This is often the case when you need to deploy multiple SBCs in the same county, and must create the same routing and transformation tables manually each time.

This article outlines tips for accessing REST programming through Microsoft Powershell 3.


Your system must include the following:

Verify the Version

Verify the version of the host using the following command.


Log into REST

Login without certificate

### Allow self Sign Cert
add-type @"
    using System.Net;
    using System.Security.Cryptography.X509Certificates;
    public class IDontCarePolicy : ICertificatePolicy {
        public IDontCarePolicy() {}
        public bool CheckValidationResult(
            ServicePoint sPoint, X509Certificate cert,
            WebRequest wRequest, int certProb) {
            return true;
[System.Net.ServicePointManager]::CertificatePolicy = new-object IDontCarePolicy
### Login
$BodyValue = "Username=restuser&Password=restpass"

$url = ""
Invoke-RestMethod -Uri $url -Method Post -Body $BodyValue -SessionVariable ps 

Basic REST requests - Samples

Create resources (PUT)

$BodyValue = "Description=Default SIP Server"
$url = ""
Invoke-RestMethod -Uri $url -Method PUT -Body $BodyValue -WebSession $ps

Modify resources (POST)

$BodyValue = "Description=Default SIP TOTO"
$url = ""
Invoke-RestMethod -Uri $url -Method POST -Body $BodyValue -WebSession $ps

Get resources (GET)

$url = ""
Invoke-RestMethod -Uri $url -Method GET -WebSession $ps

Delete resources (DELETE)

$url = ""
Invoke-RestMethod -Uri $url -Method DELETE -Body "" -WebSession $ps

Advanced REST Requests

Backup Configuration

$DestFile = "C:\Users\plessisa\Desktop\Rest\backup.tar.gz"
$url = ""
Invoke-RestMethod -Uri $url -Method POST -Body "" -WebSession $ps -OutFile $DestFile 

Restore Configuration

$url= ""
$body = "--MyBoundary`n"
$body += 'Content-Disposition: form-data; name="Filename"; filename="symphonyconfig.xml"'
$body += "`nContent-Type: application/xml`n`n"
$body += $(get-content symphonyconfig.xml -raw)
$body += "`n--MyBoundary--"
Invoke-RestMethod -uri $url -method POST -ContentType "multipart/form-data; boundary=MyBoundary" -body $body -WebSession $ps

Log in with cURL

This operation allows login to the SBC with cURL, and stores the PHP Session ID into Powershell for reuse later.

$login = ./curl.exe -k --data "Username=restuser&Password=restpass" -i -v
foreach ($line in $login) {
    if ($line.contains("PHPSESSID=")) {
        $correctline = $line.split(";")
        $splitedline = $correctline.split("=")
        $PHPSESSID = $splitedline[1]

Update SbcComms

This operation allows installation of Ribbon SBC Communication service updates on the ASM. Refer to Resource - sbaconfig.

curl.exe --cookie PHPSESSID=$PHPSESSID -k -i -F sbaInstallFilename=@setup.msi
<?xml version="1.0"?>
Action end on status
$url = ""
Invoke-RestMethod -Uri $url -Method GET -WebSession $MyPs
<?xml version="1.0"?>
 <sbaactionstatus href="">
  <rt_StatusText>setup.msi: Update Complete</rt_StatusText>

Scripting with REST

Basic Handler (PUT, POST, GET, DELETE)

Function BasicHandler {
    [xml]$XmlResultIn = $ResultIn.Substring(5)
    if($XmlResultIn.root.status.http_code.contains("200")) {
        return "Success"
    } else {
        return "Error Code:<"+$XmlResultIn.root.status.app_status.app_status_entry.code+"> Param:<"+$XmlResultIn.root.status.app_status.app_status_entry.params+">"

####### Expected
PS C:> BasicHandler $Result
Error Code:<20013> Param:<8|SIPServerTable>

Content Handler (GET)

[xml]$FinalResult= $Result.Substring(5)

####### Expected Result
PS C:> $FinalResult.root.sipservertable.Description
Default SIP TOTO