├── images ├── postman.png ├── sdwan_sandbox.png └── postman_ssl_verification.png ├── CONTRIBUTING.md ├── LICENSE ├── Cisco-AlwaysOn-SD-WAN-Env.postman_environment.json └── README.md /images/postman.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CiscoDevNet/Postman-for-AlwaysOn-Cisco-SD-WAN/HEAD/images/postman.png -------------------------------------------------------------------------------- /images/sdwan_sandbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CiscoDevNet/Postman-for-AlwaysOn-Cisco-SD-WAN/HEAD/images/sdwan_sandbox.png -------------------------------------------------------------------------------- /images/postman_ssl_verification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CiscoDevNet/Postman-for-AlwaysOn-Cisco-SD-WAN/HEAD/images/postman_ssl_verification.png -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to DevNet SD-WAN API Postman Collection 2 | 3 | The following is a set of guidelines for contributing to DevNet SD-WAN API Postman Collection, which are hosted in the [Cisco DevNet](https://github.com/CiscoDevNet/)on GitHub. We want to make contributing to this project as easy and transparent as possible. These are mostly guidelines, not rules. Use your best judgment, and feel free to propose changes to this document in a pull request. 4 | 5 | 6 | ## Pull Requests 7 | 8 | 1. Fork the repo and create your branch from `master`. 9 | 2. If you've added/changed an API in the collection, please test this thoroughly. 10 | 3. Ensure you export a modified collection using Collection Format v2.1. 11 | 4. Ensure the exported collection/environment can be imported back into Postman. 12 | 13 | Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: 14 | 15 | ``` 16 | $ git commit -m "A brief summary of the commit 17 | > 18 | > A paragraph describing what changed." 19 | ``` 20 | 21 | 22 | Thanks! 23 | 24 | DevNet Team 25 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD 3-Clause License 2 | 3 | Copyright (c) 2020, Cisco Systems, Inc. and/or its affiliates 4 | All rights reserved. 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its 17 | contributors may be used to endorse or promote products derived from 18 | this software without specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 | -------------------------------------------------------------------------------- /Cisco-AlwaysOn-SD-WAN-Env.postman_environment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "3d782c01-9c15-463a-be25-6fe10a2001ed", 3 | "name": "Cisco-AlwaysOn-SD-WAN-Environment", 4 | "values": [ 5 | { 6 | "key": "vmanage", 7 | "value": "sandbox-sdwan-2.cisco.com", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "j_username", 12 | "value": "devnetuser", 13 | "enabled": true 14 | }, 15 | { 16 | "key": "j_password", 17 | "value": "RG!_Yw919_83", 18 | "enabled": true 19 | }, 20 | { 21 | "key": "port", 22 | "value": "443", 23 | "enabled": true 24 | }, 25 | { 26 | "key": "X-XSRF-TOKEN", 27 | "value": "", 28 | "enabled": true 29 | }, 30 | { 31 | "key": "count", 32 | "value": "100", 33 | "enabled": true 34 | }, 35 | { 36 | "key": "startDate", 37 | "value": "2020-04-21T18:00:00", 38 | "enabled": true 39 | }, 40 | { 41 | "key": "endDate", 42 | "value": "2020-04-21T18:30:00", 43 | "enabled": true 44 | }, 45 | { 46 | "key": "timeZone", 47 | "value": "BST", 48 | "enabled": true 49 | }, 50 | { 51 | "key": "deviceId", 52 | "value": "10.10.20.174", 53 | "enabled": true 54 | }, 55 | { 56 | "key": "remoteSystemIp", 57 | "value": "", 58 | "enabled": true 59 | }, 60 | { 61 | "key": "localColor", 62 | "value": "", 63 | "enabled": true 64 | }, 65 | { 66 | "key": "remoteColor", 67 | "value": "", 68 | "enabled": true 69 | }, 70 | { 71 | "key": "color", 72 | "value": "", 73 | "enabled": true 74 | }, 75 | { 76 | "key": "systemIp", 77 | "value": "", 78 | "enabled": true 79 | }, 80 | { 81 | "key": "vpnId", 82 | "value": "", 83 | "enabled": true 84 | }, 85 | { 86 | "key": "isCached", 87 | "value": "false", 88 | "enabled": true 89 | }, 90 | { 91 | "key": "state", 92 | "value": "", 93 | "enabled": true 94 | }, 95 | { 96 | "key": "ifName", 97 | "value": "", 98 | "enabled": true 99 | }, 100 | { 101 | "key": "afType", 102 | "value": "", 103 | "enabled": true 104 | }, 105 | { 106 | "key": "prefix", 107 | "value": "", 108 | "enabled": true 109 | }, 110 | { 111 | "key": "nextHop", 112 | "value": "", 113 | "enabled": true 114 | }, 115 | { 116 | "key": "peerAddr", 117 | "value": "", 118 | "enabled": true 119 | }, 120 | { 121 | "key": "as", 122 | "value": "", 123 | "enabled": true 124 | }, 125 | { 126 | "key": "bridgeId", 127 | "value": "", 128 | "enabled": true 129 | }, 130 | { 131 | "key": "macAddress", 132 | "value": "", 133 | "enabled": true 134 | }, 135 | { 136 | "key": "copy_cookie", 137 | "value": "", 138 | "enabled": true 139 | } 140 | ], 141 | "_postman_variable_scope": "environment", 142 | "_postman_exported_at": "2020-10-30T14:34:53.713Z", 143 | "_postman_exported_using": "Postman/7.35.0" 144 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Postman for Cisco SD-WAN 2 | 3 | This public repo contains a [POSTMAN](https://getpostman.com) environment and collection that can be used to interact with the `Cisco SD-WAN vManage REST API`. The environment is pre-configured to access the [Cisco DevNet Always On Sandbox for SD-WAN](https://devnetsandbox.cisco.com/RM/Diagram/Index/a4ab71bc-f7a0-4d63-bedb-05a051818569?diagramType=Topology) fabric. You can edit the variables in the environment to point to your own vManage instance. 4 | 5 | ![Sandbox Image](./images/sdwan_sandbox.png) 6 | 7 | ## API Calls in this Collection 8 | 9 | This collection only includes calls to read (GET) information from the environment. It does not write changes to the vManage environment. The collection provides the following REST API calls to: 10 | 11 | - Authenticate 12 | - Credentials provided in the [environment](https://github.com/CiscoDevNet/Postman-for-AlwaysOn-Cisco-SD-WAN/blob/master/Cisco-AlwaysOn-SD-WAN-Env.postman_environment.json) are for the Always On environment. 13 | - After authenticating with a username and password, another request is required to obtain a X-XSRF-TOKEN to protect against [Cross-Site Request Forgery](https://www.cisco.com/c/en/us/td/docs/routers/sdwan/configuration/sdwan-xe-gs-book/cisco-sd-wan-API-cross-site-request-forgery-prevention.html). When using this collection the token is automatically stored in a postman environment variable and used with further requests. 14 | - List devices that are part of the SD-WAN fabric and show device status, counters, and interface statistics for all the interfaces in the fabric. 15 | - List device templates 16 | - List device policy 17 | - Bulk API requests: 18 | - State [Bulk State API Documentation](https://sdwan-docs.cisco.com/Product_Documentation/Command_Reference/Command_Reference/vManage_REST_APIs/Bulk_APIs/Overview_of_Bulk_API_Operations) 19 | - Includes an undocumented endpoint (`/dataservice/data/device/state/CEdgeInterface`) for obtaining a list of all interfaces on Cisco IOS XE Routers including i.e. Cisco ISR and also cloud hosted CSR devices. 20 | - Statistics [Bulk Statistics API Documentation](https://sdwan-docs.cisco.com/Product_Documentation/Command_Reference/Command_Reference/vManage_REST_APIs/Bulk_APIs/Statistics) 21 | - _Data lags real-time by ~20mins_ 22 | - Real-Time monitoring [Real-Time Monitoring API Documentation](https://sdwan-docs.cisco.com/Product_Documentation/Command_Reference/Command_Reference/vManage_REST_APIs/Real-Time_Monitoring_APIs) 23 | 24 | Feel free to modify them as you see fit and to add more calls to the collection. 25 | 26 | ## Requirements 27 | 28 | The Postman collection and environment will need: 29 | 30 | - Postman 6.4.4+ 31 | - Cisco SD-WAN vManage 19.2.2 + 32 | 33 | ## Setup 34 | 35 | If you don't have Postman already installed, you can download it from [here](https://getpostman.com). Once you install it, you can follow the steps below to import the collection and environment: 36 | 37 | ![Postman Image](./images/postman.png) 38 | 39 | 1. Click on `Import`, browse to the location where you cloned this repo and add the two files: 40 | 1. `Cisco-AlwaysOn-SD-WAN-Env.postman_environment` 41 | 2. `Cisco-AlwaysOn-SD-WAN.postman_collection.json` 42 | 2. Make sure you select the `Cisco-AlwaysOn-SD-WAN-Environment` environment 43 | 3. Expand the collection and start making REST API calls. 44 | 45 | ### Using self-signed certificate 46 | 47 | In case your instance of vManage has a self signed certificate, you can disable `SSL certificate verification` in Postman's settings. To disable SSL certificate verification go to Settings, click on switcher as in the screenshot below: 48 | 49 | ![SSL certificate verification](./images/postman_ssl_verification.png) 50 | 51 | ## About me 52 | 53 | Network Automation Developer Advocate for Cisco DevNet. 54 | I'm like Hugh Hefner... minus the mansion, the exotic cars, the girls, the magazine and the money. So basically, I have a robe. 55 | 56 | Find me here: [LinkedIn](https://www.linkedin.com/in/stuarteclark/) / [Twitter](https://twitter.com/bigevilbeard) 57 | --------------------------------------------------------------------------------