Using Siri Shortcuts to Interact with Riverbed SD-WAN

Brandon Carroll

Using a RESTful API is not a new concept in today’s networks. In fact, we see it on many of the proof of concept (POC) requests from customers who are deploying Riverbed SD-WAN. It’s quite useful to use automation to interact with the network for many reasons. Creating sites, setting IP addresses, checking the status of an uplink, all these things make sense if we can make it happen quicker and do it in a way that fits our personal workflows.

In this article I will discuss how you can use Siri shortcuts in iOS 12 to interact with the RESTful API of SteelConnect Manager (SCM).

What are Siri Shortcuts?

I’ve followed the progression of Apple iOS for a long time. In fact, some might call me an Apple fanboy although I take exception to that. I am a fan of technology, hence the Technical Evangelist role here at Riverbed. And if you work in the networking industry and like to get at the CLI and fiddle with the cool bits of an operating system then you know that this is not something that Apple lets you do with iOS. But getting at the CLI and fiddling is what give you the power to script actions. So a small company emerged on the App Store and released an app called Workflow. The Workflow app let you visually script a series of events on your iPhone or iPad. Some of the things that you could script would normally require shell access. Well the app was so good that Apple purchased them and integrated the app into iOS 12, renaming it Shortcuts, and it works with Siri Shortcuts to use your voice commands with Siri to initiate complex workflows on your phone.

Simple example of Siri Shortcut

Shortcuts can be downloaded from the App Store at no cost or you can create them from scratch. Below is a simple example of how a shortcut works. In this example we are telling the application to prompt us for some text and then put that text into a variable. Once the variable has data in it should generate an alert with the variable inserted.

Example of how a Siri shortcut works

The following image shows the output of this shortcut.

**insert GIF here.

So, with that basic understanding, lets turn attention to the RESTful API of Riverbed’s Steelconnect SD-WAN solution.

SteelConnect RESTful API

The SteelConnect Manager can interact by means of a RESTful API.

Using the API and a bit of scripting you can build sites, virtual appliances, WANs. Uplinks, and so on. In fact I recently created a python script to build an entire 7 site demo topology in EVE-NG and the entire process takes about 10 minutes and deploys an internet and MPLS wan for all my sites to connect to. So clearly the power is in the API. So how do you use it?

First, each organization has what we known as an OrgID assigned to it. Anytime we interact with an org we have to use its ID. You can use the API to identify your org ID. As part of our shortcut we will first identify our OrgID and then we use it in all API calls after that.

Using the Riverbed SCM API with Siri Shortcuts

The following shortcut is designed to create a site in our Org. Lets break down the elements of the shortcut. First off, the menu on the left are actions you can add to the shortcut. To add them you just drag them from the left to the right. Since my shortcut is already populated, I’ll just walk you through its functions.

"Create a Site" shortcut

“Create a Site” shortcut

We begin by adding some text and asking the shortcut to speak that text to us.

add some text and asking the shortcut to say that text

Speaking text

Next we use dictation to listen for a response and place the words we speak into a variable called location.

use dictation to listen for a response

Dictating input

Next we ask for a name for the site.

Ask for a site name

Ask for site name

After using dictation again we take the text and put it in a variable called name.

Put site name into a variable

Put site name into a variable

We need to strip the spaces out of the name because this is not allowed by SCM.

Strip the spaces out of the name

Stripping spaces from the dictated text

Now we use the URL format that’s specified by the API to get my ORG ID.

use the URL format to get the ORG ID.


In the following screenshot I’m calling out the fact that we are adding authentication into the call.

Add authentication into the call

Add authentication into the call

Once I’ve retrieved my ORG ID I place it in a variable called myOrg.

Put ORG ID into a variable

Put ORG ID into a variable

Next we send another call to create a site.  Note that as part of the URL I need to substitute my ORG ID.

Use ORG ID in the POST URL

Use ORG ID in the POST URL

The difference with this call is that it’s a POST method.

Set the method to POST

Set the method to POST

This POST method is going to include the parameters required to create the site.  SCM requires at minimum the Name, Long Name, and Location.  We are going to use same value for both the name and long name.

Add values to request body

Add values to request body

After sending the call we speak the text that the site has been created for us.

Indicate that the script is complete

Indicate that the script is complete

This should give you a pretty good idea of how the shortcut functions but I highly recommend you watch the following video.  In the video I walk through each step and create two sites using two different methods.

Final thoughts

This example simple highlights a fraction of the power you have with the Steelconnect API and the Shortcuts app on iOS. This type of functionality is not limited to iOS. Romain Jourdan illustrated this capability with an Amazon Echo in the past. It’s likely we will see more and more capabilities make their way onto our mobile devices and when you combine that with the RESTful capabilities of Riverbed solutions there are many very cool things one can do to interact with the network. Take some time and have a look at our API documentation and think outside of the box.

No Responses to “Using Siri Shortcuts to Interact with Riverbed SD-WAN”

Leave a Reply

Your email address will not be published. Required fields are marked *