Using a REST API for automation

It’s been a while, but I’m still here! This time with some examples of how to use the REST API to do something useful in SteelConnect, with most of them used for real world deployments.

The basics of the API were covered in my series last year, the examples below assume you know how to use a REST API, if you have some Python knowledge that would be handy too.

I only started learning Python properly late last year so most of the examples are even suitable for a novice. If I can do it, so can you! All projects mentioned are on GitHub for easy access and forking. The first two were created by me and none of these are official Riverbed endorsed projects, so use at your own risk.

  • steelconnect_bulk_import imports sites, uplinks and zones based on a CSV file with extended options compared to the built-in bulk import in SteelConnect, allowing for more customisation. Great for demos or for setting up a complex environment.
  • steelconnect_delete_sites is part of the above project and allows you to delete all sites in one go. Obviously use with care and really only useful for demo or test environments.
  • steelconnect-dialogflow is a project created that allows anyone to integrate SteelConnect with Google Dialogflow. Dialogflow acts as an interface for integration with Twitter, Telegram, Google Assistant, Facebook and many others. It’s a great way to use DevOps/ChatOps to interact with SteelConnect.

    Here’s an example where I connected Telegram to my Dialogflow instance to setup a new site in my realm:

    This is what it looks like in SteelConnect Manager:

  • Last but most definitely not least: my colleague Greg Mueller has created some awesome SteelConnect scripts and his latest creation is a Python wrapper for the SteelConnect REST API, aptly named SteelConnection.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.