{"id":21636109,"url":"https://github.com/bigevilbeard/sdwan-api-ping","last_synced_at":"2025-03-18T23:50:10.437Z","repository":{"id":128721994,"uuid":"359444204","full_name":"bigevilbeard/sdwan-api-ping","owner":"bigevilbeard","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-12T14:34:51.000Z","size":1995,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-25T00:41:37.937Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bigevilbeard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2021-04-19T12:03:02.000Z","updated_at":"2022-09-12T14:07:01.000Z","dependencies_parsed_at":"2023-03-13T11:28:39.390Z","dependency_job_id":null,"html_url":"https://github.com/bigevilbeard/sdwan-api-ping","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/bigevilbeard%2Fsdwan-api-ping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigevilbeard%2Fsdwan-api-ping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigevilbeard%2Fsdwan-api-ping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigevilbeard%2Fsdwan-api-ping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigevilbeard","download_url":"https://codeload.github.com/bigevilbeard/sdwan-api-ping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244326199,"owners_count":20435122,"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":[],"created_at":"2024-11-25T03:29:54.580Z","updated_at":"2025-03-18T23:50:10.419Z","avatar_url":"https://github.com/bigevilbeard.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postman for Cisco SD-WAN\n\nThis public repo using the [POSTMAN](https://getpostman.com) environment and collection that can be used to interact with the `Cisco SD-WAN vManage REST API`. This can be downloaded [Here from DevNet Code Exchange](https://developer.cisco.com/codeexchange/github/repo/CiscoDevNet/Postman-for-Reservable-Cisco-SD-WAN)\n\nThe environment is pre-configured to access the [Cisco DevNet Reservable Sandbox for SD-WAN](https://devnetsandbox.cisco.com/RM/Diagram/Index/c9679e49-6751-4f43-9bb4-9d7ee162b069?diagramType=Topology) fabric. You can edit the variables in the environment to point to your own vManage instance. The collection contains REST API calls to authenticate, get a list of devices that are part of the SD-WAN fabric, and get device status, counters, and interface statistics for all the interfaces in the fabric. Feel free to modify them as you see fit and to add more calls to the collection.\n\n![Sandbox Image](./sdwan_sandbox.png)\n\n# Requirements\n\nThe Postman collection and environment will need:\n* Postman 6.4.4+\n* Cisco SD-WAN vManage 19.2.2\n\n# Setup\n\nIf 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:\n\n![Postman Image](./postman.png)\n\n1. Click on `Import`, browse to the location where you cloned this repo and add the two files:\n    1. `Cisco-Reservable-SD-WAN-Env.postman_environment`\n    2. `Cisco-Reservable-SD-WAN.postman_collection.json`\n2. Make sure you select the `Cisco-Reservable-SD-WAN-Environment` environment\n3. Expand the collection and start making REST API calls.\n\n## Note: In case your instance of vManage has a self signed certificate, make sure you disable `SSL certificate verification` in Postman's settings.\n\nTo disable SSL certificate verification go to Settings, click on switcher as in the screenshot below\n\n![SSL certificate verification](./postman_ssl_verification.png)\n\n# Using the ping API\n\nTo verify that a device is reachable on the network, ping the device to send ICMP ECHO_REQUEST packets to it:\n\nFrom the Monitor -\u003e Network screen, select the device (in this example vManage used to send ping to site3-vedge01 (10.10.1.17)\n\n![sandbox devices](./sandbox_device.png)\n\nHere you can see this example in the UI. Using the source interface of system-ipv4-10.10.1.1 which is the vManage system IP address (see previous screen shot)\n\n![sandbox devices](./vmanage_ping.png)\n\nTo perform this same task in the API, first run the Authetication and Token API calls from the Postman collection. Once this is done update the request with the following `POST` request. This uses the source `10.10.1.1` which is the vManage system IP address\n(replacing the example with your own details if required)\n\n\n```\nhttps://{{vmanage}}:{{port}}/dataservice/device/tools/nping/10.10.1.1\n```\n\nIn the Body tab of the request editor, select the raw option, and then select `JSON` in the dropdown that appears to the right of the options. Put the following `JSON` payload in the text field for our body, (replacing the example with your own details if required). \n\n- The Destination IP field, enter the IP address of the device to ping.\n- The VPN drop-down, select the VPN to use to reach the device.\n- The Source/Interface drop-down, select the interface to use to send the ping packets.\n- The Probes field, select the protocol type to use to send the ping packets.\n\n```\n{\"host\":\"10.10.1.17\",\"vpn\":\"0\",\"source\":\"system\",\"probeType\":\"icmp\"}\n```\n\n![ping api](./ping_api.png)\n\nIf this was a sucess you will see the following output. If there is an error HTTP 415 Unsupported Media Type client error response code, this indicates that the server/vManage refuses to accept the request because the payload format is in an unsupported format. Check your payload and format.\n\n![ping api](./ping_reply.png)\n\n\nYou can also perform TCP ping, for example using this payload ping the destination port `80` and private port `52890` as the source port.\n\n```\n{host: \"10.10.1.17\", vpn: \"0\", source: \"system\", probeType: \"tcp\", sourcePort: \"52890\", destPort: \"80\"}\n```\n\n## About me\n\nNetwork Automation Developer Advocate for Cisco DevNet.\n\n\nFind me here: [LinkedIn](https://www.linkedin.com/in/stuarteclark/) / [Twitter](https://twitter.com/bigevilbeard)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigevilbeard%2Fsdwan-api-ping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigevilbeard%2Fsdwan-api-ping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigevilbeard%2Fsdwan-api-ping/lists"}