SteelConnect series 7/8: REST API

We’re nearing the end of the series, today I’ll cover the RESTful API which can be used to integrate certain tasks into your existing infrastructure management solution, or just use it to monitor or update only the parts that are relevant to your organisation.

Disclaimer: I work for Riverbed, all views and expressions on this blog are entirely my own and don’t necessarily reflect the views of my employer.

Those following the blog for a while know I’m a fan of automating tasks, especially repetitive ones. This blog post assumes you know how a RESTful API works, using HTTP GET/PUT/POST/DELETE methods. My previous blog post on APIs from when I worked at Brocade has a bit more detail on it in case you need a refresher.

To interact with the API you just need a REST client, and access to SteelConnect Manager. You could start straight away with writing an app based on the API documentation, but to test or verify my API calls I use Postman. You can get it here but there are many flavours, cURL also works if you prefer this.

First of all make sure the REST API access is enabled in your SteelConnect Manager realm, otherwise it won’t work. Once that’s done fire up Postman.

There are two URLs for SteelConnect Manager’s API documentation:

  1. There’s one for monitoring of links, tunnels, event logs etc.
  2. There’s one to configure the environment, including adding/updating/deleting sites, nodes or policies.

The base URL for reporting is:

https://your_realm.riverbed.cc/api/scm.reporting/1.0

The base URL for configuration is:

https://your_realm.riverbed.cc/api/scm.config/1.0

As a simple example, if you want to get a list of sites in your organisation you can run this GET method in Postman, where myrealm is the name of your realm. Use Basic Auth with your SCM username/password to interact with the API.

GET https://your_realm.riverbed.cc/api/scm.config/1.0/sites

Once this is done you’ll see something like this: REST API

The Body shows the output, which is just JSON. Obviously you can also update the fields, by using POST/PUT or DELETE instead of GET.

Let’s create a site for example, which is probably something you want to automate if you’re a large enterprise. The API call required for this is:

https://your_realm.riverbed.cc/api/scm.config/1.0/your_org_id/sites

You can get the org-id from the GET command we used earlier, you can see it in the screenshot above for example.

We’ll use the following details as input to create a site in Darwin. Only the first three are required, but we’ll put in the country and timezone as well.  There are many more options to configure for the site, but I’ll keep it simple for now:

 "name": "Site-Darwin",
 "longname": "Darwin National Park",
 "city": "Darwin",
 "country": "AU",
 "timezone": "Australia/Darwin"

This is what it looks like in Postman: Postman Intro

Once sent and successful, you’ll see status 200 at the bottom with all details of the request including the default settings for anything we didn’t specifically configure. Postman 200 status

In SCM, you’ll now see that a new site is created and place on the map so mission successful! SCM Dashboard

With the basics out of the way, you can write your own applications to interact with the API and customise what’s important to you and your organisation.

I wrote an app myself to quickly add/modify/remove sites which is handy for doing demos or PoCs. It’s not a Riverbed endorsed app, and use at your own risk. It’s accessible to anyone on https://api.patrickpeeters.com.

You have to login with your SCM credentials, once logged in you can quickly see the status of your environment and make changes as well as adding new sites quickly. It’s just an example of what’s possible, the possibilities are endless! SCM Dashboard 2

There is more API goodness coming soon, stay tuned for a very cool update on this in the next few weeks!

In the mean time, have a merry Christmas and a happy new year!

If you want to test SteelConnect, head here for a free trial.


The complete series:

Part 1: SD-WAN for the masses

Part 2: Getting started with SteelConnect

Part 3: Native Amazon AWS & Microsoft Azure integration

Part 4: Intelligent traffic steering

Part 5: SD-LAN

Part 6: Application visibility

Part 7: REST API

Part 8: SteelHead integration

Related Articles

comments powered by Disqus