Skip to content

Commit 68bf7a7

Browse files
committed
changes
1 parent dd1d0e3 commit 68bf7a7

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

labs/coding-102-rest-python-ga/1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Completion Time: 35 minutes
1818

1919
**Access to an APIC-EM Controller**
2020
* To run these code samples, you will need access to an APIC-EM controller.
21-
* **If you are not using your own APIC-EM Controller**, use the [DevNet Sandbox](https://developer.cisco.com/site/devnet/sandbox/) Always-On APIC-EM Lab: [https://sandboxapic.cisco.com](https://sandboxapic.cisco.com).
21+
* **If you are not using your own APIC-EM Controller**, use the [DevNet Sandbox](https://developer.cisco.com/site/devnet/sandbox/) Always-On APIC-EM Lab: [(https://devnetapi.cisco.com/sandbox/apic_em)](https://devnetapi.cisco.com/sandbox/apic_em)).
2222

2323
**Python**
2424
* To run the code samples, you need to have Python 3 installed on your machine.
@@ -59,5 +59,5 @@ We are going to use the APIC-EM API as an example of a REST API in this lab. So
5959
2. Use the menu at the top to navigate directly to the APIC-EM developer resources.<br/><br/>
6060
![](/posts/files/coding-102-rest-python-ga/assets/images/Menu.png)<br/><br/>
6161

62-
3. You will also want to open the [API reference doc](https://anypoint.mulesoft.com/apiplatform/cisco-dev/#/portals/organizations/de91ddd1-9fb8-4731-8bce-03f47c3ba41a/apis/56056/versions/58124/pages/75870) in a separate tab while you are working on this lab.<br/><br/>
62+
3. You will also want to open the [API reference doc](http://devnetapic.cisco.com/) in a separate tab while you are working on this lab.<br/><br/>
6363
![](/posts/files/coding-102-rest-python-ga/assets/images/Ref.png)

labs/coding-102-rest-python-ga/3.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import requests
2121
import json
2222

2323
#variable to hold access to the controller
24-
controller='sandboxapic.cisco.com'
24+
controller='devnetapi.cisco.com/sandbox/apic_em'
2525

2626
# Create the service ticket URL
2727
url = "https://" + controller + "/api/v1/ticket"
@@ -58,7 +58,7 @@ print (json.dumps(response.json(), indent=4, separators=(',', ': ')))
5858

5959
Let's look at what the code is doing. We'll focus on the key code changes.
6060

61-
* *controller='sandboxapic.cisco.com'*
61+
* *controller='devnetapi.cisco.com/sandbox/apic_em'*
6262
* Assign the variable named **controller** the APIC-EM Controller IP or DNS. The DNS assigned here is for the APIC-EM Always-On Sandbox.
6363
* *url = "https://" + controller + "/api/v1/ticket"*
6464
* Build the url for the service ticket call by concatenating the strings.

labs/coding-102-rest-python-ga/4.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import requests
1414
#import json library
1515
import json
1616

17-
controller='sandboxapic.cisco.com'
17+
controller='devnetapi.cisco.com/sandbox/apic_em'
1818

1919
def getTicket():
2020
# put the ip address or dns of your apic-em controller in this url

labs/coding-102-rest-python-ga/5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import json
1717
# Disable warnings
1818
requests.packages.urllib3.disable_warnings()
1919

20-
controller='sandboxapic.cisco.com'
20+
controller='devnetapi.cisco.com/sandbox/apic_em'
2121

2222
def getTicket():
2323
# put the ip address or dns of your apic-em controller in this url

labs/coding-205-writing-file-ga/5.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import json
1515

1616
# All of our REST calls will use the url for the APIC EM Controller as the base URL
1717
# So lets define a variable for the controller IP or DNS so we don't have to keep typing it
18-
controller_url = "https://sandboxapic.cisco.com"
18+
controller_url = "https://devnetapi.cisco.com/sandbox/apic_em"
1919

2020
#the username and password to access the APIC-EM Controller
2121
payload = {"username":"devnetuser","password":"Cisco123!"}
@@ -77,8 +77,8 @@ To run this code sample:
7777
**cd \DevNetCode\&lt;your-name&gt;\coding-skills-sample-code\coding-205-writing-file-ga**
7878
2. Assign the APIC-EM Controller IP address or DNS to the **controller_url** variable.
7979
* Open the file **write-json-to-file.py**. For example, in Windows type: **notepad write-json-to-file.py**
80-
* *If you are not using your own APIC-EM Controller*, use the [DevNet Sandbox](https://developer.cisco.com/site/devnet/sandbox/) Always-On APIC-EM Lab: [sandboxapic.cisco.com](https://sandboxapic.cisco.com)
81-
* controller_url='https://sandboxapic.cisco.com'
80+
* *If you are not using your own APIC-EM Controller*, use the [DevNet Sandbox](https://developer.cisco.com/site/devnet/sandbox/) Always-On APIC-EM Lab: [devnetapi.cisco.com/sandbox/apic_em](https://devnetapi.cisco.com/sandbox/apic_em)
81+
* controller_url='https://devnetapi.cisco.com/sandbox/apic_em'
8282
3. Save the file. If encoding type is an option select **UTF-8**.
8383
4. Type the python command and then the filename at the command prompt, and press the return key.
8484
* *On Windows type*: **py -3 write-json-to-file.py**. Or type: **python write-json-to-file.py**

0 commit comments

Comments
 (0)