{"id":20588669,"url":"https://github.com/ciscodevnet/getting-started-with-cisco-sd-wan-rest-apis","last_synced_at":"2025-06-15T01:33:11.636Z","repository":{"id":36187231,"uuid":"159885407","full_name":"CiscoDevNet/Getting-started-with-Cisco-SD-WAN-REST-APIs","owner":"CiscoDevNet","description":"Getting started with Cisco SD-WAN REST APIs","archived":false,"fork":false,"pushed_at":"2024-04-05T08:26:01.000Z","size":40,"stargazers_count":78,"open_issues_count":18,"forks_count":74,"subscribers_count":22,"default_branch":"master","last_synced_at":"2024-12-11T11:10:34.781Z","etag":null,"topics":["sd-wan","viptela"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-30T22:28:44.000Z","updated_at":"2024-12-06T11:38:12.000Z","dependencies_parsed_at":"2024-11-16T08:15:27.115Z","dependency_job_id":null,"html_url":"https://github.com/CiscoDevNet/Getting-started-with-Cisco-SD-WAN-REST-APIs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2FGetting-started-with-Cisco-SD-WAN-REST-APIs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2FGetting-started-with-Cisco-SD-WAN-REST-APIs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2FGetting-started-with-Cisco-SD-WAN-REST-APIs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2FGetting-started-with-Cisco-SD-WAN-REST-APIs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/Getting-started-with-Cisco-SD-WAN-REST-APIs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230537062,"owners_count":18241515,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["sd-wan","viptela"],"created_at":"2024-11-16T07:25:48.765Z","updated_at":"2024-12-20T05:08:41.314Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Getting started with Cisco SD-WAN REST APIs\n\nThe Cisco SD-WAN Solution (a.k.a Viptela) is a cloud-delivered overlay WAN architecture that facilitates digital and cloud transformation for enterprises. It significantly reduces WAN costs and time to deploy new services.\n\nCisco SD-WAN builds a robust security architecture that's crucial for hybrid networks. It provides a strong policy framework.\n\nThe solution has been deployed in every major industry. It solves many critical enterprise problems, including:\n\n* Establishing transport-independent WAN for lower cost and higher diversity\n* Meeting SLA for business-critical and real-time applications\n* Providing end-to-end segmentation for protecting critical enterprise compute resources\n* Extending seamlessly into the public cloud\n* Providing optimal user experience for SaaS applications\n\n### Project SD-WAN\n\nThe goals of this application are two fold. First is to show how simple it is to\ndevelop applications that extend the Cisco SD-WAN fabric by using the REST API\nit provides. Second is to help IT operations teams that are managing Cisco SD-WAN fabrics to make the transition to an automated and programmable infrastructure.\n\nThe main application is a CLI tool through which users can see a list of the devices that are part of the fabric, the configuration templates, which devices are associated to which templates, and options to attach and detach configuration templates to specific devices.\n\nExample usage:\n\n`./sdwan.py attach --template db4c997a-7212-4ec1-906e-ed2b86c3f42f --variables Site-3-vEdge-Variables.yaml`\n\n### Requirements\n\nTo use this application you will need:\n\n* Python 3.6+\n* Cisco SD-WAN 18+\n* A Cisco SD-WAN account with permissions to attach and detach templates\n\n### Install and Setup\n\nClone the code to your local machine.\n\n```\ngit clone https://github.com/ai-devnet/Getting-started-with-Cisco-SD-WAN-REST-APIs.git\ncd Getting-started-with-Cisco-SD-WAN-REST-APIs\n```\n\nSetup Python Virtual Environment (requires Python 3.6+)\n\n```\npython3.6 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\nSetup local environment variables for your Cisco SD-WAN fabric. Provide the info for your Cisco SD-WAN environment.\n\nExamples:\n\n```\nexport vManage_IP=10.10.20.90\nexport vManage_PORT=8443\nexport vManage_USERNAME=admin\nexport vManage_PASSWORD=C1sco12345\n```\n\n### Using the application\n\nOnce installed and setup, you can now get started.\n\nInvestigate the built-in help with the tool.\n\n`./sdwan.py --help`\n\nOUTPUT\n\n```\nUsage: sdwan.py [OPTIONS] COMMAND [ARGS]...\n\n  Command line tool for deploying templates to CISCO SDWAN.\n\nOptions:\n  --help  Show this message and exit.\n\nCommands:\n  attach            Attach a template with Cisco SDWAN.\n  attached_devices  Retrieve and return devices associated to a...\n  detach            Detach a template with Cisco SDWAN.\n  device_list       Retrieve and return network devices list.\n  template_list     Retrieve and return templates list.\n```\n\nLook at the available templates. Each template will provide the number of devices already attached and the template ID.\n\n`./sdwan.py template_list`\n\nOUTPUT\n\n```\nRetrieving the templates available.\n╒═════════════════════════════╤═════════════════╤══════════════════════════════════════╤════════════════════╤════════════════════╕\n│ Template Name               │ Device Type     │ Template ID                          │   Attached devices │   Template version │\n╞═════════════════════════════╪═════════════════╪══════════════════════════════════════╪════════════════════╪════════════════════╡\n│ vSmart_Template             │ vsmart          │ 90f26d2d-8136-4414-84de-4e8df52374e6 │                  1 │                  9 │\n├─────────────────────────────┼─────────────────┼──────────────────────────────────────┼────────────────────┼────────────────────┤\n│ Site_1_and_2_cEdge_Template │ vedge-CSR-1000v │ c566d38e-2219-4764-a714-4abeeab607dc │                  2 │                 13 │\n├─────────────────────────────┼─────────────────┼──────────────────────────────────────┼────────────────────┼────────────────────┤\n│ Site_3_vEdge_Template       │ vedge-cloud     │ db4c997a-7212-4ec1-906e-ed2b86c3f42f │                  1 │                 13 │\n├─────────────────────────────┼─────────────────┼──────────────────────────────────────┼────────────────────┼────────────────────┤\n│ DC_cEdge_Template           │ vedge-CSR-1000v │ 24d4be69-8038-48a3-b546-c6df199b6e29 │                  1 │                 14 │\n╘═════════════════════════════╧═════════════════╧══════════════════════════════════════╧════════════════════╧════════════════════╛\n```\n\nRetrieve the list of devices that make up the SD-WAN fabric with ./sdwan.py device_list.\n\n`$ ./sdwan.py device_list`\n\nOUTPUT\n\n```\nRetrieving the devices.\n╒═══════════════╤═══════════════╤══════════════════════════════════════════╤═════════════╤═══════════╤════════════════╤═════════════════╕\n│ Host-Name     │ Device Type   │ Device ID                                │ System IP   │   Site ID │ Version        │ Device Model    │\n╞═══════════════╪═══════════════╪══════════════════════════════════════════╪═════════════╪═══════════╪════════════════╪═════════════════╡\n│ vmanage       │ vmanage       │ 81ac6722-a226-4411-9d5d-45c0ca7d567b     │ 10.10.1.1   │       101 │ 19.2.2         │ vmanage         │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ vsmart        │ vsmart        │ f7b49da3-383e-4cd5-abc1-c8e97d345a9f     │ 10.10.1.5   │       101 │ 19.2.2         │ vsmart          │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ vbond         │ vbond         │ ed0863cb-83e7-496c-b118-068e2371b13c     │ 10.10.1.3   │       101 │ 19.2.2         │ vedge-cloud     │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ dc-cedge01    │ vedge         │ CSR-61CD2335-4775-650F-8538-4EC7BDFFD04C │ 10.10.1.11  │       100 │ 16.12.3.0.3752 │ vedge-CSR-1000v │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ site1-cedge01 │ vedge         │ CSR-807E37A3-537A-07BA-BD71-8FB76DE9DC38 │ 10.10.1.13  │      1001 │ 16.12.3.0.3752 │ vedge-CSR-1000v │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ site2-cedge01 │ vedge         │ CSR-DE6DAB19-BA1A-E543-959C-FD117F4A6205 │ 10.10.1.15  │      1002 │ 16.12.3.0.3752 │ vedge-CSR-1000v │\n├───────────────┼───────────────┼──────────────────────────────────────────┼─────────────┼───────────┼────────────────┼─────────────────┤\n│ site3-vedge01 │ vedge         │ 0140a336-5fd5-9829-10d2-f6ba0b177efd     │ 10.10.1.17  │      1003 │ 19.2.2         │ vedge-cloud     │\n╘═══════════════╧═══════════════╧══════════════════════════════════════════╧═════════════╧═══════════╧════════════════╧═════════════════╛\n```\n\nAttaching a template is as easy as calling the *attach* option of the application and passing in the requested parameters.\n\n`./sdwan.py attach --template db4c997a-7212-4ec1-906e-ed2b86c3f42f --variables Site-3-vEdge-Variables.yaml`\n\nOUTPUT\n\n```\nAttempting to attach template.\nAttached Site 3 vEdge Template\n```\n\nTo detach a template from a specific device you need to call the detach option of the application and pass in the parameters for the target device ID and the system-ip of that device:\n\n`./sdwan.py detach --target 0140a336-5fd5-9829-10d2-f6ba0b177efd --sysip 10.10.1.17`\n\nOUTPUT\n\n```\nAttempting to detach template.\nChanged configuration mode to CLI\n```\n\n### POSTMAN\n\nI've also included a POSTMAN environment and collection in the `postman` folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fgetting-started-with-cisco-sd-wan-rest-apis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciscodevnet%2Fgetting-started-with-cisco-sd-wan-rest-apis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fgetting-started-with-cisco-sd-wan-rest-apis/lists"}