{"id":15054,"date":"2026-09-17T09:00:15","date_gmt":"2026-09-17T09:00:15","guid":{"rendered":"https:\/\/www.examlabs.com\/certification\/?p=15054"},"modified":"2026-09-17T09:00:15","modified_gmt":"2026-09-17T09:00:15","slug":"cisco-ccna-automation-200-901-practice-test-questions-and-exam-dumps-part8-q141-160","status":"publish","type":"post","link":"https:\/\/www.examlabs.com\/certification\/cisco-ccna-automation-200-901-practice-test-questions-and-exam-dumps-part8-q141-160\/","title":{"rendered":"Cisco CCNA Automation 200-901 Practice Test Questions and Exam Dumps Part8 Q141-160"},"content":{"rendered":"<h1><\/h1>\n<h2><b>View Full <\/b><a href=\"https:\/\/www.examlabs.com\/200-901-exam-dumps\"><b>Cisco CCNA Automation 200-901 Exam Dumps<\/b><\/a><b> and Practice Test Dumps.<\/b><\/h2>\n<p>&nbsp;<\/p>\n<h3><b>Question 141<\/b><\/h3>\n<p><b>Which Python module is commonly used to work with JSON data?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">csv<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">json<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">os<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">math<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">json<\/span><span style=\"font-weight: 400;\"> module provides functions for encoding and decoding JSON data. Network automation applications frequently use JSON when communicating with REST APIs because API requests and responses commonly contain structured JSON objects. Python can convert JSON data into native dictionaries and lists, allowing automation scripts to access individual fields and process the information programmatically. The <\/span><span style=\"font-weight: 400;\">csv<\/span><span style=\"font-weight: 400;\"> module handles comma-separated data, <\/span><span style=\"font-weight: 400;\">os<\/span><span style=\"font-weight: 400;\"> provides operating-system interfaces, and <\/span><span style=\"font-weight: 400;\">math<\/span><span style=\"font-weight: 400;\"> provides mathematical functions. Therefore, the <\/span><span style=\"font-weight: 400;\">json<\/span><span style=\"font-weight: 400;\"> module is the appropriate Python module for working with JSON data.<\/span><\/p>\n<h3><b>Question 142<\/b><\/h3>\n<p><b>Which Python collection stores key-value pairs and is commonly used to represent JSON objects after parsing?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tuple<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Set<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Dictionary<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">String<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">A Python dictionary stores data as key-value pairs and is commonly used to represent JSON objects after JSON data has been parsed. For example, device information can be represented with keys such as <\/span><span style=\"font-weight: 400;\">hostname<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">ip_address<\/span><span style=\"font-weight: 400;\">, and <\/span><span style=\"font-weight: 400;\">platform<\/span><span style=\"font-weight: 400;\">, each associated with a corresponding value. Dictionaries are particularly useful in network automation because they provide efficient access to structured information by key. Tuples store ordered values, sets store unique elements, and strings store text. Therefore, a dictionary is the correct Python collection for representing key-value data.<\/span><\/p>\n<h3><b>Question 143<\/b><\/h3>\n<p><b>Which Python collection is ordered and can contain duplicate values?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">List<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Set<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Dictionary key<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Boolean<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">A Python list is an ordered collection that can contain duplicate values. Lists are commonly used in automation scripts to store multiple devices, IP addresses, interfaces, commands, or other items that need to be processed sequentially. For example, a script could maintain a list containing the management addresses of multiple routers and then loop through the list. Sets store unique values without relying on duplicates, while Boolean represents logical values. Therefore, a list is the appropriate Python collection when ordered data and duplicate values are allowed.<\/span><\/p>\n<h3><b>Question 144<\/b><\/h3>\n<p><b>Which Python collection automatically eliminates duplicate elements?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">List<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Tuple<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Set<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">String<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">A Python set is a collection designed to contain unique elements. If duplicate values are added to a set, only one instance of each value remains. This can be useful in network automation when a script needs to remove duplicate IP addresses, interface names, or other identifiers from a data set. Lists and tuples can contain duplicate values, while strings represent sequences of characters. Sets are also useful for membership testing and mathematical set operations. Therefore, the set data type is the correct choice when unique elements are required.<\/span><\/p>\n<h3><b>Question 145<\/b><\/h3>\n<p><b>Which Python loop is commonly used to iterate over each item in a collection?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">switch<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">for<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">case<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">select<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> loop is commonly used to iterate over items in a collection such as a list, tuple, dictionary, or set. In network automation, a <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> loop can process a list of device IP addresses, iterate through interfaces, or examine API results one item at a time. Python does not use traditional <\/span><span style=\"font-weight: 400;\">switch<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">case<\/span><span style=\"font-weight: 400;\">, or <\/span><span style=\"font-weight: 400;\">select<\/span><span style=\"font-weight: 400;\"> statements as the standard mechanism for collection iteration. A loop can also be combined with conditions to perform different operations based on the current item. Therefore, <\/span><span style=\"font-weight: 400;\">for<\/span><span style=\"font-weight: 400;\"> is the correct loop construct.<\/span><\/p>\n<h3><b>Question 146<\/b><\/h3>\n<p><b>Which Python keyword is used to execute a block of code only when a condition is true?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">if<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">loop<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">check<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">when<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> statement is used to execute a block of code when a specified condition evaluates to true. Automation scripts frequently use <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> statements to make decisions based on device status, API responses, configuration values, or other conditions. For example, an automation program might check whether an interface is administratively down before deciding whether to change its configuration. Python also provides <\/span><span style=\"font-weight: 400;\">elif<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\"> for handling additional conditions. Therefore, <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> is the correct keyword for conditional execution.<\/span><\/p>\n<h3><b>Question 147<\/b><\/h3>\n<p><b>Which Python keyword provides an alternative block when the original <\/b><b>if<\/b><b> condition is false?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">case<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">otherwise<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">else<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">alternate<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\"> statement defines a block of code that executes when the associated <\/span><span style=\"font-weight: 400;\">if<\/span><span style=\"font-weight: 400;\"> condition is false. It provides a simple way to handle an alternative path in automation logic. For example, a script can check whether a device responds to an API request and execute one block when the request succeeds and another when it fails. The <\/span><span style=\"font-weight: 400;\">elif<\/span><span style=\"font-weight: 400;\"> statement can be used when additional conditions need to be evaluated. <\/span><span style=\"font-weight: 400;\">case<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">otherwise<\/span><span style=\"font-weight: 400;\">, and <\/span><span style=\"font-weight: 400;\">alternate<\/span><span style=\"font-weight: 400;\"> are not Python keywords for this purpose. Therefore, <\/span><span style=\"font-weight: 400;\">else<\/span><span style=\"font-weight: 400;\"> is the correct answer.<\/span><\/p>\n<h3><b>Question 148<\/b><\/h3>\n<p><b>Which Python construct is used to handle an exception that occurs while executing a block of code?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">try\/except<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">if\/else<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">for\/while<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">import\/from<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Python uses <\/span><span style=\"font-weight: 400;\">try<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">except<\/span><span style=\"font-weight: 400;\"> blocks to handle exceptions that may occur during program execution. This is particularly useful in network automation because operations such as API requests, SSH connections, file access, and data parsing can fail for various reasons. A script can catch an expected exception and respond appropriately instead of terminating unexpectedly. <\/span><span style=\"font-weight: 400;\">if\/else<\/span><span style=\"font-weight: 400;\"> handles logical conditions, <\/span><span style=\"font-weight: 400;\">for\/while<\/span><span style=\"font-weight: 400;\"> controls loops, and <\/span><span style=\"font-weight: 400;\">import\/from<\/span><span style=\"font-weight: 400;\"> handles module imports. Therefore, <\/span><span style=\"font-weight: 400;\">try\/except<\/span><span style=\"font-weight: 400;\"> is the correct construct for handling runtime exceptions.<\/span><\/p>\n<h3><b>Question 149<\/b><\/h3>\n<p><b>Which Python keyword is used to explicitly raise an exception?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">error<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">raise<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">throwerror<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">exception<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">raise<\/span><span style=\"font-weight: 400;\"> keyword is used to explicitly generate an exception. Automation developers can use it when a program detects an invalid condition that should stop normal processing or be handled by another part of the application. For example, a script might raise an exception when a required device variable is missing or when an API response does not contain expected information. This allows developers to make error handling more deliberate and predictable. Therefore, <\/span><span style=\"font-weight: 400;\">raise<\/span><span style=\"font-weight: 400;\"> is the correct Python keyword for explicitly generating an exception.<\/span><\/p>\n<h3><b>Question 150<\/b><\/h3>\n<p><b>Which Python keyword is used to import a module?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">include<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">require<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">import<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">module<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The Python <\/span><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> keyword is used to make modules and their functionality available to a program. Network automation scripts frequently import modules such as <\/span><span style=\"font-weight: 400;\">json<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">requests<\/span><span style=\"font-weight: 400;\">, <\/span><span style=\"font-weight: 400;\">os<\/span><span style=\"font-weight: 400;\">, or vendor-specific libraries. Importing modules allows developers to reuse existing functionality instead of implementing everything from scratch. Python also supports forms such as <\/span><span style=\"font-weight: 400;\">from module import name<\/span><span style=\"font-weight: 400;\"> for importing specific objects. <\/span><span style=\"font-weight: 400;\">include<\/span><span style=\"font-weight: 400;\"> and <\/span><span style=\"font-weight: 400;\">require<\/span><span style=\"font-weight: 400;\"> are not the standard Python keyword for importing modules. Therefore, <\/span><span style=\"font-weight: 400;\">import<\/span><span style=\"font-weight: 400;\"> is the correct answer.<\/span><\/p>\n<h3><b>Question 151<\/b><\/h3>\n<p><b>Which HTTP method is primarily used to retrieve data from a REST API?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">POST<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">PATCH<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GET<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DELETE<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The HTTP <\/span><span style=\"font-weight: 400;\">GET<\/span><span style=\"font-weight: 400;\"> method is primarily used to retrieve information from a REST API. For example, an automation script can send a GET request to obtain device inventory, interface information, configuration data, or operational statistics. POST is commonly used to submit data or create resources, PATCH is commonly used for partial updates, and DELETE is used to remove resources. Although exact API behavior depends on the API design, GET is conventionally associated with retrieving resources. Therefore, GET is the correct HTTP method for obtaining data from a REST API.<\/span><\/p>\n<h3><b>Question 152<\/b><\/h3>\n<p><b>Which HTTP method is commonly used to partially modify an existing REST API resource?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">PATCH<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GET<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">OPTIONS<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">HEAD<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The HTTP <\/span><span style=\"font-weight: 400;\">PATCH<\/span><span style=\"font-weight: 400;\"> method is commonly used to partially modify an existing resource. This is useful when an automation application needs to change only selected fields without sending a complete replacement representation. For example, an API client might use PATCH to modify a device description while leaving other attributes unchanged. GET retrieves information, OPTIONS provides communication options, and HEAD retrieves response headers without the normal response body. API behavior can vary by implementation, but PATCH is conventionally associated with partial updates. Therefore, PATCH is the appropriate answer.<\/span><\/p>\n<h3><b>Question 153<\/b><\/h3>\n<p><b>Which HTTP method is commonly used to delete a resource from a REST API?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">PUT<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DELETE<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">GET<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">POST<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The HTTP <\/span><span style=\"font-weight: 400;\">DELETE<\/span><span style=\"font-weight: 400;\"> method is commonly used to request removal of a specified resource from a REST API. In network automation, an API client might use DELETE to remove an object such as a configured resource, policy entry, or inventory object when the API supports that operation. GET retrieves resources, POST commonly creates or submits information, and PUT is generally associated with replacing or creating a resource representation. The exact behavior depends on the API implementation, but DELETE is conventionally used for resource removal. Therefore, DELETE is the correct answer.<\/span><\/p>\n<h3><b>Question 154<\/b><\/h3>\n<p><b>Which REST API characteristic means that each request contains the information needed for the server to process it?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Statelessness<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Broadcasting<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Fragmentation<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Multicasting<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Statelessness means that each REST request contains the information necessary for the server to process that request, rather than depending on stored client session state between requests. This design makes REST APIs easier to scale because the server does not necessarily need to maintain application-specific session information for every client. Authentication information, parameters, and requested resources can be included as required by the API. Broadcasting, fragmentation, and multicasting are networking concepts and do not describe this REST architectural characteristic. Therefore, statelessness is the correct answer.<\/span><\/p>\n<h3><b>Question 155<\/b><\/h3>\n<p><b>Which HTTP response code commonly indicates that a new resource was successfully created?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">301<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">201<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">404<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">503<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">HTTP status code 201 means &#8220;Created&#8221; and is commonly returned when a request successfully creates a new resource. In REST API automation, a POST request that creates a device object, policy, or other supported resource may return a 201 response along with information about the newly created resource. Status 301 represents a redirect, 404 means that a requested resource was not found, and 503 indicates that the service is unavailable. Therefore, 201 is the appropriate response code for successful resource creation.<\/span><\/p>\n<h3><b>Question 156<\/b><\/h3>\n<p><b>Which HTTP status code commonly indicates that authentication is required or the supplied authentication credentials are invalid?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">401<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">201<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">204<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">302<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">HTTP status code 401, &#8220;Unauthorized,&#8221; commonly indicates that authentication is required or that the credentials supplied with a request are not accepted. In API automation, this can occur when an access token is missing, expired, incorrectly formatted, or otherwise invalid. Automation applications should detect authentication failures and handle them appropriately rather than repeatedly sending unsuccessful requests. Status 201 indicates successful resource creation, 204 indicates successful processing without response content, and 302 indicates a redirect. Therefore, 401 is the correct response code for the described authentication condition.<\/span><\/p>\n<h3><b>Question 157<\/b><\/h3>\n<p><b>Which HTTP status code commonly indicates that the client is authenticated but does not have permission to access the requested resource?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">200<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">403<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">201<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">304<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 2<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">HTTP status code 403, &#8220;Forbidden,&#8221; indicates that the server understood the request but refuses to authorize access to the requested resource. In an automation environment, a user or API token may be correctly authenticated but lack the required permissions to perform a particular operation. This differs from 401, which generally indicates an authentication issue. A 200 response indicates successful processing, 201 commonly represents successful resource creation, and 304 indicates that a cached representation has not changed. Therefore, 403 is the appropriate status code for an authorization failure.<\/span><\/p>\n<h3><b>Question 158<\/b><\/h3>\n<p><b>Which security practice limits an automation application&#8217;s API permissions to only the resources and actions it actually requires?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Least privilege<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Open access<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Shared credentials<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Anonymous access<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The principle of least privilege means granting an application or user only the permissions necessary to perform its required tasks. In network automation, an API account should not automatically receive unrestricted administrative access if it only needs to retrieve inventory or update a specific type of resource. Limiting permissions reduces the potential impact of compromised credentials, programming errors, or unintended operations. Open access, shared credentials, and anonymous access generally increase security exposure. Therefore, least privilege is the appropriate security practice for controlling automation API permissions.<\/span><\/p>\n<h3><b>Question 159<\/b><\/h3>\n<p><b>Which authentication technology is commonly used to provide a temporary token for accessing an API instead of repeatedly sending a username and password?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Token-based authentication<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">MAC learning<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">ARP inspection<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">DHCP snooping<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 1<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Token-based authentication allows an application to obtain and use a token when accessing an API. Depending on the authentication system, the token may have a limited lifetime, defined permissions, and other security properties. This approach can reduce the need to repeatedly transmit a username and password with every API request. Automation systems commonly use API tokens or bearer tokens when interacting with management platforms and services. MAC learning, ARP inspection, and DHCP snooping are network security or switching mechanisms unrelated to API authentication. Therefore, token-based authentication is the correct answer.<\/span><\/p>\n<h3><b>Question 160<\/b><\/h3>\n<p><b>Which practice helps protect automation projects from accidentally exposing passwords or API tokens in a public Git repository?<\/b><\/p>\n<ol>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Store secrets directly in source code<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Commit passwords to every branch<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Use secret management and exclude sensitive files<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Publish credentials in README files<\/span><\/li>\n<\/ol>\n<p><b>Correct Answer: 3<\/b><\/p>\n<h3><b>Explanation<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Using secret-management mechanisms and excluding sensitive files from version control helps prevent credentials from being accidentally committed to a Git repository. Automation projects may use tools such as Ansible Vault, environment variables, CI\/CD secret stores, or dedicated secrets-management platforms depending on the environment. Sensitive files can also be excluded using appropriate Git configuration such as <\/span><span style=\"font-weight: 400;\">.gitignore<\/span><span style=\"font-weight: 400;\">, although <\/span><span style=\"font-weight: 400;\">.gitignore<\/span><span style=\"font-weight: 400;\"> alone should not be considered a complete secrets-management solution. Hard-coding passwords or publishing them in documentation creates significant exposure. Therefore, secure secret management combined with appropriate repository practices is the correct approach.<\/span><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>View Full Cisco CCNA Automation 200-901 Exam Dumps and Practice Test Dumps. &nbsp; Question 141 Which Python module is commonly used to work with JSON data? csv json os math Correct Answer: 2 Explanation The Python json module provides functions for encoding and decoding JSON data. Network automation applications frequently use JSON when communicating with [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1648,1647],"tags":[],"_links":{"self":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/15054"}],"collection":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/comments?post=15054"}],"version-history":[{"count":1,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/15054\/revisions"}],"predecessor-version":[{"id":15080,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/posts\/15054\/revisions\/15080"}],"wp:attachment":[{"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/media?parent=15054"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/categories?post=15054"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.examlabs.com\/certification\/wp-json\/wp\/v2\/tags?post=15054"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}