Hands-on Collaboration APIs
Introduction

Overview

Cisco Collaboration products provide a rich set of Application Programming Interfaces (APIs) that can be used to extend and enhance the product capabilities, management, and diagnostics. This course will guide you through commonly used APIs on Cisco Webex and Cisco Unified Communications Manager (CUCM). with additional examples available for Cisco Unity Connection (CUC) and Cisco Meeting Server in the bonus sections. The end-goal is to use these APIs to build a simple web-based management portal that will enable you to simplify a series of complex provisioning and monitoring tasks. We hope this exercise will expose you to the potential of some of these APIs.

Let's walk through a few use cases:

  1. You may have a group of users who you would like to assign certain administrative tasks but you don't want to grant them full admin rights for all of the collaboration products.
  2. You'd like end users to be able to perform certain tasks on their own accounts themselves that they wouldn't otherwise be able to do without administrative privileges.
  3. You want to ensure consistent configuration of features and avoid costly errors.
  4. You would like to automate common or repetitive tasks.
  5. You have other systems that could make use of data from the collaboration products, but you want to normalize the data from the variety of APIs so they can be used by other systems in a consistent manner.
  6. You would like the ability to programmatically pull diagnostic and monitoring data so you can push the data into your own monitoring applications or create your own customized monitoring dashboards.

All of these are common concerns. In this lab, you will build a framework and web server to illustrate how some of these points might be addressed. This web server will provide a simple portal for sample user/admin tasks, such as adding a device or migrating a user from an on-premises registered device to a cloud-based Webex Calling account.

Modern web development involves front-end code (HTML/CSS/JavaScript) providing the user interface on the web page. Interactions with the back-end logic are facilitated through an API developed by the website developer. In other words, not only are web developers consuming APIs on the back-end, but they are also building their own APIs to communicate between the browser and their back-end logic. In the figure above, the server in the middle represents your application. and the web browser to the left represents the end-user. The line indicating "HTTP / REST" represents the communication between the web browser and your server which is not only providing standard HTML/CSS to display the webpage, but is also running Javascript in the browser that will make calls to the API you develop on the web server to allow the user to perfrom certain tasks. These API calls will, in turn, make use of the various APIs provided by the collaboration products to accomplish the task.

To be clear, this lab is not a course about web development or programming in Python, Javascript, or any other language. Although you will use Python and some Javascript, we have provided enough information for those unfamiliar with these languages to complete the tasks. If you are unfamiliar with either of these, we have provided you with enough information to complete the tasks. Because of the limited time for this lab and our desire to provide you with as much information as possible, you will see that we have provided you with a significant amount of code to lay the foundation for what you will be building. A basic web page (HTML/CSS/Javascript) has already been created for you and your focus in this lab will be to leverage the collaboration product APIs to accomplish the tasks the portal provides.

Although we are using the web portal as a means to teach you the power of these APIs, the knowledge you will gain will extend far beyond web development and can be used for anything from simple scripts to complex automation tasks.

You will see how a single request from the web browser or an interaction with a bot can result in several API calls to the backend that allow you, perhaps, to provision a phone in Unified CM, enable a user for Webex Calling, and send a message via Webex to log the change. This approach abstracts the complexity of the individual product APIs from the front-end web developer so they can focus on building the UI and you can focus on the work of accomplishing the required tasks.

We have provided you with a simple Python-based web server application skeleton, which essentially calls Python stub functions that you will complete in order to make API calls to the different Cisco Collaboration products.

Your lab environment contains the following servers/services:

  1. Cisco Unified Communications Manager version 14.0.1SU3 for call control
  2. Cisco Webex for notification of changes as well as Webex Control Hub and Webex Calling-related provisioning tasks
  3. (optional) Cisco Unity Connection version 14.0.1SU3 for voicemail
  4. (optional) Cisco Meeting Server version 3.1.2 for conference Spaces

This lab will first introduce you to the major API types used in Cisco collaboration products: SOAP and REST. You will work with tools that can be used to explore and understand these APIs by interacting directly with the products. That will allow you to understand some of the intricacies of the various product APIs. Once you get an understanding of each API, you will build your own API that executes API calls on behalf of the web portal we have provided for you. Finally, you will use the portal to accomplish provisioning and monitoring tasks