Cisco CCNA Automation 200-901 Practice Test Questions and Exam Dumps Part14 Q261-Q280

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

 

Question 261

Which HTTP method is generally used to partially modify an existing resource?

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

Correct Answer: 4

Explanation

The HTTP PATCH method is generally used to partially modify an existing resource. In network automation, an API may use PATCH when only selected attributes of a device, interface, policy, or other object need to be changed. This differs from PUT, which is commonly associated with replacing the complete representation of a resource. GET retrieves information, POST commonly creates a resource or triggers an operation, and DELETE removes a resource. The exact behavior depends on the API implementation, but PATCH is conventionally associated with partial updates.

Question 262

What does HTTP status code 401 normally indicate?

  1. Unauthorized or missing valid authentication
  2. Resource successfully created
  3. Server temporarily unavailable
  4. Request completed with no content

Correct Answer: 1

Explanation

HTTP status code 401 normally indicates that the request lacks valid authentication credentials or that the supplied credentials are not acceptable. In API automation, this can occur when a token is missing, expired, invalid, or incorrectly supplied. It is important to distinguish 401 from 403. A 403 response generally indicates that the client is authenticated but does not have permission to perform the requested operation. A successful creation commonly returns 201, while 204 indicates successful processing with no response content. Therefore, 401 relates primarily to authentication.

Question 263

Which HTTP status code commonly indicates that a request was successful but the server has no content to return?

  1. 200
  2. 201
  3. 204
  4. 301

Correct Answer: 3

Explanation

HTTP status code 204 No Content indicates that the request was successfully processed but there is no content in the response body. In network automation, this response may be encountered after operations such as successfully deleting a resource or updating a resource where the API does not return a representation. HTTP 200 generally indicates successful processing with a response, while 201 commonly indicates that a resource was created. HTTP 301 represents a redirect. Therefore, 204 is the appropriate status code for a successful response without content.

Question 264

Which HTTP method is considered idempotent when repeated requests have the same intended effect on the resource?

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

Correct Answer: 2

Explanation

HTTP PUT is generally considered idempotent because sending the same PUT request multiple times should result in the same intended final state of the resource. This characteristic is useful in automation because retrying an operation after a temporary communication failure is less likely to create repeated changes. For example, repeatedly setting a resource to a specific configuration should leave it in the same intended state. POST is generally not considered idempotent because repeated requests may create multiple resources or trigger repeated actions. Therefore, PUT is the correct answer.

Question 265

What is the primary purpose of API pagination?

  1. To encrypt API traffic
  2. To authenticate users
  3. To divide large result sets into manageable responses
  4. To change an HTTP method

Correct Answer: 3

Explanation

API pagination divides a large collection of results into smaller groups or pages. This prevents an API from having to return thousands or millions of objects in a single response. Automation scripts can request one page at a time and continue until all required results have been processed. Pagination can improve performance, reduce memory consumption, and make API interactions more manageable. Pagination does not provide encryption or authentication, and it does not change the HTTP method being used. Therefore, dividing large result sets into manageable responses is the correct purpose.

Question 266

Which approach is commonly recommended when an API temporarily responds with a rate-limit condition?

  1. Retry immediately in an unlimited loop
  2. Use controlled retry and backoff
  3. Disable authentication
  4. Delete the API endpoint

Correct Answer: 2

Explanation

Controlled retry with backoff is a common approach when an API temporarily limits requests. A backoff strategy causes the automation program to wait before trying again, reducing the possibility of continuously sending requests while the service is overloaded or enforcing rate limits. Some APIs provide headers indicating when a client should retry. An unlimited immediate retry loop can make the problem worse and may cause additional rate limiting. Authentication should not be disabled as a workaround. Therefore, controlled retry and backoff is the appropriate approach.

Question 267

Which HTTP header commonly identifies the format of data being sent in the request body?

  1. Content-Type
  2. Hostname-Type
  3. Request-Format
  4. Data-Header

Correct Answer: 1

Explanation

The Content-Type HTTP header indicates the media type of the data contained in the request body. For example, an API request containing JSON commonly uses Content-Type: application/json. This allows the receiving application to understand how the request body should be interpreted. Other headers have different purposes, such as Authorization for authentication information and Accept for indicating preferred response formats. Hostname-Type, Request-Format, and Data-Header are not standard HTTP headers serving this purpose. Therefore, Content-Type is the correct answer.

Question 268

Which HTTP header is commonly used to indicate the response formats an API client can accept?

  1. Content-Length
  2. Authorization
  3. Accept
  4. User-Agent

Correct Answer: 3

Explanation

The HTTP Accept header allows a client to indicate which response media types it can process. For example, an automation application may send Accept: application/json when it expects a JSON response from a REST API. This differs from Content-Type, which describes the media type of the request or response body itself. Authorization is associated with credentials, Content-Length describes body size, and User-Agent identifies the client software. Therefore, Accept is the correct header for expressing preferred response formats.

Question 269

What is the main purpose of OpenAPI in API development?

  1. To physically configure network interfaces
  2. To describe and document an API
  3. To replace TCP
  4. To encrypt API credentials

Correct Answer: 2

Explanation

OpenAPI provides a standardized way to describe and document HTTP APIs. An OpenAPI document can describe endpoints, supported HTTP methods, parameters, request bodies, responses, authentication schemes, and data structures. This information can be used by developers and automation engineers to understand how an API should be consumed. Tools can also use OpenAPI specifications to generate documentation, client libraries, or testing interfaces. OpenAPI does not physically configure interfaces, replace TCP, or provide encryption for credentials. Therefore, describing and documenting an API is its primary purpose.

Question 270

Which format is commonly used to represent an OpenAPI specification?

  1. JSON or YAML
  2. JPEG only
  3. CSV only
  4. Binary executable only

Correct Answer: 1

Explanation

OpenAPI specifications are commonly represented using either JSON or YAML. YAML is frequently preferred because it can be easier for humans to read and maintain, while JSON is also fully capable of representing the structured specification. An OpenAPI document describes API paths, operations, parameters, schemas, responses, and other details. JPEG, CSV, and executable binary files are not standard formats for OpenAPI specifications. Understanding OpenAPI is useful in automation because it provides structured documentation that helps developers interact with APIs correctly.

Question 271

What does TLS primarily provide for HTTPS communication?

  1. Network address translation
  2. Encryption and secure communication
  3. Automatic IP addressing
  4. DNS resolution

Correct Answer: 2

Explanation

TLS, or Transport Layer Security, provides security for HTTPS communications by helping protect data exchanged between a client and server. It provides encryption and supports authentication of the server through certificates. This is important when automation scripts communicate with APIs because credentials, tokens, configuration data, and responses may contain sensitive information. TLS does not perform network address translation, assign IP addresses, or resolve DNS names. HTTPS commonly uses HTTP over TLS, providing a protected communication channel for web and API traffic. Therefore, encryption and secure communication is the correct answer.

Question 272

Why should an automation script validate a server’s TLS certificate when connecting securely to an API?

  1. To verify the server’s identity and help prevent interception
  2. To increase the device’s CPU speed
  3. To assign VLANs automatically
  4. To create a Git repository

Correct Answer: 1

Explanation

Validating a TLS certificate helps an automation client verify that it is communicating with the intended server and that the certificate can be trusted according to the configured trust chain. This helps protect against certain man-in-the-middle attacks. Disabling certificate validation may make testing easier in some environments, but it reduces security and should not normally be used as a production solution. TLS certificate validation has no relationship to CPU speed, VLAN assignment, or Git repository creation. Therefore, verifying server identity and trust is the correct purpose.

Question 273

Which YANG statement is commonly used to define a reusable data type?

  1. namespace
  2. typedef
  3. notification
  4. container

Correct Answer: 2

Explanation

The YANG typedef statement is used to define a reusable type based on an existing type. This allows a model designer to create a custom type that can be reused throughout a YANG model. For example, a custom type can define restrictions or characteristics that are relevant to a particular configuration value. A container organizes related data nodes, while notification defines event information. Namespace information identifies the XML namespace associated with a module. Therefore, typedef is the correct YANG statement for defining reusable data types.

Question 274

In YANG, what is the primary purpose of a must statement?

  1. To define an additional validation constraint
  2. To create a Git branch
  3. To establish an SSH connection
  4. To define an API endpoint

Correct Answer: 1

Explanation

A YANG must statement defines a constraint that must be satisfied for the associated data to be considered valid. It uses an XPath expression to evaluate a condition based on the data tree. This allows a YANG model to enforce relationships or validation rules beyond basic data types. For example, a model can require one value to satisfy a condition based on another value. A must statement does not create API endpoints, Git branches, or SSH sessions. Therefore, defining an additional validation constraint is the correct answer.

Question 275

Which YANG node type is used to organize related child data nodes?

  1. leaf
  2. leaf-list
  3. container
  4. typedef

Correct Answer: 3

Explanation

A YANG container is used to group related child data nodes into a logical structure. Containers help organize configuration and operational data within a YANG model. A leaf represents a single value, while a leaf-list represents a collection of scalar values. A typedef defines a reusable data type rather than a hierarchical data container. In network automation, understanding YANG hierarchy is important because protocols such as NETCONF and RESTCONF use modeled data structures based on YANG. Therefore, container is the correct answer.

Question 276

Which NETCONF operation is commonly used to retrieve configuration and state information from a device?

  1. <get>
  2. <commit>
  3. <lock>
  4. <close-session>

Correct Answer: 1

Explanation

The NETCONF <get> operation is used to retrieve configuration and state information from a device, depending on the datastore or filter involved. Automation applications can use NETCONF to request structured information instead of relying on CLI screen scraping. <commit> applies candidate configuration changes, while <lock> controls access to a datastore. <close-session> terminates a NETCONF session. NETCONF operations are exchanged using XML-based RPC messages. Therefore, <get> is the correct operation for retrieving information.

Question 277

What is the purpose of a NETCONF datastore lock?

  1. To prevent conflicting changes by multiple clients
  2. To restart the network device
  3. To change the device hostname
  4. To encrypt XML messages

Correct Answer: 1

Explanation

A NETCONF datastore lock helps prevent conflicting configuration changes by multiple clients accessing the same datastore. Locking is useful when an automation workflow needs exclusive access while making a sequence of changes. This can reduce the possibility that another client modifies the same configuration during the operation. A datastore lock does not restart the device, change its hostname, or encrypt XML messages. NETCONF security and transport protection are handled through other mechanisms, such as secure transport. Therefore, preventing conflicting concurrent changes is the correct answer.

Question 278

Which technology is commonly associated with streaming structured network telemetry using a model-driven approach?

  1. FTP
  2. gNMI
  3. Telnet
  4. TFTP

Correct Answer: 2

Explanation

gNMI, or gRPC Network Management Interface, is commonly associated with modern model-driven network management and telemetry. It can be used to retrieve and subscribe to structured data modeled using technologies such as YANG. Streaming telemetry allows devices to continuously send selected operational data to a monitoring or automation system rather than requiring the system to repeatedly poll every value. FTP, Telnet, and TFTP serve different purposes and are not the primary technologies associated with modern model-driven streaming telemetry. Therefore, gNMI is the correct answer.

Question 279

What is a major characteristic of model-driven telemetry compared with traditional periodic polling?

  1. It can stream selected operational data to a collector
  2. It requires manual CLI commands for every update
  3. It only transfers configuration files
  4. It disables network monitoring

Correct Answer: 1

Explanation

Model-driven telemetry can stream selected operational data from network devices to a telemetry collector or monitoring system. Instead of repeatedly requesting each metric through traditional polling, a consumer can subscribe to specific modeled data and receive updates as they are produced. This can provide more timely visibility into network conditions and can reduce unnecessary repeated polling. Model-driven telemetry is not limited to configuration files and does not require manually entering CLI commands for every update. Therefore, streaming selected operational data to a collector is the correct characteristic.

Question 280

Which Git command downloads changes from a remote repository and integrates them into the current branch?

  1. git clone
  2. git status
  3. git pull
  4. git branch

Correct Answer: 3

Explanation

The git pull command retrieves changes from a remote repository and integrates them into the current local branch, typically by performing a fetch followed by a merge or another configured integration strategy. This is useful in collaborative automation projects where multiple engineers update infrastructure code. git clone creates a local copy of a repository, git status displays the working-tree state, and git branch manages or displays branches. Therefore, git pull is the correct command for downloading and integrating remote changes into the current branch.