This repository is deprecated; please follow the main search page or use the ‘Related code repos’ widget on the right side of the current page.

Postman collections for Cisco Crosswork Network Change Automation and Health Insights APIs

This repo contains POSTMAN collections that can be used to interact with Cisco Crosswork Network Change Automation ("NCA") and Health Insights ("HI") APIs.

The collections are designed to help you get started with using APIs with Crosswork NCA and HI. Feel free to modify them as you see fit and to add more calls to the collection. If you want to contribute to the collections, send us a pull request with your changes and additions.

Requirements

The NCA and HI Postman collections will need:

  • Postman 6.7.0 +
  • Cisco Crosswork NCA and HI 3.0 +
  • Cisco NSO 4.5.5 +

Setup

If you don't have Postman already installed, you can download it from here. Once you install it, follow the steps below to import the collections and environment:

  1. Click on Import, browse to the location where you cloned this repo and add the two files:
    1. pub-ip-env.json
    2. API's_CL_BCN_19.postman_collection.json
  2. Make sure you select the Crosswork 2.0e PubIP environment
  3. Expand the collections
  4. Review our DevNet page Cisco Crosswork DevNet page
  5. Start making API calls

screenshot

Use Case

IS-IS protocol is extensively used as Interior Gateway Protocol (IGP) in Internet Service Provider (ISP) environment. The scope of this used case is to provide information regarding IS-IS Adjacency in specific L2 Adjacency. Using Crosswork Health Insights application we will enable a Key Performance Indicator on routers using an API - At this point a Zero touch telemetry action has been performed and all the required gets configured on the respective router/device. After the successful execution of above action, the information that we're trying to monitor i.e. IS-IS L2 Adjacency is provided on the Alert dashboard of health insights. All this data that is being reported on Alert dashboard can the queried through an API as well. The provided API's collection helps you enable a KPI, query the state of the KPI and query for alerts (if any). As this is a proactive used case, we've also provided a python script which will forward all the alerts from Crosswork health Insights application to a webex-teams room. In this case the alerts will be reported by a Crosswork BOT.

This concept can be extended to various of combinations different protocols like BGP, OSPF, etc, their health monitoring and helping the operator to detect an issue in the network quickly.

For this use case please use the following JSON file in the repository - https://github.com/CiscoDevNet/postman-for-Cisco-Crosswork/blob/master/API-Collection-Alert-Forwarding.postman_collection.json

Business Summary
Using Crosswork Health Insights we can detect the IS-IS Adjacency transitions and forward an Alert accordingly. This drastically reduces the mean time to detect an issue.

Using Crosswork Health Insights and Change Automation we can detect the state of the interface, forward an alert accordingly and perform an action, as per the customer's business logic. This drastically reduces the meantime to detect an issue and perform an action without any manual errors.
In the current use case, we will monitor the health of all the interfaces in large networks.

Whenever there is a continuous transition of the state of the interface we will perform an action to bring the interface down using Health Insights and Change Automation. Using Health Insights we will enable the Key Performance Indicator of Interface State flap detection. This action can be performed by an API or on UI. When we enable this KPI, the respective configuration of telemetry is configured on all the selected routers using NSO (zero-touch to router console). This configuration consists of the YANG Path that will be monitored every minute - in this case, we're monitoring the "state transition" of interfaces on all the routers in the network. Using the feature of Closed-loop remediation from Crosswork Health Insights and Change Automation, we will link the KPI to a playbook.

Playbooks are a part of Change Automation and they execute certain tasks as per the listed logic. For the successful execution of the playbook, we will need to provide the variables during their execution. When we link the KPI and Playbook, these variables are automatically learned from the generated Alert. In our current scenario, we will be learning the name of the Producer (router's name) and the corresponding interfaces from the KPI Alert, and as our action is to shut the interface, the action to be performed by playbook would be "down". All of the above-mentioned steps can be performed using APIs.

Business Summary
Using Crosswork Health Insights and Change Automation we can detect the state of the interface, forward an alert accordingly and perform an action as per Customer's business logic. This drastically reduces the mean time to detect an issue and perform an action without any manual errors.
View code on GitHub

Code Exchange Community

Get help, share code, and collaborate with other developers in the Code Exchange community.View Community
Disclaimer:
Cisco provides Code Exchange for convenience and informational purposes only, with no support of any kind. This page contains information and links from third-party websites that are governed by their own separate terms. Reference to a project or contributor on this page does not imply any affiliation with or endorsement by Cisco.