Cisco CCNA Automation 200-901 Practice Test Questions and Exam Dumps Part17 Q321-Q340

View Full Cisco CCNA Automation 200-901 Exam Dumps and Practice Test Dumps.

 

Question 321

Which HTTP method is commonly used to create a new resource through a REST API?

  1. PUT
  2. POST
  3. GET
  4. DELETE

Correct Answer: 2

Explanation

The HTTP POST method is commonly used to create a new resource or submit data for processing through a REST API. In network automation, an application might use POST to create a device object, submit a job, or create a configuration resource. The exact behavior depends on the API design. GET is primarily used for retrieving information, DELETE removes resources, and PUT is commonly associated with replacing or setting a resource representation. Therefore, POST is the appropriate choice when an API uses the method to create a new resource.

Question 322

Which HTTP method is commonly used to completely replace an existing resource representation?

  1. PATCH
  2. GET
  3. PUT
  4. POST

Correct Answer: 3

Explanation

The HTTP PUT method is commonly used to create or completely replace the representation of a resource at a specified location. In automation, a client may send a complete representation of a resource to ensure that the server reflects the desired data. This differs from PATCH, which is generally associated with partial modifications. GET retrieves information, while POST is commonly used for creating resources or triggering operations. The exact behavior depends on the API specification, but PUT is conventionally associated with complete replacement or setting a resource representation.

Question 323

Which REST API characteristic means that each request should contain the information necessary for the server to process it?

  1. Stateful
  2. Stateless
  3. Persistent
  4. Synchronous

Correct Answer: 2

Explanation

A stateless REST interaction means that the server does not rely on stored client session state to understand each request. Each request should contain the information necessary for the server to process it, such as authentication credentials or tokens when required. Statelessness can simplify scaling because the server does not need to maintain application-specific session information for every client. It does not mean that the network connection itself can never persist. Stateful, persistent, and synchronous describe different concepts and do not define this REST architectural characteristic. Therefore, stateless is correct.

Question 324

Which HTTP method is generally used to remove an existing REST API resource?

  1. DELETE
  2. PATCH
  3. GET
  4. HEAD

Correct Answer: 1

Explanation

The HTTP DELETE method is generally used to request removal of a specified resource. In network automation, an API may use DELETE to remove an object such as a policy, interface configuration object, or inventory entry. The actual permissions and behavior are determined by the API implementation. GET retrieves information, PATCH typically modifies part of a resource, and HEAD retrieves response metadata without the normal response body. Therefore, DELETE is the method generally associated with removing a REST resource.

Question 325

Which API parameter is normally placed directly within the URL path to identify a specific resource?

  1. Header parameter
  2. Path parameter
  3. Cookie parameter
  4. Body parameter

Correct Answer: 2

Explanation

A path parameter is included directly within the URL path and is commonly used to identify a specific resource. For example, an API might use a URL structure such as /devices/123 where 123 identifies a particular device. Query parameters are different because they are typically placed after a question mark and are often used for filtering, sorting, or pagination. Headers and request bodies carry information in other parts of the HTTP request. Therefore, a path parameter is the correct answer for identifying a resource within the URL path.

Question 326

Which API parameter is commonly used to filter or sort returned resources without changing the endpoint itself?

  1. Query parameter
  2. MAC parameter
  3. Ethernet parameter
  4. Frame parameter

Correct Answer: 1

Explanation

Query parameters are commonly used to provide optional information such as filtering, sorting, pagination, or field selection. They are normally included after a ? in a URL and may contain multiple key-value pairs. For example, an API might support a query parameter to return only devices with a particular status. This allows the client to customize the result while using the same endpoint. MAC, Ethernet, and frame parameters are not standard HTTP API parameter categories. Therefore, query parameter is correct.

Question 327

What is URL encoding primarily used for?

  1. Representing special characters safely within URLs
  2. Encrypting API passwords
  3. Compressing JSON responses
  4. Creating VLAN tags

Correct Answer: 1

Explanation

URL encoding represents characters in a format that can safely be transmitted as part of a URL. Certain characters have special meanings in URLs, so encoding prevents ambiguity when they appear as data. This is particularly important when automation scripts construct API URLs containing query parameters or values with spaces and special characters. URL encoding should not be confused with encryption because it does not protect sensitive information from being read. It also does not compress JSON or create VLAN tags. Therefore, safely representing special characters in URLs is the correct answer.

Question 328

Which HTTP header commonly carries authentication credentials such as a bearer token?

  1. Accept
  2. Authorization
  3. Content-Length
  4. Host

Correct Answer: 2

Explanation

The HTTP Authorization header is commonly used to carry authentication credentials. For example, an API may use a bearer token with a format such as Authorization: Bearer <token>. The exact authentication scheme depends on the API. The Accept header indicates preferred response formats, Content-Length describes the size of the request or response body, and Host identifies the destination host. Proper handling of authorization headers is essential because tokens may provide access to protected network-management resources. Therefore, Authorization is correct.

Question 329

What is the purpose of an API version such as /v1/ in an endpoint?

  1. To identify a particular API version
  2. To specify a physical switch port
  3. To indicate a VLAN number
  4. To define a TCP port automatically

Correct Answer: 1

Explanation

An API version identifier such as /v1/ commonly indicates which version of an API the client is using. API versioning helps providers introduce changes while maintaining compatibility with existing applications. An automation application can therefore target a specific version whose endpoints, fields, and behavior are known. API versions are not physical switch ports, VLAN identifiers, or automatic TCP port definitions. The exact versioning strategy varies between APIs, but version identifiers commonly help manage changes to API contracts. Therefore, identifying a particular API version is correct.

Question 330

Which feature of an API specification describes the expected structure of request and response data?

  1. Schema
  2. Router
  3. Interface
  4. VLAN

Correct Answer: 1

Explanation

A schema describes the structure, fields, data types, and constraints of data exchanged by an API. In OpenAPI specifications, schemas can define the expected structure of JSON request bodies and responses. This allows developers to understand what fields are required, which values are allowed, and how nested objects are organized. A router, interface, or VLAN is a networking concept rather than an API data-model definition. Therefore, schema is the correct answer.

Question 331

Which data format uses key-value pairs enclosed in curly braces to represent an object?

  1. CSV
  2. XML
  3. JSON
  4. Plain text

Correct Answer: 3

Explanation

JSON represents objects using curly braces and key-value pairs. For example, a device object might contain fields such as hostname, IP address, and status. JSON is widely used by REST APIs because it is structured, relatively compact, and easily processed by programming languages such as Python. CSV represents tabular data using delimiters, XML uses tags and elements, and plain text has no required structured object syntax. Therefore, JSON is the correct data format for representing an object with key-value pairs inside curly braces.

Question 332

Which XML feature allows elements to be associated with a particular namespace?

  1. XML namespace declaration
  2. JSON key
  3. YAML anchor
  4. CSV header

Correct Answer: 1

Explanation

An XML namespace declaration associates XML elements and attributes with a specific namespace, helping prevent naming conflicts between different XML vocabularies. Namespaces are especially important in technologies such as NETCONF and YANG because different YANG modules can define elements that need to be distinguished. JSON keys, YAML anchors, and CSV headers serve different purposes. Understanding XML namespaces is useful when working with structured network-management protocols that exchange XML documents. Therefore, an XML namespace declaration is the correct answer.

Question 333

Which NETCONF capability allows a client to determine supported protocol features on a server?

  1. Capability exchange
  2. DNS discovery
  3. ARP inspection
  4. VLAN negotiation

Correct Answer: 1

Explanation

NETCONF uses capability exchange to allow a client and server to advertise supported protocol capabilities. During session establishment, the endpoints exchange <hello> messages containing capability information. This allows an automation application to determine which operations or features the NETCONF server supports before attempting to use them. This is useful because different devices or software versions may support different capabilities. DNS, ARP, and VLAN mechanisms do not perform NETCONF feature negotiation. Therefore, capability exchange is the correct answer.

Question 334

Which NETCONF message is exchanged when a session is initially established?

  1. <hello>
  2. <commit>
  3. <get-config>
  4. <lock>

Correct Answer: 1

Explanation

NETCONF endpoints exchange <hello> messages when establishing a NETCONF session. These messages advertise protocol capabilities supported by the client and server and help establish the context for subsequent NETCONF operations. Operations such as <get-config>, <commit>, and <lock> are performed after the session has been established. The hello exchange is therefore an important part of NETCONF session initialization. Consequently, <hello> is the correct answer.

Question 335

Which NETCONF datastore generally represents the configuration currently active on a device?

  1. Candidate
  2. Running
  3. Startup only
  4. Temporary

Correct Answer: 2

Explanation

The NETCONF running datastore represents the configuration currently active on the device. Automation applications can retrieve or modify configuration according to the capabilities and supported operations of the device. A candidate datastore can be used as a staging area for changes before they are committed when supported. Startup configuration is a separate concept and may represent configuration used during boot. Therefore, the running datastore is the one that generally represents the active configuration.

Question 336

What is the purpose of a NETCONF candidate datastore?

  1. To stage configuration changes before they are committed
  2. To store DNS records
  3. To replace the operating system
  4. To capture packets

Correct Answer: 1

Explanation

A NETCONF candidate datastore provides a staging area where configuration changes can be prepared before they are committed to the running configuration. This allows an automation workflow to make several related changes and validate them before applying the final configuration, when the device supports the candidate capability. It can improve control over configuration transactions and reduce the risk of partially applied changes. Candidate configuration does not store DNS records, replace the operating system, or capture packets. Therefore, staging configuration changes before commitment is correct.

Question 337

Which YANG statement defines a single scalar data value?

  1. container
  2. list
  3. leaf
  4. grouping

Correct Answer: 3

Explanation

The YANG leaf statement defines a single scalar data value. A leaf can have a type such as string, integer, Boolean, enumeration, or another defined type. For example, a YANG model may define a leaf representing an interface description or administrative status. A container groups child nodes, a list represents repeated structured entries, and a grouping defines reusable schema structures. Understanding these YANG node types is important because NETCONF and RESTCONF use YANG models to structure network-management data. Therefore, leaf is correct.

Question 338

Which YANG statement is used to represent multiple instances of a structured data node?

  1. leaf
  2. list
  3. typedef
  4. namespace

Correct Answer: 2

Explanation

The YANG list statement represents multiple instances of a structured data node. Each list entry can contain multiple child nodes and can be identified using one or more key leaves when a key is defined. Lists are useful for modeling repeated objects such as interfaces, users, routes, or other collections. A leaf represents a single scalar value, typedef defines a reusable type, and namespace information identifies XML namespace context. Therefore, list is the correct YANG statement for representing multiple structured instances.

Question 339

What is the main purpose of a YANG list key?

  1. To uniquely identify list entries
  2. To encrypt list data
  3. To define an IPsec tunnel
  4. To establish a NETCONF session

Correct Answer: 1

Explanation

A YANG list key identifies individual entries within a list and allows each entry to be uniquely distinguished. For example, an interface list may use an interface name as its key so that each interface entry can be addressed separately. Keys are important when automation applications retrieve, modify, or delete specific modeled objects through NETCONF or RESTCONF. A key does not encrypt data, establish IPsec tunnels, or create NETCONF sessions. Therefore, uniquely identifying list entries is the correct purpose.

Question 340

Which protocol provides a REST-like HTTP interface for interacting with YANG-modeled data?

  1. FTP
  2. RESTCONF
  3. TFTP
  4. SMTP

Correct Answer: 2

Explanation

RESTCONF provides an HTTP-based interface for interacting with YANG-modeled configuration and operational data. It combines REST-style concepts with structured data models defined using YANG, allowing automation applications to use familiar HTTP methods such as GET, POST, PUT, PATCH, and DELETE where supported. NETCONF provides another programmatic interface to YANG-modeled data but uses XML-based RPC operations rather than a REST-style HTTP interface. FTP and TFTP are file-transfer protocols, while SMTP is used for email. Therefore, RESTCONF is the correct answer.