Skip to content

Commit 18f8790

Browse files
jneiman08182017 for staging
1 parent 61bc813 commit 18f8790

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

.DS_Store

8 KB
Binary file not shown.

labs/.DS_Store

2 KB
Binary file not shown.

labs/coding-101-rest-basics-ga/8.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22

33
Let's take a look at the Get Network Devices endpoint. A Network Device transports data to/from host devices or other network devices. A network device is typically a hub, switch or router and can be connected by an Ethernet cable or can have a wireless connection. Our goal here is to find the network devices and display information about them.
44

5-
You can look at the details of the Get Network Device API from the -- <a href="http://devnetapic.cisco.com/" target="_blank">APIC-EM API Docs</a>.
5+
You can look at the details of the Get Network Device API from the [APIC-EM API Docs](http://devnetapic.cisco.com/).
6+
7+
1. Set up the API Call in Postman: Use the service ticket to authorize a request to GET the network devices from the controller.
68

7-
1. Setting up the API Call in Postman
8-
* Now, let's use the service ticket to authorize a request to GET the network devices from the controller. <br/><br/>
99
![](/posts/files/coding-101-rest-basics-ga/assets/images/postman6.png)<br/><br/>
10-
2. Enter the information as shown below for our request to retrieve the list of network devices into the appropriate Postman fields:
10+
2. To retrieve the list of network devices, enter the information in the appropriate Postman fields, as shown here:
1111
* **Method**
12-
* `A.` Select **GET**.
12+
* **A.** Select **GET**.
1313
* **URL**
14-
* ``B.`` Enter `http://{APIC-EMController}/api/v1/ticket`
15-
* If you are not using your APIC-EM controller, use the Always-On APIC-EM Lab: <a href="https://devnetapi.cisco.com/sandbox/apic_em">https://devnetapi.cisco.com/sandbox/apic_em</a>.
14+
* **B.** Enter `http://{APIC-EMController}/api/v1/network-device` or, if you are not using your own APIC-EM Controller, enter the Always-On APIC-EM Lab controller`https[]()://devnetapi.cisco.com/sandbox/apic_em`.
1615
* **Headers**
17-
* `C.` Enter the 'Content-Type' and value 'application/json'
18-
* `C.` Enter the 'X-Auth-Token' and the service ticket created earlier. The 'X-Auth-Token' is required for all APIC-EM Controller API calls.
16+
* **C.** Enter the `Content-Type` and value `application/json`.
17+
* `C.` Enter `X-Auth-Token` and the value of the service ticket created earlier.
1918
* **Authentication**
20-
* Handled in the Headers
19+
* Is handled in the Headers.
2120
* **Body**
22-
* not required for this request
21+
* Not required for this request.
2322
3. Click **Send**.
24-
4. Postman sends the request to the server and displays the **Response Code**, '200 OK', in **Status**.
23+
4. Postman sends the request to the server and displays the **Response Code**, `200 OK`, in **Status**.
2524
* You can see that **JSON** contains the list of hosts that was returned.
2625

2726
The output should look similar to the example. For display purposes, some records have been removed.
28-
![](/posts/files/coding-101-rest-basics-ga/assets/images/postman7.png "Response")
27+
28+
![](/posts/files/coding-101-rest-basics-ga/assets/images/postman7.png "Response")
2929

3030
### Things to Try
31-
* In Postman append to '/1/2' to the call http://{APIC-EMController}/api/v1/network-device so reads as 'http://{APIC-EMController}/api/v1/network-device/1/2' . Click the **Send** button. How does the output differ?
32-
* Compare the change you just made in Get Network Devices API call versus the change you made in the Get Hosts call in the previous exercise of Step 7. How are they different and why? Hint: Check the API Reference Guide for each of these API calls.
33-
* In Postman change the API call 'http://{APIC-EMController}/api/v1/network-device/1/2' to 'http://{APIC-EMController}/api/v1/user'. Press the *Send* button. How is the returned data different and what does it represent? Hint: Check the API Reference Guide
31+
* In Postman, append `/1/2` so the call becomes `http://{APIC-EMController}/api/v1/network-device/1/2` and click **Send**. How does the output differ?
32+
* Compare the change you just made in *Get Network Devices API* call versus the change you made in the *Get Hosts* call in the previous exercise of Step 7. How are they different and why? Hint: Check the API Reference Guide for each of these API calls.
33+
* In Postman, change the API call `http://{APIC-EMController}/api/v1/network-device/1/2` to `http://{APIC-EMController}/api/v1/user` and click **Send**. How is the returned data different and what does it represent? Hint: Check the API Reference Guide
3434

3535
### Congratulations! You've just completed lab Coding 101 - REST API Basics!

0 commit comments

Comments
 (0)