All language subtitles for Free-CCNA-REST-APIs-Day-61-CCNA-200-301-Complete-Course_en

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 00:00:03,940 --> 00:00:07,349 This is a free, complete course for the CCNA. 2 00:00:07,349 --> 00:00:11,269 If you like these videos, please subscribe\n 3 00:00:11,269 --> 00:00:15,919 Also, please like and leave a comment, and\n 4 00:00:18,809 --> 00:00:21,449 In this video we will look at REST APIs. 5 00:00:21,449 --> 00:00:26,419 APIs are used to allow programs to exchange\n 6 00:00:26,419 --> 00:00:30,480 They are important for network automation\n 7 00:00:30,480 --> 00:00:34,230 interact with network devices and controllers. 8 00:00:34,229 --> 00:00:39,390 REST APIs specifically are commonly used for\n 9 00:00:39,390 --> 00:00:45,259 I’ve already briefly introduced REST APIs\n 10 00:00:45,259 --> 00:00:51,210 REST APIs in greater depth, and then in the\n 11 00:00:51,210 --> 00:00:56,899 This video will cover exam topic 6.5, which\n 12 00:00:58,979 --> 00:01:04,439 So, as with all of the exam topics in this\n 13 00:01:04,439 --> 00:01:09,049 the use of REST APIs, they just expect you\n 14 00:01:09,049 --> 00:01:13,060 Here’s what we’ll cover in this video. 15 00:01:15,620 --> 00:01:20,050 Then I’ll introduce CRUD operations and\nHTTP. 16 00:01:20,049 --> 00:01:25,569 CRUD stands for Create, Read, Update, and\n 17 00:01:25,569 --> 00:01:28,509 we perform when using REST APIs. 18 00:01:28,510 --> 00:01:35,368 HTTP also uses CRUD operations, and REST APIs\n 19 00:01:35,368 --> 00:01:40,280 over the network, so it’s important to understand\nHTTP. 20 00:01:40,280 --> 00:01:45,329 Then I’ll outline the characteristics of\n 21 00:01:45,329 --> 00:01:50,459 to try out a couple basic REST API Calls,\n 22 00:01:51,978 --> 00:01:56,549 Make sure to watch until the end of the video\n 23 00:01:56,549 --> 00:01:59,618 ExSim, the best practice exams for the CCNA. 24 00:01:59,618 --> 00:02:04,310 So, let’s quickly review what an API is. 25 00:02:04,310 --> 00:02:10,140 An API, application programming interface,\n 26 00:02:10,139 --> 00:02:12,608 to communicate with each other. 27 00:02:12,609 --> 00:02:17,489 They are essential not just for network automation,\n 28 00:02:17,489 --> 00:02:21,790 If you want other applications to be able\n 29 00:02:21,790 --> 00:02:24,939 should design an API that allows them to access\nit. 30 00:02:24,939 --> 00:02:30,430 Here’s that basic diagram of SDN architecture\n 31 00:02:32,799 --> 00:02:38,909 In SDN architecture, APIs are used to communicate\n 32 00:02:38,908 --> 00:02:42,798 northbound interface, and between the SDN\n 33 00:02:45,239 --> 00:02:50,200 The NBI typically uses REST APIs, the topic\nof this video. 34 00:02:50,199 --> 00:02:54,828 Some other examples of APIs that can be used\n 35 00:02:54,829 --> 00:02:59,919 interface are NETCONF and RESTCONF, but we\n 36 00:02:59,919 --> 00:03:04,760 You’ll have to learn more about those for\n 37 00:03:08,289 --> 00:03:13,938 CRUD stands for Create, Read, Update, Delete,\n 38 00:03:15,389 --> 00:03:20,719 But this CRUD framework isn’t just used\n 39 00:03:24,009 --> 00:03:28,399 First let’s look at the definition of each\nof those operations. 40 00:03:28,400 --> 00:03:33,450 Create operations are used to create new variables\n 41 00:03:33,449 --> 00:03:41,278 For example, you could create a variable “ip_address”\n 42 00:03:41,278 --> 00:03:45,748 Read operations are used to retrieve the value\n 43 00:03:45,748 --> 00:03:50,778 ask ‘What is the value of variable “ip_address”? 44 00:03:50,778 --> 00:03:55,098 Update operations are used to change the value\n 45 00:03:55,098 --> 00:04:00,248 the value of the variable “ip_address”\nto “10.2.3.4”. 46 00:04:00,248 --> 00:04:04,408 And finally delete operations are used to\n 47 00:04:06,299 --> 00:04:10,989 So, those are the CRUD operations, now let’s\nlook at HTTP. 48 00:04:10,989 --> 00:04:16,780 First, why should I talk about HTTP, even\n 49 00:04:16,779 --> 00:04:22,829 First, HTTP uses ‘verbs’ or ‘methods’\n 50 00:04:22,829 --> 00:04:27,909 CRUD operations match the actions we typically\n 51 00:04:27,910 --> 00:04:33,200 When an HTTP client sends a request to an\n 52 00:04:35,120 --> 00:04:39,840 For example, if the client is trying to access\n 53 00:04:39,839 --> 00:04:44,250 verb to retrieve that web page, to get it,\nfrom the server. 54 00:04:44,250 --> 00:04:49,279 And for this reason, among others, REST APIs\n 55 00:04:49,279 --> 00:04:52,039 protocol to communicate over the network. 56 00:04:52,040 --> 00:04:57,370 So, let’s compare these CRUD operations\nto HTTP verbs. 57 00:04:59,259 --> 00:05:04,039 The HTTP verb POST is used to create a new\nvariable. 58 00:05:04,040 --> 00:05:07,730 The equivalent of a read operation is GET. 59 00:05:07,730 --> 00:05:12,750 There are two main options for the update\n 60 00:05:12,750 --> 00:05:15,970 the delete operation is simply DELETE. 61 00:05:15,970 --> 00:05:19,680 You don’t have to know the exact details\n 62 00:05:19,680 --> 00:05:22,590 ones are used for which CRUD operation. 63 00:05:22,589 --> 00:05:25,560 The flashcards will help with remembering\nthem. 64 00:05:25,560 --> 00:05:29,970 There are other HTTP verbs too, and you can\n 65 00:05:31,779 --> 00:05:35,899 Let’s look more at how those verbs are used. 66 00:05:35,899 --> 00:05:42,329 When an HTTP client, or a REST client using\n 67 00:05:42,329 --> 00:05:48,899 some information such as an HTTP verb, which\n 68 00:05:48,899 --> 00:05:52,259 identifier, indicating the resource it is\ntrying to access. 69 00:05:52,259 --> 00:06:00,050 So, here we have a server storing data as\n 70 00:06:00,050 --> 00:06:06,009 The client sends a GET message, for example,\n 71 00:06:06,009 --> 00:06:09,779 The server would then send a response, but\n 72 00:06:10,800 --> 00:06:17,300 Here’s an example of a URI, and I’ll use\n 73 00:06:22,120 --> 00:06:25,090 First is the scheme, which is basically the\nprotocol. 74 00:06:25,089 --> 00:06:32,599 In this case HTTP, or more specifically HTTPS,\n 75 00:06:34,149 --> 00:06:38,969 This is basically the address, or hostname,\n 76 00:06:38,970 --> 00:06:43,070 After that is the path, this indicates the\n 77 00:06:43,069 --> 00:06:49,529 Now, the Verb and URI are just part of the\n 78 00:06:50,529 --> 00:06:59,279 The HTTP request can include additional headers\n 79 00:06:59,279 --> 00:07:02,079 There is a great list at this page here from\nMozilla. 80 00:07:02,079 --> 00:07:06,620 Here’s an example of an HTTP request message. 81 00:07:06,620 --> 00:07:13,079 On the outside there is an IP header and a\n 82 00:07:13,079 --> 00:07:16,089 by some additional headers and data. 83 00:07:16,089 --> 00:07:20,339 An example header would be the Accept header,\n 84 00:07:20,339 --> 00:07:24,359 types of data that can be sent back to the\nclient. 85 00:07:24,360 --> 00:07:29,050 The client might say I accept JSON data or\n 86 00:07:29,050 --> 00:07:34,460 There’s another list of standard HTTP headers\n 87 00:07:34,459 --> 00:07:38,599 for each header so you can see what kind of\n 88 00:07:38,600 --> 00:07:43,189 Now, before I continue I want to clarify once\n 89 00:07:43,189 --> 00:07:47,639 about HTTP in a video that’s supposed to\nbe about REST APIs. 90 00:07:47,639 --> 00:07:54,000 It’s because when a REST client makes an\n 91 00:07:54,000 --> 00:07:56,459 send an HTTP request like the one above. 92 00:07:56,459 --> 00:08:01,019 So, you have to understand some basics about\nHTTP. 93 00:08:01,019 --> 00:08:06,209 Note that REST APIs don’t actually HAVE\n 94 00:08:08,399 --> 00:08:13,539 For the purpose of the CCNA you can assume\n 95 00:08:13,540 --> 00:08:19,020 mind that HTTP is a specific communication\n 96 00:08:20,019 --> 00:08:23,810 They aren’t the same thing, and they aren’t\n 97 00:08:23,810 --> 00:08:30,290 Now, after the client’s HTTP request the\n 98 00:08:30,290 --> 00:08:33,940 Let’s look a bit at what is in that response. 99 00:08:33,940 --> 00:08:38,559 The server’s response will include a status\n 100 00:08:38,558 --> 00:08:41,598 failed, as well as other details. 101 00:08:41,599 --> 00:08:46,290 You might not know it, but I’m sure you’ve\n 102 00:08:46,289 --> 00:08:50,818 The first digit indicates the class, the type,\nof the response. 103 00:08:50,818 --> 00:08:52,958 Here are the different classes. 104 00:08:52,958 --> 00:08:57,969 If the response code begins with a 1, it is\n 105 00:08:57,970 --> 00:09:02,200 This indicates that the server received the\n 106 00:09:02,200 --> 00:09:05,240 depends on the remaining two digits of the\nresponse code. 107 00:09:05,240 --> 00:09:09,259 We’ll look at an example in the next slide. 108 00:09:09,259 --> 00:09:13,889 If the response code begins with a 2, the\nclass is ‘successful’. 109 00:09:13,889 --> 00:09:18,519 This means the request was successfully received,\n 110 00:09:18,519 --> 00:09:22,528 This is usually the class of response you\nwant from the server. 111 00:09:22,528 --> 00:09:26,360 If the response code begins with a 3 the class\nis redirection. 112 00:09:26,360 --> 00:09:32,199 It means that further action is required to\n 113 00:09:32,198 --> 00:09:37,198 For example, if the URI of the resource has\n 114 00:09:37,198 --> 00:09:41,120 to request the new URI to get the resource. 115 00:09:41,120 --> 00:09:45,850 If the response code begins with a 4, the\n 116 00:09:45,850 --> 00:09:50,290 This means there was some error in the request\n 117 00:09:50,289 --> 00:09:52,778 a resource that doesn’t exist. 118 00:09:52,778 --> 00:09:54,620 Let me show an example of that. 119 00:09:54,620 --> 00:09:59,929 The client sends a GET request for the resource\n 120 00:10:00,929 --> 00:10:07,479 So, it sends a response with response code\n 121 00:10:07,480 --> 00:10:12,269 I think many of you will recognize the 404\n 122 00:10:13,818 --> 00:10:19,740 For example, I tried to access google.com/jeremysitlab,\n 123 00:10:19,740 --> 00:10:23,720 Notice the response code, 404, indicating\n 124 00:10:23,720 --> 00:10:30,379 I got this error message because google.com/jeremysitlab\n 125 00:10:30,379 --> 00:10:33,759 acquires my company for the low price of a\nbillion dollars. 126 00:10:33,759 --> 00:10:37,240 If anyone from Google’s watching, I’m\nwaiting for your offer. 127 00:10:37,240 --> 00:10:40,930 Anyway, there is one more class of response. 128 00:10:40,929 --> 00:10:45,528 If the response code begins with a 5 the class\nis server error. 129 00:10:45,528 --> 00:10:49,838 This means that the request was valid, but\n 130 00:10:50,839 --> 00:10:57,410 For example, perhaps the server doesn’t\n 131 00:10:57,409 --> 00:11:00,620 Here are some examples of each HTTP Response\nclass. 132 00:11:00,620 --> 00:11:03,850 I’ll just give one or two examples for each. 133 00:11:03,850 --> 00:11:09,139 For the informational class, you might see\n 134 00:11:09,139 --> 00:11:13,049 This indicates that the server has received\n 135 00:11:13,049 --> 00:11:15,899 response is not yet available. 136 00:11:15,899 --> 00:11:20,119 For the successful class you might see code\n200, meaning OK. 137 00:11:20,119 --> 00:11:22,149 This indicates that the request succeeded. 138 00:11:22,149 --> 00:11:27,808 If this is in response to a GET request, for\n 139 00:11:27,808 --> 00:11:33,818 it was successful, and in the message body\n 140 00:11:33,818 --> 00:11:39,259 Another example is 201, created, which indicates\n 141 00:11:39,259 --> 00:11:43,039 was created, for example in response to a\nPOST request. 142 00:11:43,039 --> 00:11:48,028 Remember, POST is equivalent to the CRUD Create\noperation. 143 00:11:48,028 --> 00:11:53,519 In the redirection class, 301, moved permanently,\n 144 00:11:53,519 --> 00:11:58,470 been moved, and the server indicates its new\n 145 00:11:58,470 --> 00:12:02,319 In the client error class we have 403, unauthorized. 146 00:12:02,318 --> 00:12:06,338 This means that the client must authenticate\nto get a response. 147 00:12:06,339 --> 00:12:11,839 Note that when talking about AAA in the security\n 148 00:12:15,159 --> 00:12:20,719 The official name for code 403 is unauthorized,\n 149 00:12:20,720 --> 00:12:23,889 because it indicates that the client needs\nto authenticate. 150 00:12:23,889 --> 00:12:29,669 Another example is 404, indicating that the\n 151 00:12:29,669 --> 00:12:35,860 Finally, an example of the server error class\n 152 00:12:35,860 --> 00:12:40,300 the server encountered something unexpected\n 153 00:12:40,299 --> 00:12:45,188 These are just a few examples, but there are\n 154 00:12:45,188 --> 00:12:50,149 If you’re curious about the others, check\n 155 00:12:50,149 --> 00:12:54,558 You can also check out this page for a summary\n 156 00:12:56,759 --> 00:13:00,820 Okay, that’s enough about HTTP. 157 00:13:00,820 --> 00:13:06,119 Let’s finally take a look at some characteristics\nof REST APIs. 158 00:13:06,119 --> 00:13:09,619 REST stands for representational state transfer. 159 00:13:09,619 --> 00:13:14,220 And REST APIs are also known as REST-based\nAPIs or RESTful APIs. 160 00:13:14,220 --> 00:13:17,829 I usually just call them REST APIs. 161 00:13:17,828 --> 00:13:21,438 Note that, as I’ve said before, REST isn’t\na specific API. 162 00:13:21,438 --> 00:13:25,750 Rather, it describes a set of rules about\n 163 00:13:28,720 --> 00:13:35,290 The six constraints, or rules, of RESTful\n 164 00:13:35,289 --> 00:13:42,129 architecture, stateless operations, cacheable\n 165 00:13:42,129 --> 00:13:45,199 and optionally something called code-on-demand. 166 00:13:45,198 --> 00:13:49,708 If you’re curious to know more details about\n 167 00:13:49,708 --> 00:13:53,989 but now I will explain just a few of them\n 168 00:13:57,659 --> 00:14:01,990 REST APIs use a client-server architecture,\nlike HTTP. 169 00:14:01,990 --> 00:14:08,060 The client uses API calls, basically that\n 170 00:14:08,059 --> 00:14:11,549 the server, such as in the example below. 171 00:14:11,549 --> 00:14:15,639 The separation between the client and server\n 172 00:14:15,639 --> 00:14:19,970 independently of each other, they aren’t\n 173 00:14:19,970 --> 00:14:24,699 And when the client application changes or\n 174 00:14:24,698 --> 00:14:27,789 between them must not break, it should continue\nto function. 175 00:14:27,789 --> 00:14:32,659 I think you’re fairly familiar with client-server\n 176 00:14:35,889 --> 00:14:40,350 The next characteristic I want to cover is\n 177 00:14:40,350 --> 00:14:45,720 I haven’t mentioned this term yet in the\n 178 00:14:45,720 --> 00:14:50,629 Statelessness means that each API exchange\n 179 00:14:50,629 --> 00:14:52,980 exchanges between the client and server. 180 00:14:52,980 --> 00:14:57,789 So, the server does not store information\n 181 00:14:57,789 --> 00:15:00,250 should respond to new requests. 182 00:15:00,250 --> 00:15:03,600 Each new request is a totally separate event. 183 00:15:03,600 --> 00:15:07,540 And if authentication is required, this means\n 184 00:15:07,539 --> 00:15:10,730 server for each request it makes. 185 00:15:10,730 --> 00:15:15,188 Although I haven’t used the term stateless,\n 186 00:15:15,188 --> 00:15:18,058 some stateful and stateless protocols. 187 00:15:18,058 --> 00:15:21,159 For example, TCP is stateful. 188 00:15:21,159 --> 00:15:25,969 It establishes connections and uses sequence\n 189 00:15:27,490 --> 00:15:30,459 UDP, on the other hand, is stateless. 190 00:15:30,458 --> 00:15:35,878 No connection is set up and neither host keeps\n 191 00:15:35,879 --> 00:15:40,980 The data is simply sent from host A to host\n 192 00:15:42,188 --> 00:15:45,789 Now, I want to make a clarification. 193 00:15:45,789 --> 00:15:52,730 Although REST APIs use HTTP, which uses TCP\n 194 00:15:55,389 --> 00:15:59,818 Keep in mind that the functions of the layers\n 195 00:15:59,818 --> 00:16:04,159 Just because a stateful Layer 4 protocol is\n 196 00:16:04,159 --> 00:16:06,919 protocol must also be stateful. 197 00:16:06,919 --> 00:16:13,509 The last rule of REST APIs that I’ll mention\n 198 00:16:15,389 --> 00:16:21,579 REST APIs must support caching of data, basically\n 199 00:16:21,578 --> 00:16:25,068 You might have heard this term before in reference\n 200 00:16:25,068 --> 00:16:29,229 For example, your computer might cache many\n 201 00:16:29,230 --> 00:16:32,889 have to retrieve the entire page every time\nyou visit it. 202 00:16:32,889 --> 00:16:37,119 This improves performance for the client and\n 203 00:16:37,119 --> 00:16:43,240 So, caching must be supported, but that doesn’t\n 204 00:16:43,240 --> 00:16:48,169 Not all resources have to be cacheable, but\n 205 00:16:48,169 --> 00:16:55,009 when the server sends them to the client,\n 206 00:16:55,009 --> 00:16:59,278 As I said before, if you’re curious about\n 207 00:16:59,278 --> 00:17:04,130 this link for restfulapi.net, but those three\n 208 00:17:05,459 --> 00:17:08,539 And I’m repeating myself, but let me say\nthis again. 209 00:17:08,539 --> 00:17:13,490 For applications to communicate over a network,\n 210 00:17:15,720 --> 00:17:21,890 And for REST APIs, HTTP is the most common\n 211 00:17:23,359 --> 00:17:26,299 That’s all we’ll cover for REST. 212 00:17:26,299 --> 00:17:33,359 For the CCNA, Make sure you know the CRUD\n 213 00:17:33,359 --> 00:17:38,740 response codes, and the basic characteristics\n 214 00:17:38,740 --> 00:17:43,370 Now let’s move on to try some simple REST\n 215 00:17:48,140 --> 00:17:51,520 I’ll let them describe it themselves. 216 00:17:51,519 --> 00:17:56,279 Cisco DevNet is Cisco’s developer program\n 217 00:17:56,279 --> 00:18:02,180 want to write applications and develop integrations\n 218 00:18:05,440 --> 00:18:11,830 Basically, DevNet offers lots of free resources\n 219 00:18:11,829 --> 00:18:16,389 documentation, etc. to learn about automation\n 220 00:18:16,390 --> 00:18:19,870 It really is a great resource and it keeps\ngetting better. 221 00:18:19,869 --> 00:18:23,829 Note that there is also a DevNet certification\n 222 00:18:25,049 --> 00:18:30,759 If that’s the case for you, perhaps consider\n 223 00:18:31,849 --> 00:18:38,490 Today we will use their Cisco DNA Center Sandbox\n 224 00:18:38,490 --> 00:18:43,700 DNA Center is one of Cisco’s SDN controllers,\n 225 00:18:43,700 --> 00:18:47,000 we go more in depth regarding SDN. 226 00:18:47,000 --> 00:18:51,980 DevNet has various always-on sandboxes, which\n 227 00:18:51,980 --> 00:18:55,630 time and look around to get familiar with\nthem. 228 00:18:55,630 --> 00:18:59,730 In this case we’ll use their always-on DNA\nCenter sandbox. 229 00:18:59,730 --> 00:19:04,360 And Postman, which we’ll use to send the\n 230 00:19:05,359 --> 00:19:07,629 It’s also a great learning tool. 231 00:19:07,630 --> 00:19:14,170 So, to start I want you to make an account\n 232 00:19:14,170 --> 00:19:18,360 an account on postman.com and download the\ndesktop app. 233 00:19:18,359 --> 00:19:23,529 You can use it directly in your browser too,\n 234 00:19:23,529 --> 00:19:28,149 For this demonstration we will simply follow\n 235 00:19:28,150 --> 00:19:33,180 Go to this link or just do a google search\n 236 00:19:35,490 --> 00:19:39,809 Note that you don’t have to follow along,\n 237 00:19:42,000 --> 00:19:45,710 But even if you’re just following what I’m\n 238 00:19:45,710 --> 00:19:49,400 DevNet too because it will explain the reason\n 239 00:19:51,200 --> 00:19:56,950 So, I’ve installed the Postman desktop app\nand opened it. 240 00:19:56,950 --> 00:20:01,819 From the home screen, click on workspaces\n 241 00:20:01,819 --> 00:20:09,099 If you don’t have a workspace you can create\n 242 00:20:10,930 --> 00:20:14,250 Next you should click New here. 243 00:20:14,250 --> 00:20:17,940 That will open this window, where you can\n 244 00:20:17,940 --> 00:20:25,809 For example, you can create a new API, documentation\n 245 00:20:25,809 --> 00:20:30,929 In this case, we want to create an HTTP request\n 246 00:20:33,680 --> 00:20:38,480 After clicking on HTTP request, we can now\n 247 00:20:38,480 --> 00:20:42,039 to send to DNA center’s REST API. 248 00:20:42,039 --> 00:20:47,659 As explained in the DevNet tutorial, first\n 249 00:20:47,660 --> 00:20:50,880 which we will use for our second HTTP request. 250 00:20:50,880 --> 00:20:56,540 First, set the HTTP verb to POST, it is GET\nby default. 251 00:20:56,539 --> 00:20:59,349 Then we have to specify the URL. 252 00:20:59,349 --> 00:21:05,009 Just a quick note, the DevNet tutorial uses\n 253 00:21:05,009 --> 00:21:10,000 I used the term URI, Uniform Resource Identifier,\n 254 00:21:10,000 --> 00:21:14,420 Basically, a URL is just a type of URI. 255 00:21:14,420 --> 00:21:18,050 You can google ‘URI vs URL’ for more info. 256 00:21:18,049 --> 00:21:24,919 So, if we send a POST request to this URL,\n 257 00:21:24,920 --> 00:21:29,170 However we have to specify a username and\n 258 00:21:29,170 --> 00:21:35,539 To do that, click on authorization here, and\n 259 00:21:35,539 --> 00:21:39,809 That will open this menu, where you should\n 260 00:21:39,809 --> 00:21:45,619 Username devnetuser, password Cisco123! with\n 261 00:21:46,619 --> 00:21:53,919 Okay, the POST is ready so now we can click\n 262 00:21:55,029 --> 00:22:00,009 If the POST is successful you will get a response\n 263 00:22:00,009 --> 00:22:05,379 The body of the response message will include\n 264 00:22:06,380 --> 00:22:08,080 Make sure to copy the value of the token. 265 00:22:08,079 --> 00:22:14,720 You don’t have to copy the quotation marks\n 266 00:22:14,720 --> 00:22:20,220 Okay, now we’re ready to send the second\n 267 00:22:20,220 --> 00:22:22,589 from the DNA center controller. 268 00:22:22,589 --> 00:22:26,619 First, change the HTTP verb to GET. 269 00:22:26,619 --> 00:22:31,759 We will also send this request to a different\n 270 00:22:31,759 --> 00:22:37,279 And the next step is to add an additional\n 271 00:22:37,279 --> 00:22:43,250 To do that, click on ‘headers’ here, enter\n 272 00:22:43,250 --> 00:22:48,309 value field paste the authorization key you\n 273 00:22:49,309 --> 00:22:57,169 Okay, now we’re ready for the second API\n 274 00:22:57,170 --> 00:23:03,130 If the GET is successful, you will once again\n 275 00:23:03,130 --> 00:23:08,220 And in the body we get the requested information,\n 276 00:23:08,220 --> 00:23:12,029 of devices managed by the DNA center controller. 277 00:23:12,029 --> 00:23:17,879 The output here is quite long, but let me\n 278 00:23:19,160 --> 00:23:22,810 You should be familiar with the format, as\n 279 00:23:22,809 --> 00:23:27,710 So, by looking at this output we can learn\n 280 00:23:29,819 --> 00:23:34,149 For example, the device family is listed as\nswitches or hubs. 281 00:23:34,150 --> 00:23:38,610 Since hubs aren’t really used anymore, it’s\n 282 00:23:38,609 --> 00:23:42,009 The role is access, so it’s an access layer\nswitch. 283 00:23:42,009 --> 00:23:44,890 The hostname is leaf1.abc.com. 284 00:23:44,890 --> 00:23:50,250 Leaf1, perhaps that means this is a leaf switch\n 285 00:23:50,250 --> 00:23:55,559 Here’s the platform ID, C9300-24U. 286 00:23:55,559 --> 00:23:58,460 This is the device model, Catalyst 9300. 287 00:23:58,460 --> 00:24:02,100 Here’s a picture of a C9300, by the way. 288 00:24:02,099 --> 00:24:07,039 We can also get info like the uptime, how\n 289 00:24:08,039 --> 00:24:14,450 So, that was a quick look at some basic REST\n 290 00:24:14,450 --> 00:24:20,019 We retrieved data in a machine-readable format,\n 291 00:24:20,019 --> 00:24:25,190 data like this, interact with it, tell DNA\n 292 00:24:25,190 --> 00:24:28,990 We’ve barely scratched the surface, but\n 293 00:24:30,940 --> 00:24:34,640 Here’s what we covered in this video. 294 00:24:34,640 --> 00:24:39,530 We briefly reviewed what an API is, and then\n 295 00:24:41,980 --> 00:24:46,690 Then we looked at the basic characteristics\n 296 00:24:46,690 --> 00:24:51,529 API Calls to DNA Center using a Cisco DevNet\ntutorial. 297 00:24:51,529 --> 00:24:57,149 As I mentioned earlier, make sure you know\n 298 00:24:57,150 --> 00:25:02,400 HTTP server response codes, and the basic\n 299 00:25:03,490 --> 00:25:09,150 I also gave various links to different resources\n 300 00:25:09,150 --> 00:25:12,160 although they will go in much more depth than\nis required. 301 00:25:12,160 --> 00:25:15,440 But check them out if you want a greater understanding. 302 00:25:15,440 --> 00:25:19,480 And make sure to watch until the end of the\n 303 00:25:19,480 --> 00:25:23,269 Software’s ExSim, the best practice exams\nfor the CCNA. 304 00:25:23,269 --> 00:25:28,599 Okay, let’s go to quiz question 1. 305 00:25:28,599 --> 00:25:33,730 What HTTP response code would you expect to\n 306 00:25:35,650 --> 00:25:40,320 Pause the video now to select the best answer. 307 00:25:47,740 --> 00:25:52,450 If the requested resource does not exist on\n 308 00:25:56,980 --> 00:26:00,700 Which of the following is NOT a constraint\n 309 00:26:00,700 --> 00:26:05,610 Pause the video now to select the best answer. 310 00:26:05,609 --> 00:26:11,439 Okay, the answer is C, stateful. 311 00:26:11,440 --> 00:26:16,740 REST APIs are stateless, meaning that each\n 312 00:26:16,740 --> 00:26:19,549 not dependent on any previous requests. 313 00:26:19,549 --> 00:26:24,200 In addition to these five constraints, there\n 314 00:26:24,200 --> 00:26:28,910 which basically extends client functionality\n 315 00:26:34,509 --> 00:26:39,769 Which category of HTTP response would you\n 316 00:26:39,769 --> 00:26:44,859 Pause the video now to select the best answer. 317 00:26:44,859 --> 00:26:52,349 Okay, the answer is B, you should expect a\n 318 00:26:52,349 --> 00:26:59,069 This indicates a successful request, for example\n 319 00:27:03,910 --> 00:27:10,060 HTTP verbs PUT and PATCH are equivalent to\nwhat CRUD operation? 320 00:27:10,059 --> 00:27:14,639 Pause the video now to select the best answer. 321 00:27:14,640 --> 00:27:21,140 Okay, the answer is C, U, which stands for\nupdate. 322 00:27:21,140 --> 00:27:25,790 Note that you might also see PUT categorized\n 323 00:27:25,789 --> 00:27:30,309 to create new variables, but usually it’s\n 324 00:27:33,720 --> 00:27:39,410 Which of the following would you expect to\n 325 00:27:39,410 --> 00:27:43,720 Pause the video now to select the best answer. 326 00:27:49,299 --> 00:27:55,349 The scheme of a URI identifies the protocol\n 327 00:27:57,640 --> 00:28:00,160 Okay, that’s all for the quiz. 328 00:28:00,160 --> 00:28:06,300 Now let’s take a look at a bonus question\n 26965

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.