Skip to content

Commit

Permalink
Merge pull request #105 from gregbo/patch-1
Browse files Browse the repository at this point in the history
Update api_requests_example.py
  • Loading branch information
agentlecisco authored Jul 29, 2024
2 parents e59fbc5 + 0f23d47 commit a8c75a1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,15 @@

import requests
from pprint import pprint
import urllib3

# Disable SSL Warnings
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)

router = {"ip": "ios-xe-mgmt.cisco.com",
"port": "9443",
"port": "443",
"user": "developer",
"pass": "C1sco12345"}
"pass": "lastorangerestoreball8876"}

headers = {"Accept": "application/yang-data+json"}

Expand Down
4 changes: 2 additions & 2 deletions programming_fundamentals/rest_part_1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ This lesson leverages the [IOS XE on CSR Recommended Code Always On](https://dev

***Note: In the video, a different DevNet Sandbox is used***

When running the `curl` for the RESTCONF example, leverage `https://ios-xe-mgmt.cisco.com:9443` as the URL instead of `https://10.10.20.21`.
When running the `curl` for the RESTCONF example, leverage `https://ios-xe-mgmt.cisco.com:443` as the URL instead of `https://10.10.20.21`.

## Download Slides

You can download the slides for this lesson [here](https://developer.cisco.com/fileMedia/download/c5942bff-3499-3e11-829a-fa90ebeb5fd1).

> *Suggestion: Right click, "Open in new tab"*
> *Suggestion: Right click, "Open in new tab"*
4 changes: 2 additions & 2 deletions programming_fundamentals/rest_part_1/curl_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ curl https://api.icndb.com/jokes/random?limitTo=nerdy

# Example 3: Network Programmability with RESTCONF
curl -vk \
-u developer:C1sco12345 \
-u developer:lastorangerestoreball8876 \
-H 'accept: application/yang-data+json' \
https://ios-xe-mgmt.cisco.com:9443/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet2
https://ios-xe-mgmt.cisco.com:443/restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet2

0 comments on commit a8c75a1

Please sign in to comment.