Courseiva

CCNA Network Programmability Foundation Questions

72 questions · Network Programmability Foundation · All types, answers revealed

1
MCQmedium

You are automating Cisco Adaptive Security Appliance (ASA) configurations using NETCONF. Which protocol data store should you target to ensure your changes take effect immediately in the running configuration?

A.running
B.intended
C.candidate
D.operational
E.startup
AnswerA

NETCONF exposes distinct datastores; the running datastore holds the active configuration currently in effect on the device. Targeting it applies changes immediately without a separate commit step, unlike candidate, which requires explicit commit to take effect.

Why this answer

In NETCONF, the 'running' data store represents the currently active configuration on the device.

2
Multi-Selectmedium

Which THREE actions are essential when implementing a Python-based automation script that interacts with a Cisco REST API using the 'requests' library to ensure secure communication?

Select 3 answers
A.Always ensure the connection uses the 'https' protocol scheme in the URL.
B.Store API credentials in plain text in the script for easy portability.
C.Disable SSL verification for all production API connections.
D.Use environment variables or a vault to store sensitive authentication tokens.
E.Use the 'verify=True' parameter in requests to validate the server's SSL certificate.
AnswersA, D, E

Cisco REST APIs expose their management endpoints over TLS, so specifying the https scheme ensures credentials and payloads travel encrypted rather than in cleartext. This satisfies the stem's secure-communication requirement by preventing plaintext HTTP exposure.

Why this answer

Option A is correct because Cisco REST APIs (e.g., DNA Center, IOS-XE RESTCONF) require TLS, so the URL must use the https:// scheme to encrypt credentials and payloads in transit rather than sending them in cleartext over http://. Option D is correct because keeping tokens and passwords out of source code via environment variables or a secrets vault prevents credential leakage through version control, logs, or shared scripts. Option E is correct because requests defaults to verify=True, and explicitly passing verify=True ensures the server's certificate chain and hostname are validated against trusted CAs, preventing man-in-the-middle attacks.

Option B is wrong because hardcoding credentials in plain text exposes them to anyone with file or repository access. Option C is wrong because disabling SSL verification (verify=False) removes certificate validation and enables MITM interception, which is unacceptable in production.

3
MCQhard

When using the Cisco ISE REST API, what does the 'ERAS' (External RESTful Services) framework provide?

A.Encrypted SSH tunneling for CLI.
B.CRUD operations on ISE resources via REST.
C.Automated firmware updates.
D.Real-time threat intelligence feeds.
AnswerB

ERAS exposes ISE's internal data model through standards-based REST endpoints, letting automation scripts create, read, update and delete objects such as endpoints, identity groups and network devices. This satisfies the stem's requirement for programmatic CRUD access to ISE resources rather than GUI-only administration.

Why this answer

ERAS enables external applications to perform CRUD operations on ISE resources like endpoints and policies.

4
Multi-Selectmedium

Which THREE of the following are valid HTTP methods supported by REST APIs for managing network configurations?

Select 3 answers
A.DELETE
B.TRACE
C.CONNECT
D.POST
E.GET
AnswersA, D, E

DELETE is a valid REST HTTP method used to remove an existing network configuration resource identified by its URI. This satisfies the stem's requirement for methods managing configurations, alongside GET, POST, PUT and PATCH, each mapping to a distinct CRUD operation.

Why this answer

GET (E) is correct because it is the standard HTTP method for retrieving or reading network configuration resources from a REST API without modifying them. POST (D) is correct because it is used to create new configuration resources or submit data to the server for processing. DELETE (A) is correct because it removes an existing network configuration resource identified by its URI.

TRACE (B) is not a REST resource-management method; it is a diagnostic method that echoes the received request back to the client. CONNECT (C) is also not used for managing configurations; it establishes a tunnel to a server, typically for HTTPS through a proxy.

Exam trap

SAUTO often tests whether candidates can distinguish HTTP methods used for REST resource management (GET, POST, PUT, PATCH, DELETE) from transport/diagnostic methods (TRACE, CONNECT, OPTIONS, HEAD) — the trap is picking any valid HTTP verb without checking its REST role.

5
MCQmedium

You are designing a YANG model for a custom security policy. Which statement accurately describes the function of a 'leaf' node in YANG?

A.It defines a list of instances.
B.It acts as a container for other nodes.
C.It contains a single value and no child nodes.
D.It defines a choice between multiple alternatives.
AnswerC

A leaf holds exactly one value of a defined type and cannot contain child nodes, unlike containers or lists which organise hierarchy. This matches the stem's description of a single-value node, making it the accurate statement about leaf behaviour in YANG.

Why this answer

In YANG, a leaf node represents a single scalar value such as a string, integer, or boolean, and it cannot have child nodes. It is the basic building block for defining data attributes in a model, analogous to a variable or field.

Exam trap

The trap is confusing YANG node types—candidates may pick 'container' or 'list' for a leaf, not realizing a leaf is strictly a single value with no children.

How to eliminate wrong answers

Option A is wrong because a list of instances is defined by a 'list' node, not a leaf. Option B is wrong because a container for other nodes is a 'container' node, which can hold leaves, lists, and other containers. Option D is wrong because a choice between alternatives is defined by a 'choice' node, which groups multiple cases.

6
Multi-Selectmedium

Which TWO of the following are true regarding the 'requests' library's exception handling?

Select 2 answers
A.Exceptions are ignored by default
B.JSONDecodeError is an HTTP request error
C.ConnectionError is raised for successful connections
D.Timeout exceptions occur when the server takes too long to respond
E.RequestException is the base class for all library exceptions
AnswersD, E

The requests library raises a Timeout exception when a connection or read operation exceeds the configured timeout without a response. This distinguishes it from ConnectionError, which covers network-level failures rather than a server simply responding too slowly.

Why this answer

Option D is correct because the requests library raises a Timeout exception (specifically ConnectTimeout or ReadTimeout, both subclasses of Timeout) when a server fails to respond within the specified timeout period, indicating the server is taking too long. Option E is correct because RequestException is the base class from which all other requests exceptions inherit, including ConnectionError, Timeout, HTTPError, TooManyRedirects, and JSONDecodeError, allowing a single except RequestException clause to catch any library-specific error. Option A is incorrect because requests does not ignore exceptions by default; errors such as connection failures or timeouts propagate unless explicitly caught.

Option B is incorrect because JSONDecodeError is raised when response.json() fails to parse invalid JSON, not an HTTP request error (HTTP errors are represented by HTTPError via raise_for_status()). Option C is incorrect because ConnectionError is raised when a connection cannot be established, not for successful connections.

Exam trap

The trap is assuming requests raises exceptions on HTTP error status codes automatically or that JSONDecodeError belongs to the requests exception family; candidates conflate HTTP status handling with Python exception handling.

7
MCQhard

You are writing a script that interacts with Cisco DNA Center. You need to keep the session alive after authentication. Which token is commonly used for subsequent API calls?

A.X-Auth-Token
B.OAuth Refresh Token
C.Session ID
D.Basic Auth Header
AnswerA

Cisco DNA Center returns an X-Auth-Token header after successful authentication, and subsequent API calls must include this token to satisfy the session-persistence requirement. It is passed as a request header rather than a cookie, so scripts must capture and resend it on every call.

Why this answer

Cisco DNA Center's REST API uses a token-based authentication scheme where the client first authenticates via POST to /dna/system/api/v1/auth/token with Basic Auth credentials, and the response contains a token. Subsequent API calls must include this token in the X-Auth-Token HTTP header to maintain the session. This is the standard mechanism documented by Cisco for DNA Center automation.

Exam trap

SAUTO often tests whether candidates confuse DNA Center's X-Auth-Token scheme with OAuth 2.0 or session cookies — the key is that DNA Center uses a custom token header, not standard OAuth.

How to eliminate wrong answers

Option B is wrong because OAuth refresh tokens are used in OAuth 2.0 flows, which DNA Center does not use for its native API authentication — DNA Center uses a simple token-based scheme. Option C is wrong because 'Session ID' is a generic term and not the specific header DNA Center expects; DNA Center does not use JSESSIONID-style cookies for API auth. Option D is wrong because Basic Auth Header is only used for the initial token request, not for subsequent API calls — sending Basic Auth on every call is inefficient and not the documented approach.

8
MCQmedium

Which JSON-related error occurs if you try to parse a string that is missing a closing brace?

A.ValueError
B.JSONDecodeError
C.SyntaxError
D.TypeError
AnswerB

Python's json module raises JSONDecodeError when the parser encounters malformed syntax, such as a missing closing brace, because the token stream ends before the object is terminated. This is the specific exception type the stem describes.

Why this answer

JSONDecodeError is the specific exception raised by Python's json module when parsing invalid JSON, such as a string missing a closing brace. It is a subclass of ValueError and provides detailed information about the error location.

Exam trap

SAUTO often tests the confusion between ValueError and JSONDecodeError — candidates may pick ValueError because it is the parent class, but the question asks for the specific error, which is JSONDecodeError.

How to eliminate wrong answers

Option A is wrong because ValueError is a broader exception that JSONDecodeError inherits from; while a JSONDecodeError is a ValueError, the question asks for the specific error, and JSONDecodeError is more precise. Option C is wrong because SyntaxError is raised by the Python interpreter for invalid Python syntax, not for JSON parsing errors. Option D is wrong because TypeError occurs when an operation is performed on an inappropriate type (e.g., trying to parse a non-string), not for malformed JSON.

9
MCQeasy

What is the primary advantage of using JSON over XML when interacting with modern Cisco security APIs?

A.JSON allows for better schema validation.
B.JSON is more concise and reduces bandwidth and parsing latency.
C.JSON supports more complex data types.
D.JSON is natively supported by the Cisco CLI.
AnswerB

JSON's compact key-value structure eliminates XML's verbose closing tags, cutting payload size and the parsing overhead modern Cisco security APIs incur. This directly satisfies the stem's bandwidth and latency constraint, since smaller responses transmit faster and require less CPU to deserialise than equivalent XML documents.

Why this answer

JSON is a lightweight data-interchange format that uses a more compact syntax than XML, with less verbose markup and no closing tags. This reduces payload size, which lowers bandwidth consumption and decreases parsing latency, making it preferable for modern API interactions, especially in high-volume or latency-sensitive automation. Cisco security APIs (e.g., Firepower, Umbrella, ISE) increasingly support JSON as the primary or preferred encoding.

Exam trap

SAUTO often tests whether candidates assume JSON is 'better' in every dimension — the trap is picking schema validation or complex data types, which are actually XML strengths, rather than the correct advantage of conciseness and lower parsing overhead.

How to eliminate wrong answers

Option A is wrong because XML has stronger native schema validation capabilities (XSD, DTD) than JSON — JSON schema validation exists but is less mature and less widely adopted in legacy systems. Option C is wrong because XML actually supports more complex data types and structures (attributes, namespaces, mixed content) than JSON, which has a simpler type system. Option D is wrong because neither JSON nor XML is natively supported by the Cisco CLI — CLI is text-based and does not parse structured data formats; APIs handle JSON/XML.

10
MCQmedium

When designing an automation workflow using Postman, which feature allows you to dynamically pass a value from the response of one request to the input of a subsequent request?

A.Pre-request Scripts
B.Mock Servers
C.Request Headers
D.Collection Variables
AnswerD

Collection Variables persist at collection scope, so a script can capture a value from one response and reference it in later requests via {{variable}} syntax, satisfying the requirement to chain requests dynamically within the same Postman collection.

Why this answer

Collection variables in Postman are variables that persist across requests within a collection and can be set dynamically from response data using scripts. By extracting a value from a response (e.g., a token or ID) and assigning it to a collection variable, you can reference that variable in subsequent requests, enabling dynamic data flow. This is the standard way to chain requests in Postman.

Exam trap

The trap is thinking that pre-request scripts or headers alone can pass data between requests, but the actual mechanism for dynamic value transfer is variables, specifically collection variables when the value must be available across multiple requests.

How to eliminate wrong answers

Option A is wrong because pre-request scripts run before a request is sent and are used to set up data or modify the request, but they do not inherently pass values from a previous response unless combined with variables. Option B is wrong because mock servers simulate API responses for testing and do not pass data between real requests. Option C is wrong because request headers are static metadata sent with a request; they can contain variables, but they are not the feature that dynamically passes values from one response to another.

11
MCQmedium

While testing a REST API call in Postman for Cisco ISE, you receive a 403 Forbidden error. What is the most likely cause of this issue in the context of network programmability?

A.The authentication token has expired.
B.The server is currently undergoing maintenance.
C.The API endpoint URL is incorrectly formatted.
D.The API user account lacks the necessary roles or privileges to perform the requested operation.
AnswerD

A 403 response means the request was authenticated but the identity is not authorised, so the API user account lacks the roles or privileges required for that operation. Credentials are valid; RBAC permissions on Cisco ISE are the constraint being violated.

Why this answer

A 403 Forbidden response means the server understood the request but refuses to authorize it. In Cisco ISE's REST API context, this almost always means the authenticated API user lacks the RBAC role or privilege required for the requested operation — for example, a read-only account attempting a POST to create a network device.

Exam trap

SAUTO often tests whether candidates confuse 401 Unauthorized (authentication failure, e.g., expired token) with 403 Forbidden (authorization failure, e.g., insufficient role), since both indicate access problems but have different root causes.

How to eliminate wrong answers

Option A is wrong because an expired token produces a 401 Unauthorized, not a 403 Forbidden — the server would reject authentication before authorization. Option B is wrong because server maintenance typically yields 503 Service Unavailable or 500-level errors, not 403. Option C is wrong because a malformed URL produces 400 Bad Request or 404 Not Found, not 403 Forbidden.

12
MCQeasy

Which statement best describes JSON?

A.It is specific to JavaScript and cannot be used in Python.
B.It is a lightweight, language-independent data format.
C.It is a binary format for faster processing.
D.It is a schema language for XML.
AnswerB

JSON encodes structured data as text using objects and arrays, and parsers exist for virtually every language, satisfying the language-independence requirement. Unlike XML it imposes no schema or verbosity, keeping payloads compact for API transport between heterogeneous systems.

Why this answer

JSON (JavaScript Object Notation) is a lightweight, text-based, language-independent data interchange format. Despite its name, it is not tied to JavaScript and is widely used across languages including Python, Java, and Go.

Exam trap

SAUTO often tests the misconception that JSON is JavaScript-specific or binary, when it is actually a language-independent text format.

How to eliminate wrong answers

Option A is wrong because JSON is language-independent and is natively supported in Python via the json module. Option C is wrong because JSON is a text format, not binary; binary formats like Protocol Buffers or MessagePack serve different use cases. Option D is wrong because JSON is not a schema language for XML; XML schema languages include XSD and DTD.

13
Multi-Selecteasy

Which THREE of the following are common benefits of using REST APIs for network automation?

Select 3 answers
A.Automatic optimization of routing tables
B.Reduced configuration errors
C.Increased operational efficiency
D.Scalability for large deployments
E.Replacement of all network hardware
AnswersB, C, D

REST APIs enforce a defined schema and validate input before changes are applied, so malformed or mistyped commands are rejected rather than pushed to devices. This structured validation replaces error-prone manual CLI entry, satisfying the reduced configuration errors benefit.

Why this answer

Option B (Reduced configuration errors) is correct because REST APIs let automation push structured, validated, programmatic changes (typically JSON over HTTPS) instead of error-prone manual CLI typing, eliminating typos and inconsistent commands. Option C (Increased operational efficiency) is correct because REST APIs enable repeatable, scripted workflows that apply changes across many devices in seconds, replacing slow manual per-device configuration. Option D (Scalability for large deployments) is correct because REST APIs are stateless, HTTP-based, and easily parallelized, so tools like Ansible, Python requests, or CI/CD pipelines can manage hundreds or thousands of devices consistently.

Option A (Automatic optimization of routing tables) is not a benefit of REST APIs themselves; routing optimization is performed by routing protocols such as OSPF, EIGRP, or BGP, not by the API transport. Option E (Replacement of all network hardware) is incorrect because REST APIs are a software interface for managing existing devices and cannot substitute for physical or virtual network hardware.

Exam trap

The trap is confusing automation benefits with inherent capabilities; candidates might think REST APIs automatically optimize routing or replace hardware, but they are merely enablers.

14
MCQeasy

In an HTTP request, what does the '201 Created' status code signify?

A.The resource was created successfully.
B.The request was accepted for processing but is not finished.
C.The request was received and processed successfully.
D.The request resulted in a temporary redirect.
AnswerA

The 201 status code is returned by the server after a request successfully creates a new resource, typically following POST or PUT. This confirms the resource now exists, satisfying the stem's question about what 201 Created signifies in an HTTP response.

Why this answer

The 201 Created status code indicates that the request succeeded and a new resource was created as a result — typically returned in response to a POST or PUT that creates a resource. The response often includes a Location header pointing to the new resource's URI.

Exam trap

SAUTO often tests whether candidates confuse 201 Created with 200 OK or 202 Accepted, since all three indicate success but differ in whether a resource was created, processed, or merely accepted for later processing.

How to eliminate wrong answers

Option B is wrong because 'accepted for processing but not finished' is 202 Accepted, used for asynchronous operations. Option C is wrong because 'received and processed successfully' is 200 OK, the general success code for requests that don't create a resource. Option D is wrong because a temporary redirect is 307 Temporary Redirect (or 302 Found), which is a 3xx code, not 2xx.

15
MCQmedium

You are writing a Python script to retrieve a list of network objects from a Cisco Firepower Management Center (FMC) using its REST API. The script authenticates with a username and password and must maintain the session for subsequent requests. Which authentication mechanism should the script use to obtain a token that is valid for the duration of the session?

A.Use OAuth 2.0 with a client ID and client secret to obtain a bearer token from the FMC authorization server.
B.Configure an API key in the FMC GUI and include it as a query parameter in each request.
C.Send a POST request to /api/fmc_platform/v1/auth/generatetoken with the username and password, then use the returned X-auth-access-token header for subsequent requests.
D.Use HTTP Basic Authentication with the username and password in the Authorization header for each request.
AnswerC

The FMC REST API provides a token generation endpoint at /api/fmc_platform/v1/auth/generatetoken. A POST with valid credentials returns headers including X-auth-access-token and X-auth-refresh-token. The access token must be included in subsequent requests to authenticate. This is the standard method for session-based authentication with FMC.

Why this answer

The FMC REST API uses token-based authentication. A POST to the generatetoken endpoint with credentials returns an access token that must be included in the X-auth-access-token header for subsequent requests. This token remains valid for a limited time and can be refreshed.

Basic Auth, OAuth, and API keys are not supported for FMC authentication.

Exam trap

The trap here is assuming that FMC supports standard authentication methods like Basic Auth or OAuth, when it actually uses a custom token endpoint.

16
MCQmedium

You are troubleshooting a Python script that uses the 'requests' library. The script fails with a 'SSLError'. What is the most likely cause?

A.The API endpoint is down.
B.The authentication token is invalid.
C.The server certificate is self-signed or invalid.
D.The JSON payload contains invalid characters.
AnswerC

SSLError arises during TLS verification when the server's certificate cannot be validated against trusted certificate authorities, typically because it is self-signed, expired, or hostname-mismatched. The requests library rejects the handshake rather than transmitting data insecurely.

Why this answer

An SSLError occurs when the client cannot verify the SSL certificate presented by the server.

17
Multi-Selecthard

Which THREE of the following are common benefits of using NETCONF for device management?

Select 3 answers
A.Structured data format (XML)
B.Native GUI rendering
C.Transaction-based configuration commits
D.Logical separation of datastores
E.Real-time video streaming support
AnswersA, C, D

NETCONF encodes configuration and state data in XML, giving a hierarchical, schema-defined structure that YANG models validate. This satisfies the stem's requirement for a common benefit by enabling programmatic parsing, filtering and atomic edits, unlike unstructured CLI screen-scraping, so automation tools can reliably read and modify specific configuration nodes.

Why this answer

NETCONF is a standardized network management protocol that uses XML-encoded messages, so option A is correct because its structured XML data format enables machine-readable, schema-validated configuration and state data that is easy to parse and automate. Option C is correct because NETCONF supports transaction-based configuration commits, allowing changes to be applied atomically with commit, confirm-commit, and rollback capabilities so a failed change does not leave the device in a partial state. Option D is correct because NETCONF logically separates datastores such as running, candidate, startup, and intended, which lets operators stage, validate, and roll back configurations independently of the active running configuration.

Option B is not a NETCONF benefit because NETCONF is a programmatic protocol and does not provide native GUI rendering, and option E is unrelated since NETCONF is designed for configuration and state management, not real-time video streaming.

Exam trap

SAUTO often tests the confusion between NETCONF's structured data and other protocols like RESTCONF, or mistakenly attributing GUI or streaming capabilities to NETCONF.

18
MCQmedium

A network engineer is testing a Cisco ASA REST API call using Postman. The request returns a 401 Unauthorized status code. What is the most likely cause of this error?

A.The requested resource does not exist on the ASA.
B.The JSON payload is malformed.
C.The ASA API service is disabled in the configuration.
D.The authentication token is missing or expired.
AnswerD

A 401 Unauthorized response indicates the request lacked valid credentials, so the missing or expired authentication token is the cause. The ASA REST API requires a valid token in the request header, satisfying the stem's scenario of an unauthenticated Postman call.

Why this answer

A 401 Unauthorized response from the Cisco ASA REST API indicates that the request lacks valid authentication credentials. The ASA REST API requires a valid authentication token, typically obtained by first calling the authentication endpoint with a username and password, and then including that token in the header of subsequent requests. If the token is missing, malformed, or expired, the ASA returns 401.

Exam trap

The trap is assuming that any error means the resource is missing or the payload is wrong, but 401 specifically points to authentication, so candidates must distinguish between 401, 403, 404, and 400.

How to eliminate wrong answers

Option A is wrong because a nonexistent resource would typically return 404 Not Found, not 401 Unauthorized. Option B is wrong because a malformed JSON payload would usually result in a 400 Bad Request error, not an authentication failure. Option C is wrong because if the ASA API service were disabled, the connection would likely be refused or return a 404 or 503, not a 401; the 401 specifically points to an authentication issue.

19
MCQmedium

When performing an API audit, you want to ensure that all requests are logged. In Postman, which feature can you use to view the raw HTTP request and response details?

A.Postman Console
B.Runner
C.History tab
D.API Documentation
AnswerA

The Postman Console records the raw HTTP request and response, including headers and bodies, for every call made during a session. This satisfies the audit requirement to verify that all requests are logged with full wire-level detail.

Why this answer

The Postman Console is the dedicated debugging tool that captures and displays the raw HTTP request and response details, including headers, body, status codes, and timing information for every request sent. It logs all network activity in real time, making it the correct feature for auditing whether requests are being logged and inspecting their exact wire format.

Exam trap

The trap here is confusing Postman's request-management features (History, Runner, Documentation) with its debugging/observability feature (Console) — candidates often pick History because it 'shows requests,' but only the Console reveals raw HTTP request and response details.

How to eliminate wrong answers

Option B is wrong because the Runner is a collection execution tool used to run multiple requests in sequence or with data files (iterations), not to inspect raw HTTP traffic. Option C is wrong because the History tab only shows a list of previously sent requests with basic metadata and allows resending them, but does not expose full raw HTTP request/response details. Option D is wrong because API Documentation is a feature for generating and publishing human-readable documentation from collections, not for viewing live HTTP traffic.

20
MCQhard

When using the 'ncclient' library in Python, what is the primary purpose of the 'manager.connect()' method?

A.To parse the YANG model.
B.To convert XML to JSON.
C.To open an SSH-based NETCONF session.
D.To validate the configuration syntax.
AnswerC

The `manager.connect()` method establishes the SSH transport that NETCONF requires, opening a session to the device on port 830. This satisfies the stem's constraint of using `ncclient`, whose Manager class depends on this SSH-based session before any RPCs, such as `<get-config>`, can be issued.

Why this answer

In ncclient, manager.connect() establishes a NETCONF session over SSH (or another transport) to the target device, returning a manager object used for subsequent RPCs like get_config or edit_config. It handles the SSH transport, capability exchange, and session setup. It does not parse YANG, convert XML to JSON, or validate syntax.

Exam trap

SAUTO often tests whether candidates conflate session establishment (connect) with data manipulation (parsing YANG, converting XML/JSON) — the trap is picking a transformation task instead of the connection method.

How to eliminate wrong answers

Option A is wrong because YANG model parsing is done by separate tools (e.g., pyang) or libraries, not by manager.connect(). Option B is wrong because XML-to-JSON conversion is a data transformation task handled by libraries like xmltodict, not by the NETCONF session setup method. Option D is wrong because configuration syntax validation is performed by the device or by YANG validation tools, not by the connect() method.

21
Multi-Selectmedium

Which THREE of the following are valid methods within a Python script to handle potential errors when making API calls to a Cisco platform?

Select 3 answers
A.Using a try-except block to catch 'requests.exceptions.RequestException'.
B.Using 'response.raise_for_status()' to raise an exception for 4xx/5xx HTTP errors.
C.Hardcoding a 60-second sleep timer after every API call to ensure the server is ready.
D.Ignoring all exceptions to allow the script to continue running indefinitely.
E.Checking the 'status_code' of the response object after the request.
AnswersA, B, E

Wrapping the API call in try-except lets the script catch requests.exceptions.RequestException, the base class covering connection, timeout and HTTP errors. This satisfies the requirement to handle failures gracefully instead of crashing when a Cisco platform is unreachable or returns an error.

Why this answer

Option A is correct because wrapping API calls in a try-except block that catches 'requests.exceptions.RequestException' handles the base exception class for all requests-related errors, including ConnectionError, Timeout, and HTTPError, making it the standard Pythonic way to manage API call failures. Option B is correct because 'response.raise_for_status()' inspects the HTTP status code and raises an 'HTTPError' (a subclass of RequestException) whenever the server returns a 4xx client error or 5xx server error, allowing the script to detect and react to unsuccessful responses. Option E is correct because explicitly checking the 'status_code' attribute of the response object (e.g., comparing it to 200 or using it in conditional logic) lets the script branch on success or failure without relying on exceptions.

Option C is not a valid error-handling method because a fixed 60-second sleep does not detect, catch, or respond to errors—it merely delays execution and cannot distinguish success from failure. Option D is not valid because suppressing all exceptions with a bare except or pass hides failures, prevents proper error handling, and can cause the script to loop indefinitely with corrupted state or silent data loss.

Exam trap

SAUTO often tests the confusion between error handling and error suppression — candidates may think ignoring exceptions (Option D) is acceptable for resilience, but it actually hides failures and corrupts data.

22
MCQeasy

When working with Cisco security APIs, which authentication mechanism is most commonly required to maintain a session after the initial credentials have been exchanged?

A.SSH Public Key
B.IP Whitelisting
C.Bearer Token
D.Basic Auth
AnswerC

After exchanging credentials, Cisco security APIs typically return a bearer token that must be included in the Authorization header of subsequent requests. This token maintains the authenticated session without resending credentials, satisfying the requirement to sustain a session after initial authentication.

Why this answer

Cisco security APIs (such as Firepower, ISE, and Umbrella) typically authenticate initial credentials and then return a token that must be included as a Bearer token in subsequent requests to maintain the session. This token-based flow avoids resending credentials on every call and is the standard session mechanism. Bearer tokens are passed in the Authorization header and validated on each request.

Exam trap

SAUTO often tests the misconception that Basic Auth maintains a session, when in fact Cisco APIs require exchanging credentials for a Bearer token that must be presented on each subsequent request.

How to eliminate wrong answers

Option A is wrong because SSH public key authentication is used for CLI/management access to devices, not for REST API session maintenance. Option B is wrong because IP whitelisting is a network access control, not an authentication mechanism that maintains a session after credentials are exchanged. Option D is wrong because Basic Auth sends credentials on every request and does not establish or maintain a session token; it is also increasingly deprecated in favor of token-based auth.

23
MCQmedium

When managing Cisco devices via RESTCONF, what is the benefit of using the 'PATCH' method instead of 'PUT'?

A.PATCH performs partial updates to a resource.
B.PUT is deprecated in RESTCONF.
C.PATCH is only for JSON, not XML.
D.PATCH is faster.
AnswerA

PATCH transmits only the changed leaf nodes, so the device merges them into the existing configuration. PUT replaces the entire target resource, meaning any omitted fields revert to defaults or are removed. PATCH therefore satisfies the stem's requirement for partial updates without disturbing untouched settings.

Why this answer

In RESTCONF (RFC 8040), PATCH is used to perform a partial modification of a resource, allowing the client to send only the fields that need to change. PUT, by contrast, replaces the entire target resource with the representation in the request body, meaning any omitted fields are reset or removed. PATCH is therefore the correct choice when you want to update a subset of configuration without disturbing other existing settings.

Exam trap

The trap here is assuming PATCH is 'faster' or that PUT is deprecated — the exam wants you to recognize the semantic difference: PATCH = partial merge, PUT = full replacement.

How to eliminate wrong answers

Option B is wrong because PUT is not deprecated in RESTCONF — it remains a valid method defined in RFC 8040 for replacing a resource, and is still widely used. Option C is wrong because PATCH is not restricted to JSON; RESTCONF supports both JSON (application/yang-data+json) and XML (application/yang-data+xml) encodings, and PATCH works with either media type. Option D is wrong because PATCH is not inherently faster than PUT — the performance difference depends on payload size and server processing, and the primary benefit of PATCH is semantic (partial update), not speed.

24
Multi-Selecthard

Which TWO of the following are true regarding YANG models?

Select 2 answers
A.YANG supports hierarchical data modeling
B.YANG models define the structure of data for NETCONF and RESTCONF
C.YANG is a proprietary Cisco language
D.YANG is only used for Cisco IOS-XE
E.YANG uses binary data formats exclusively
AnswersA, B

YANG's tree-structured schema natively represents nested configuration and state data, letting modules model device hierarchies such as interfaces containing addresses. This directly satisfies the hierarchical data modelling requirement, unlike flat SNMP MIB tables. Its container, list and leaf constructs enforce that structure, enabling NETCONF and RESTCONF to address nodes by path.

Why this answer

Option A is correct because YANG (RFC 6020/7950) is a data modeling language that organizes configuration and state data into a tree-structured, hierarchical schema with containers, lists, and leaves. Option B is correct because YANG modules define the syntax and semantics of data manipulated by NETCONF (RFC 6241) and RESTCONF (RFC 8040), which use YANG-modeled datastores and payloads. Option C is incorrect because YANG is an open IETF standard, not a proprietary Cisco language.

Option D is incorrect because YANG is vendor-neutral and used across many platforms and tools, not only Cisco IOS-XE. Option E is incorrect because YANG models are expressed in a human-readable text syntax (and can be represented in XML/JSON encodings), not exclusively binary formats.

Exam trap

The trap is vendor bias — candidates who work mainly with Cisco gear assume YANG is Cisco-proprietary or IOS-XE-only, when it is an open IETF standard spanning many vendors and platforms.

25
MCQmedium

A Python script authenticates to the Cisco Identity Services Engine (ISE) REST API and must send the credentials in a way that avoids placing them in the URL. Which approach correctly satisfies this requirement when using the requests library?

A.Store the credentials in a cookie named session and send it with the request
B.Append ?username=user&password=pass to the request URL
C.Set the Content-Type header to application/x-www-form-urlencoded and include the credentials in the body of a GET
D.Pass a tuple to the auth parameter of the request, for example requests.get(url, auth=('user','pass'))
AnswerD

The requests library's auth parameter accepts a tuple and automatically constructs a Basic authentication header from it using base64 encoding. This places the credentials in the Authorization header rather than the URL, which is exactly what the engineer needs to keep them out of query strings and server logs.

Why this answer

The requests library's auth parameter accepts a username and password tuple and generates the correct Basic Authorization header automatically. This keeps credentials out of the URL and out of query-string logging. Query parameters, form bodies on GET, and fabricated cookies are all non-standard and insecure ways to transmit credentials to the ISE REST API.

Exam trap

The trap here is believing that any transport of credentials is acceptable as long as it is encrypted, when the requirement specifically targets keeping them out of the URL.

26
MCQeasy

An engineer runs a Python script that calls the Cisco Firepower Management Center (FMC) REST API to list all access control policies. The script uses the requests library and the response object r. Which attribute of r gives the HTTP status code so the script can branch on success versus failure?

A.r.ok
B.r.status_code
C.r.reason
D.r.headers['Status']
AnswerB

The requests Response object exposes the numeric HTTP status as r.status_code, so a script can test r.status_code == 200 after a GET to the FMC /api/fmc_config/v1/domain/{domainUUID}/policy/accesspolicies endpoint. This is the canonical, vendor-neutral way to inspect the outcome of the call before attempting to parse the returned JSON body.

Why this answer

The requests library stores the numeric HTTP result on the Response object as status_code. Checking that attribute lets the script confirm a 200 before parsing the FMC JSON payload, and lets it detect 401 or 429 conditions and react appropriately. The other attributes either are not part of the HTTP status or return non-numeric data unsuitable for exact comparisons.

Exam trap

The trap here is assuming a custom header or reason phrase carries the HTTP status code when the numeric result is always available on the Response object itself.

27
MCQmedium

A security automation engineer is building a Python script that queries the Cisco Firepower Management Center (FMC) REST API to retrieve a list of intrusion policies. The engineer wants to ensure the script can handle the case where the requested resource does not exist, returning a 404 status code. Which HTTP status code class indicates a client error, and how should the script interpret a 404 response?

A.The 3xx class indicates a client error. A 404 means the resource has been permanently moved; the script should follow the redirect to the new location.
B.The 4xx class indicates a client error. A 404 means the requested resource was not found; the script should handle this by logging the error and potentially retrying with a corrected URL or skipping the resource.
C.The 2xx class indicates a client error. A 404 means the request was successful but the response body is empty; the script should continue processing as if the resource exists.
D.The 5xx class indicates a client error. A 404 means the server encountered an internal error; the script should retry the request after a delay.
AnswerB

The 4xx class of HTTP status codes indicates that the client made an error, such as a malformed request or requesting a nonexistent resource. A 404 specifically means the server could not find the requested resource. In this scenario, the script should catch the 404 and handle it gracefully, perhaps by logging and adjusting the request.

Why this answer

The 4xx class of HTTP status codes signifies client-side errors, and a 404 specifically means the requested resource was not found. When automating against the Cisco FMC REST API, a script must recognize this status and handle it appropriately, such as by logging the error and adjusting the request or skipping the missing resource. Treating it as a server error or success would lead to faulty automation logic.

Exam trap

The trap here is confusing HTTP status code classes, such as mistaking 4xx client errors for 5xx server errors or 2xx successes.

28
MCQmedium

When using the Cisco IOS-XE RESTCONF API, which header is required to tell the server the format of the payload being sent?

A.Cache-Control
B.Content-Type
C.Accept
D.Authorization
AnswerB

Content-Type declares the media type of the request body, so RESTCONF knows whether the payload is JSON or XML and parses it accordingly. Accept instead describes the desired response format, so Content-Type is the header satisfying the requirement to tell the server the format being sent.

Why this answer

In RESTCONF (and HTTP in general), the Content-Type header tells the server the media type of the request body being sent, such as application/yang-data+json or application/yang-data+xml. Without it, the server cannot correctly parse the payload, so it is the required header for declaring the format of data being transmitted to the device.

Exam trap

The trap here is confusing Content-Type (format of what you send) with Accept (format of what you receive) — candidates frequently swap these two headers under exam pressure.

How to eliminate wrong answers

Option A is wrong because Cache-Control governs caching behavior of responses, not payload format. Option C is wrong because Accept declares the media type the client wants in the response, not the format of the request body. Option D is wrong because Authorization carries credentials (Basic or token) for authentication, not content format information.

29
Multi-Selectmedium

Which THREE of the following are true about Postman environments?

Select 3 answers
A.Environments allow you to store sensitive API keys in the cloud with no security
B.Environments help organize your API collection variables
C.Environments are shared across all Postman users by default
D.Environments enable the use of dynamic variables like tokens
E.Environments allow you to switch variable values for different servers
AnswersB, D, E

Environments store variables separately from collections, letting the same collection run against different targets by swapping the active environment. This satisfies the scenario's need to organise variables by context, since collection-level variables remain fixed while environment variables change per deployment without editing the collection itself.

Why this answer

Option B is correct because Postman environments are variable scopes that let you organize and manage variables (such as base URLs, IDs, and credentials) separately from the collection itself, keeping collections portable. Option D is correct because environments support dynamic and variable-driven values, including tokens and secrets, which can be referenced via {{variable}} syntax and updated at runtime (e.g., through scripts or the token helper), enabling dynamic authentication flows. Option E is correct because a key purpose of environments is to define different value sets for the same variable names, so you can switch between environments (e.g., dev, staging, production) to point requests at different servers without editing the collection.

Option A is not correct because Postman does not store sensitive API keys with 'no security'; environment values can be marked as secret and are encrypted/synced securely, and sensitive data handling is a security concern rather than a feature. Option C is not correct because environments are not shared with all Postman users by default; they are private to the user or team unless explicitly shared within a workspace or team.

Exam trap

SAUTO often tests the misconception that environments are shared globally or insecure — candidates may think environments are public by default, but they are private unless shared, and they support secure secret variables.

30
MCQmedium

What is the primary benefit of using a REST API over manual CLI configuration for security policy deployment?

A.It ensures consistent, repeatable policy enforcement across the fleet.
B.It removes the need for firewalls.
C.It automatically encrypts all traffic.
D.It provides faster CLI access to the device.
AnswerA

REST APIs apply policies programmatically from a single definition, eliminating per-device CLI drift. This directly satisfies the stem's consistency constraint: every endpoint receives identical configuration, so enforcement is repeatable and auditable across the fleet rather than depending on manual, error-prone command entry.

Why this answer

REST APIs enable programmatic, idempotent, and version-controlled policy deployment, so the same policy can be applied consistently across hundreds of devices without human error. This consistency and repeatability across the fleet is the primary benefit over manual CLI configuration, which is error-prone and slow at scale. Automation also supports audit trails and rollback.

Exam trap

The trap is attributing security or encryption benefits to REST APIs — candidates pick 'encrypts all traffic' or 'removes firewalls' when the real benefit is consistent, repeatable automation.

How to eliminate wrong answers

Option B is wrong because REST APIs do not remove the need for firewalls — they configure and manage them; the security function still requires the firewall. Option C is wrong because REST APIs do not automatically encrypt all traffic; they use HTTPS for the API session itself, but they do not encrypt the data plane traffic passing through the firewall. Option D is wrong because REST APIs are not about faster CLI access — they replace CLI interaction with structured programmatic calls, and speed of CLI access is not the benefit.

31
MCQmedium

You are writing a Python script using the requests library to retrieve configuration from a Cisco Firepower Management Center (FMC). Which specific header must be included in your request to ensure that the server returns the response in JSON format?

A.Content-Type: text/xml
B.Authorization: Bearer <token>
C.X-Auth-Token: <token>
D.Accept: application/json
AnswerD

The `Accept: application/json` header performs content negotiation, telling the FMC's REST API which media type the client expects. This satisfies the stem's requirement for a JSON response, since the server inspects `Accept` and serialises its payload accordingly. Without it, FMC may default to XML, breaking JSON parsing in the `requests` script.

Why this answer

The Accept header tells the server what media type the client expects in the response. Setting Accept: application/json instructs the FMC REST API to return the payload in JSON format. Without it, the server may default to XML or another format.

This is standard HTTP content negotiation per RFC 7231.

Exam trap

SAUTO often tests the distinction between request headers that specify the format of the request body (Content-Type) versus those that specify the desired response format (Accept), and between authentication headers (Authorization vs. X-Auth-Token).

How to eliminate wrong answers

Option A is wrong because Content-Type: text/xml describes the format of the request body, not the desired response format, and text/xml is not the correct MIME type for JSON. Option B is wrong because Authorization: Bearer <token> is used for OAuth 2.0 bearer token authentication, but FMC uses a different authentication mechanism (X-Auth-Token). Option C is wrong because X-Auth-Token: <token> is the header used to pass the authentication token obtained from the FMC login, not to specify the response format.

32
MCQhard

When parsing a complex JSON response from a Cisco Stealthwatch API call, you need to extract the value associated with a key nested deep within the hierarchy. Which Python approach is most idiomatic and robust for this task?

A.Convert the JSON to XML and use XPath to navigate the structure.
B.Load the response into a dictionary using json.loads() and access the keys using a chain of square brackets.
C.Use string slicing with find() to locate the key.
D.Use regex patterns to extract the value directly from the raw string.
AnswerB

json.loads() converts the JSON text into native Python dictionaries and lists, after which chained square-bracket indexing navigates each nested level by key. This is the standard library's idiomatic parsing route and handles arbitrary depth without extra dependencies or schema definitions.

Why this answer

The most idiomatic and robust way to extract a nested value from a JSON response in Python is to parse it with json.loads() into a dictionary and then navigate using a chain of square brackets (e.g., data['a']['b']['c']). This leverages Python's native dictionary access and is clear, efficient, and standard practice. It also allows for error handling with try/except or using .get() for safer access.

Exam trap

SAUTO often tests whether candidates choose overly complex or fragile methods (regex, string slicing) instead of the standard library approach — the trap is underestimating the simplicity and reliability of json.loads() with dictionary access.

How to eliminate wrong answers

Option A is wrong because converting JSON to XML and using XPath is unnecessarily complex, error-prone, and not idiomatic for JSON parsing in Python. Option C is wrong because string slicing with find() is fragile and will break if the JSON structure changes or if the key appears in multiple places. Option D is wrong because regex patterns for JSON parsing are brittle and cannot handle nested structures reliably, especially with escaped characters or varying whitespace.

33
MCQhard

You are constructing an XML payload for a NETCONF <edit-config> operation. Which namespace must be included to ensure the device correctly interprets the configuration data?

A.xml:ns:netconf:edit
B.http://www.cisco.com/ns/yang/base
C.urn:ietf:params:xml:ns:yang:1
D.urn:ietf:params:xml:ns:netconf:base:1.0
AnswerD

The base NETCONF namespace, urn:ietf:params:xml:ns:netconf:base:1.0, must wrap the <edit-config> element so the device parses the operation itself as a protocol message rather than as configuration data. Without it, the RPC is unrecognised, satisfying the stem's requirement that the device correctly interpret the payload.

Why this answer

The NETCONF protocol namespace urn:ietf:params:xml:ns:netconf:base:1.0 is defined in RFC 6241 and must be used to qualify all NETCONF protocol elements, including <edit-config>, <config>, and <rpc>. Without this namespace, the device cannot distinguish NETCONF protocol operations from vendor-specific or YANG-modeled data, and the request will be rejected or misinterpreted. This namespace is the mandatory base for any NETCONF message.

Exam trap

SAUTO often tests the confusion between the NETCONF base namespace and YANG or vendor-specific namespaces, tricking candidates into selecting a YANG namespace or a fabricated one for protocol operations.

How to eliminate wrong answers

Option A is wrong because 'xml:ns:netconf:edit' is not a valid or registered XML namespace; NETCONF does not define a separate namespace for edit-config. Option B is wrong because 'http://www.cisco.com/ns/yang/base' is a vendor-specific Cisco YANG namespace, not the NETCONF protocol namespace, and would only apply to Cisco data models, not the protocol operation itself. Option C is wrong because 'urn:ietf:params:xml:ns:yang:1' is the YANG namespace used for YANG-specific attributes like 'yang:insert', not the NETCONF base namespace required for <edit-config>.

34
MCQmedium

When using the 'requests' library to call an API with a self-signed certificate, which parameter can be used to disable verification for testing?

A.cert=False
B.ssl=False
C.verify=False
D.auth=False
AnswerC

Passing `verify=False` to `requests` disables TLS certificate validation entirely, so the self-signed certificate is accepted without checking against a trusted CA bundle. This directly satisfies the testing scenario, where the certificate chain cannot be validated. Note that this suppresses verification for that call only, and urllib3 warnings appear unless explicitly silenced.

Why this answer

The 'verify=False' parameter in the requests library instructs the client to ignore SSL certificate validation errors.

35
MCQeasy

What is the purpose of the 'json.loads()' function in Python?

A.To read a JSON file from disk.
B.To convert a Python dictionary to a JSON string.
C.To parse a JSON string into a Python object.
D.To validate the structure of a JSON document.
AnswerC

json.loads() deserialises a JSON-formatted string into the equivalent Python object, such as a dict or list. This satisfies the stem's requirement, converting text received from an API response into native structures that Python code can index and manipulate.

Why this answer

'json.loads()' parses a JSON-formatted string and converts it into a Python dictionary.

36
Multi-Selecteasy

Which THREE of the following are essential components of a REST API request for a Cisco security product?

Select 3 answers
A.A predefined XML configuration file saved on the desktop.
B.HTTP Method (e.g., GET, POST, PUT, DELETE).
C.A physical serial console cable connection.
D.URI (Uniform Resource Identifier) identifying the resource.
E.Headers for authentication and data format specifications.
AnswersB, D, E

The HTTP method defines the operation the API performs on the target resource, mapping to create, read, update or delete semantics. Without it, the server cannot determine the intended action, so it forms one of the three essential components alongside the URI and headers.

Why this answer

Option B is correct because every REST API request must specify an HTTP method such as GET, POST, PUT, or DELETE, which defines the action to perform on the target resource. Option D is correct because the URI (Uniform Resource Identifier) is required to identify the specific resource being accessed, such as an endpoint on a Cisco Firepower or ISE API. Option E is correct because REST requests typically require headers to carry authentication credentials (e.g., an API token or Basic Auth) and to specify the data format via Content-Type or Accept headers.

Option A is incorrect because REST APIs use dynamically constructed JSON or XML payloads sent in the request body, not a predefined XML file saved on the desktop. Option C is incorrect because REST APIs operate over HTTP/HTTPS network connections, not through a physical serial console cable.

Exam trap

SAUTO often tests whether candidates confuse API request components with unrelated configuration artifacts or physical connections — the trap is selecting options that sound technical but are not part of the REST request structure.

37
MCQhard

A security operations team uses a Python script to poll the Cisco Stealthwatch API every 30 seconds for new alarms. The script occasionally receives HTTP 429 responses. Which change best addresses the root cause while preserving timely alarm detection?

A.Switch the script to use HTTP instead of HTTPS to reduce overhead
B.Increase the polling frequency to every 5 seconds so the script finishes before limits apply
C.Implement exponential backoff with jitter and honor the Retry-After header when present
D.Cache the last successful response locally and stop polling until an operator restarts the script
AnswerC

429 indicates the client exceeded the API rate limit. Exponential backoff with jitter spreads retries so the client does not hammer the endpoint, and honoring Retry-After respects the server's explicit guidance. This reduces 429s while still allowing the script to catch up promptly once the limit window resets.

Why this answer

HTTP 429 means the client has exceeded the allowed request rate. The correct remedy is to slow down intelligently: exponential backoff with jitter avoids synchronized retry storms, and respecting Retry-After aligns the client with the server's stated wait time. This preserves detection timeliness while staying within the API's limits.

The other options either worsen the rate problem or degrade security and availability.

Exam trap

The trap here is treating 429 as a transient network error to be retried immediately, when it is a deliberate rate-limit signal that requires backing off.

38
MCQmedium

You are writing a Python script using the Requests library to retrieve information from a Cisco FTD device. Which HTTP method should be used to ensure the operation is idempotent and does not modify the device configuration state?

A.GET
B.POST
C.PUT
D.PATCH
AnswerA

GET is defined as a safe, idempotent method: repeated identical requests return the same representation without altering device state. POST, PUT, PATCH and DELETE can all modify configuration, so GET uniquely satisfies the stem's constraint of retrieving information without changing the FTD configuration.

Why this answer

The GET method is correct because it is defined as a safe and idempotent HTTP method, meaning it should only retrieve data and never alter the state of the resource. In the context of a Cisco FTD device, using GET ensures that the script reads configuration or status information without making any changes. This aligns with the requirement to not modify the device configuration state.

Exam trap

SAUTO often tests the distinction between safe and idempotent methods, and candidates frequently confuse PUT as being safe because it is idempotent, but PUT modifies state and is therefore not safe.

How to eliminate wrong answers

Option B is wrong because POST is neither safe nor idempotent; it is used to submit data to be processed, often resulting in the creation of a new resource or a state change on the server. Option C is wrong because PUT is idempotent but not safe; it is used to replace the entire resource at a given URI, which modifies the device configuration. Option D is wrong because PATCH is used to apply partial modifications to a resource and, while it can be idempotent, it is not safe and will alter the configuration state.

39
MCQmedium

An engineer is automating a Cisco Identity Services Engine (ISE) deployment using the ERS API. The API requires a secure transport and the engineer wants to verify the server's certificate against a corporate CA bundle in a Python script. The script uses the requests library. Which code snippet correctly performs the GET request to retrieve all network devices while ensuring certificate validation?

A.requests.get('https://ise.example.com/ers/config/networkdevice', auth=('user','pass'), verify='/path/to/ca_bundle.pem')
B.requests.get('https://ise.example.com/ers/config/networkdevice', auth=('user','pass'), verify=False)
C.requests.get('https://ise.example.com/ers/config/networkdevice', auth=('user','pass'), verify=True)
D.requests.get('https://ise.example.com/ers/config/networkdevice', auth=('user','pass'), cert='/path/to/ca_bundle.pem')
AnswerA

This snippet uses the verify parameter pointing to the CA bundle, which tells requests to validate the server certificate against the provided trusted CAs. It also supplies HTTP Basic authentication, which the ISE ERS API supports. The URL is correct for listing network devices. This combination ensures secure TLS verification and successful authentication, meeting the scenario's requirement.

Why this answer

The correct approach is to pass the path to the corporate CA bundle via the verify parameter. This ensures the requests library validates the ISE server's certificate against the trusted corporate root, preventing man-in-the-middle attacks. Using verify=False disables validation, while cert is for client certificates, and verify=True uses the default bundle, which may not include the corporate CA.

Exam trap

The trap here is confusing the cert parameter with the verify parameter; cert is for client-side certificates, while verify is for server certificate validation.

40
Multi-Selectmedium

Which TWO of the following are valid components of a YANG model definition?

Select 2 answers
A.leaf
B.container
C.socket
D.interface
E.packet
AnswersA, B

A leaf is a fundamental YANG node that holds a single scalar value, such as an interface name or MTU, and cannot contain child nodes. It is a valid component of a YANG model definition, satisfying the question's requirement.

Why this answer

Option A, leaf, is correct because a leaf is a fundamental YANG node type that holds a single scalar value (such as a string, integer, or boolean) and has no child nodes, making it a core building block of any YANG module. Option B, container, is also correct because a container is a valid YANG node that groups related nodes (leaves, lists, other containers) into a subtree but holds no value of its own, and it is used to organize the data tree hierarchy. The remaining options do not belong: socket is an operating-system networking abstraction, not a YANG statement; interface is a conceptual networking entity that in YANG would be modeled via a list or container, not as a YANG component itself; and packet is a unit of data on a network, not a construct defined by the YANG modeling language.

Exam trap

SAUTO often tests whether candidates can distinguish actual YANG language keywords from common networking terms that merely appear as node names in models.

41
MCQhard

When working with NETCONF, what is the role of the <edit-config> operation?

A.It retrieves the entire configuration from the device.
B.It deletes the entire configuration.
C.It creates a new session on the device.
D.It changes the running configuration of the device.
AnswerD

NETCONF's <edit-config> operation loads configuration data into a specified target datastore, typically the running datastore, altering the device's active configuration. This distinguishes it from <get-config>, which only retrieves data, satisfying the requirement to change device state.

Why this answer

The NETCONF <edit-config> operation is used to modify the configuration datastore on a device — it can create, merge, replace, or delete configuration nodes within a target datastore such as <running>. It is the standard way to push configuration changes via NETCONF, as defined in RFC 6241.

Exam trap

SAUTO often tests whether candidates confuse <edit-config> (modify configuration) with <get-config> (retrieve configuration) or with session/transport operations, since all are part of NETCONF but serve distinct roles.

How to eliminate wrong answers

Option A is wrong because retrieving the entire configuration is the role of <get-config>, not <edit-config>. Option B is wrong because deleting the entire configuration would require <edit-config> with a 'delete' operation on the root or a specific <delete-config> operation — <edit-config> itself is a general modification operation, not a wholesale delete. Option C is wrong because session creation is handled by the NETCONF <hello> exchange and SSH transport, not by <edit-config>.

42
Multi-Selectmedium

When working with YANG data models in Cisco security automation, which TWO statements accurately describe the role of the 'leaf' and 'leaf-list' nodes?

Select 2 answers
A.A 'leaf-list' node allows for multiple instances of a specific value type.
B.A 'leaf' node can contain child nodes.
C.Both 'leaf' and 'leaf-list' support default values.
D.A 'leaf' node contains a single value of a specific type.
E.A 'leaf-list' node is used for hierarchical grouping.
AnswersA, D

A leaf-list defines a node holding multiple instances of the same data type, unlike a leaf. This satisfies the stem's requirement by describing the multi-value collection behaviour that distinguishes leaf-list from single-value leaf nodes in YANG models.

Why this answer

A 'leaf' contains a single value, while a 'leaf-list' contains a sequence of values of a specific type.

43
Multi-Selecthard

Which TWO of the following are accurate regarding the structure and usage of YANG data models?

Select 2 answers
A.All YANG models are automatically applied to the device upon being uploaded.
B.YANG models must always be written in JSON format for the device to understand them.
C.YANG models are exclusively used for RESTCONF and cannot be used with NETCONF.
D.A 'leaf-list' is used to define an array of values of the same type.
E.The 'key' statement is used within a 'list' node to uniquely identify instances.
AnswersD, E

A leaf-list defines multiple instances of a single leaf, each holding the same data type, which satisfies the stem's requirement for an array of identically typed values. Unlike a leaf, it permits repetition; unlike a container with list entries, its members are simple values without keys or child nodes.

Why this answer

Option D is correct because a leaf-list in YANG defines a collection of multiple leaf nodes that all share the same data type, effectively functioning as an array of values of that type. Option E is correct because within a YANG list node, the key statement names one or more leaf children that uniquely identify each list entry, which is required for configuration lists. Option A is wrong because uploading a YANG model does not automatically apply it; the model must be implemented or supported by the device's software and explicitly used.

Option B is wrong because YANG is a modeling language that is independent of encoding; models are typically written in YANG syntax and can be encoded in XML or JSON for NETCONF and RESTCONF. Option C is wrong because YANG models are used by both NETCONF and RESTCONF, not exclusively by RESTCONF.

Exam trap

SAUTO often tests the misconception that YANG models are tied to a specific encoding (JSON) or protocol (RESTCONF), or that they are auto-applied, when in fact YANG is protocol- and encoding-independent and requires explicit activation.

44
MCQhard

In a YANG model, which statement is used to define an operational constraint that must be true for the data to be valid?

A.must
B.mandatory
C.typedef
D.config
AnswerA

The must statement attaches a validation expression to a data node, and the server rejects any configuration or state that evaluates false. This enforces the operational constraint the stem describes, unlike type or mandatory, which govern structure rather than runtime validity.

Why this answer

In YANG, the 'must' statement defines a constraint expression that must evaluate to true for the data to be considered valid — it is used to enforce semantic/operational rules beyond simple type checking. For example, 'must "../type = 'vlan'"' ensures a dependent leaf has a specific value.

Exam trap

SAUTO often tests whether candidates confuse 'must' (XPath-based validation constraint) with 'mandatory' (presence requirement) or 'when' (conditional node existence), since all three relate to validity but operate differently.

How to eliminate wrong answers

Option B is wrong because 'mandatory' only specifies whether a node must be present in the data tree; it does not express a conditional or logical constraint on values. Option C is wrong because 'typedef' defines a reusable derived type, not a validation constraint. Option D is wrong because 'config' controls whether a node is read-write or read-only (config true/false), not whether data is valid.

45
MCQeasy

Which Python construct is best for iterating over a list of IP addresses returned by an API call?

A.if statement
B.while loop
C.try-except block
D.for loop
AnswerD

A for loop iterates directly over the list of IP addresses returned by the API call, binding each element to a variable without manual index management. This satisfies the scenario's requirement to process every address sequentially, and is the idiomatic Python construct for traversing an iterable of unknown length.

Why this answer

The 'for' loop is the standard Python construct for iterating over collections like lists.

46
MCQeasy

In the context of REST APIs, which status code indicates that a request was successful and a new resource was created on the server?

A.201 Created
B.200 OK
C.202 Accepted
D.204 No Content
AnswerA

A 201 status code confirms the request succeeded and a new resource was created on the server, typically returned after a POST. It satisfies the stem's constraint of signalling both success and creation, unlike 200 OK, which indicates success without implying a new resource.

Why this answer

HTTP 201 Created is the standard response code for a successful POST request that results in a resource creation.

47
MCQhard

You are parsing a complex JSON response from a Cisco ISE API. You need to extract the value of the 'macAddress' field nested inside an object named 'endpoint'. Which Python library is best suited for handling this data structure?

A.configparser
B.xml.etree.ElementTree
C.json
D.pickle
AnswerC

The `json` library parses JSON text into native Python dictionaries and lists, so nested values are reached by key indexing such as `data['endpoint']['macAddress']`. This directly satisfies the stem's requirement to extract a field nested inside an object, without extra dependencies or schema definitions.

Why this answer

The json library is purpose-built for parsing and manipulating JSON data in Python, making it the correct choice for extracting a nested field like 'macAddress' inside an 'endpoint' object from a Cisco ISE API response. It converts JSON into native Python dictionaries and lists, allowing straightforward key access.

Exam trap

The trap is selecting a library based on familiarity (like xml.etree) rather than matching the data format—JSON responses require the json library, not XML or config parsers.

How to eliminate wrong answers

Option A is wrong because configparser handles INI-style configuration files, not JSON structures. Option B is wrong because xml.etree.ElementTree parses XML, not JSON, and Cisco ISE API responses in this scenario are JSON. Option D is wrong because pickle serializes and deserializes Python objects in a binary format, not JSON text from an API.

48
MCQmedium

When parsing a JSON response from a Cisco Adaptive Security Appliance (ASA) REST API call using the Python requests library, you notice the data structure contains a list of objects under the key 'items'. Which Python expression correctly accesses the 'name' field of the first object in that list?

A.response.json()['items'][1]['name']
B.response.json().items[0].name
C.response.json()['items'].get('name')[0]
D.response.json()['items'][0]['name']
AnswerD

`response.json()` deserialises the body into a Python dictionary, so `['items']` retrieves the list, `[0]` indexes its first element, and `['name']` reads that object's field. This directly satisfies the stem's requirement to access the first object's name within the parsed JSON structure.

Why this answer

The correct expression is response.json()['items'][0]['name']. The .json() method deserializes the HTTP response body into Python objects — here a dict containing the key 'items', whose value is a list of dicts. Python lists are zero-indexed, so [0] retrieves the first element, and ['name'] then extracts the 'name' key from that dict.

This matches the documented structure of Cisco ASA REST API responses, which wrap collections in an 'items' array.

Exam trap

SAUTO often tests whether candidates confuse zero-based list indexing with one-based counting, and whether they mistakenly use JavaScript-style dot notation or reversed key/list access on Python dicts and lists.

How to eliminate wrong answers

Option A is wrong because [1] accesses the second element of the list, not the first — Python indexing starts at 0, so this returns the second object's name (or raises IndexError if only one item exists). Option B is wrong because it uses attribute-style access (.items and .name) on dicts; Python dicts do not expose their keys as attributes, and .items is actually the built-in dict method, so this would fail with AttributeError or return a bound method rather than the list. Option C is wrong because it calls .get('name') on the list object returned by ['items']; lists have no .get method, and even conceptually it reverses the order — you must index the list first, then look up the key in the resulting dict.

49
MCQeasy

Which HTTP method is most appropriate for retrieving information from a Cisco Security API?

A.GET
B.PUT
C.POST
D.DELETE
AnswerA

GET is the HTTP method defined for safe, idempotent retrieval of a resource representation without altering server state. This satisfies the stem's requirement for retrieving information, unlike POST, PUT, PATCH or DELETE, which create or modify resources.

Why this answer

The GET method is defined by HTTP as the standard for retrieving resource information without modifying it.

50
Multi-Selecthard

Which THREE of the following are true about Cisco API rate limiting?

Select 3 answers
A.Headers may include quota information
B.It is only applicable to GET requests
C.It always results in the account being banned
D.It helps ensure API service stability
E.It usually results in an HTTP 429 status code
AnswersA, D, E

Cisco API responses commonly expose rate-limit state through headers such as X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset, letting clients read remaining quota and reset timing. This satisfies the stem's requirement for a true statement about rate limiting.

Why this answer

Option A is correct because Cisco API responses commonly return rate-limit headers such as X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset, which expose quota information to the client. Option D is correct because rate limiting protects backend API infrastructure from being overwhelmed, thereby ensuring service stability and fair resource allocation across consumers. Option E is correct because exceeding the allowed request rate typically triggers an HTTP 429 'Too Many Requests' response, often accompanied by a Retry-After header.

Option B is incorrect because rate limiting applies to all HTTP methods, including POST, PUT, PATCH, and DELETE, not just GET. Option C is incorrect because rate limiting normally throttles or temporarily blocks requests rather than permanently banning the account.

Exam trap

The trap is assuming rate limiting only affects read (GET) operations or that any violation results in a ban — candidates overlook that 429 with backoff is the standard, recoverable response across all methods.

51
MCQeasy

What is the significance of the 'Accept' header in a REST API request?

A.It specifies the expected response format.
B.It defines the data format being sent.
C.It tells the server to accept the connection.
D.It performs authentication.
AnswerA

The Accept header performs content negotiation, telling the server which media types the client can handle, such as application/json or application/xml. This directly satisfies the stem's requirement to identify the header's significance: it declares the expected response format rather than the request payload's format, which Content-Type governs.

Why this answer

The Accept header in a REST API request tells the server what media type the client expects in the response, such as application/json or application/xml. It is a content negotiation mechanism defined in HTTP specifications.

Exam trap

SAUTO often tests the confusion between Accept (response format) and Content-Type (request format), causing candidates to select the wrong header for the described purpose.

How to eliminate wrong answers

Option B is wrong because the data format being sent is specified by the Content-Type header, not Accept. Option C is wrong because Accept does not control connection acceptance; that is handled by the server's TCP/HTTP stack. Option D is wrong because authentication is handled by headers like Authorization or by cookies, not Accept.

52
MCQhard

Which mechanism in YANG allows you to group multiple data nodes that are used in various parts of the model to reduce duplication?

A.typedef
B.module
C.grouping
D.augment
AnswerC

grouping defines a reusable set of data nodes that can be referenced via uses throughout the model, so shared structures are defined once. This satisfies the stem's requirement to reduce duplication across various parts of the YANG module.

Why this answer

A grouping in YANG is a reusable container of data nodes (leaf, leaf-list, list, container, etc.) that can be instantiated multiple times across the model using the 'uses' statement. This avoids duplicating identical node definitions in different parts of the tree, which is exactly the deduplication purpose described. Groupings are defined once and referenced wherever the same structure is needed.

Exam trap

The trap is conflating typedef (type reuse) with grouping (node reuse) — both are 'reuse' constructs, but only grouping groups data nodes, and candidates who skim often pick typedef.

How to eliminate wrong answers

Option A is wrong because typedef defines a reusable data type (e.g., a constrained string or integer pattern), not a group of data nodes — it addresses type reuse, not structural reuse. Option B is wrong because a module is the top-level YANG file that encapsulates the entire model; it is the organizational unit, not a deduplication construct within the model. Option D is wrong because augment adds new nodes to an existing schema tree (often from another module) without modifying the original — it extends the model rather than grouping repeated nodes to reduce duplication.

53
MCQmedium

You are writing a Python script to interact with the Cisco Firepower Management Center (FMC) API. You need to authenticate to obtain an authentication token. Which HTTP method and endpoint must your script utilize to initiate this process?

A.PUT /api/fmc_platform/v1/auth/generatetoken
B.POST /api/fmc_platform/v1/auth/generatetoken
C.GET /api/fmc_platform/v1/auth/generatetoken
D.POST /api/fmc_platform/v1/auth/login
AnswerB

Token generation is a state-changing action, so FMC requires POST rather than GET. The generatetoken endpoint under fmc_platform/v1 accepts Basic credentials and returns the auth token plus refresh token in response headers, which the script then reuses for subsequent API calls.

Why this answer

The FMC API authentication flow requires a POST request to /api/fmc_platform/v1/auth/generatetoken with the username and password (typically Basic auth) to obtain an access token and refresh token. The token is then used in the X-auth-access-token header for subsequent API calls. POST is correct because the operation creates a new session token.

Exam trap

SAUTO often tests whether candidates confuse the HTTP method for token generation, tempting them to pick GET or PUT, or to invent a /auth/login endpoint that does not exist in the FMC API.

How to eliminate wrong answers

Option A is wrong because PUT is used to update or replace a resource, not to generate an authentication token. Option C is wrong because GET is a read operation and the generatetoken endpoint requires credentials in the request body/header, which GET does not support for this purpose. Option D is wrong because the endpoint path is /auth/generatetoken, not /auth/login; FMC does not expose a /auth/login endpoint for token generation.

54
Multi-Selecthard

Which TWO statements accurately describe the behavior of the NETCONF 'candidate' data store?

Select 2 answers
A.The candidate store can be discarded if the proposed changes are incorrect.
B.The candidate store supports multiple users making concurrent edits that are merged.
C.Changes applied to the candidate store are immediately active on the device.
D.The candidate store is the only store that supports XML encoding.
E.The candidate store must be explicitly 'committed' to move changes to the running store.
AnswersA, E

The candidate store holds uncommitted configuration changes separately from the running datastore, so a `<discard-changes>` operation reverts it to the running configuration without affecting live traffic. This satisfies the stem's requirement that proposed changes can be abandoned when found incorrect, before any commit makes them active.

Why this answer

Option A is correct because the NETCONF candidate datastore is a scratchpad where configuration changes can be staged and then thrown away with the <discard-changes> operation if the proposed edits are wrong, leaving the running configuration untouched. Option E is correct because the candidate datastore is not active until the client issues a <commit> operation, which copies the candidate configuration into the running datastore so it takes effect on the device. Option B is wrong because NETCONF candidate edits are serialized under a lock (candidate lock or partial lock); concurrent edits are not automatically merged, and a second user must wait or use separate candidate instances.

Option C is wrong because changes in the candidate store are not immediately active — they only become active after a successful commit to the running store. Option D is wrong because XML encoding is the standard NETCONF encoding for all datastores (running, candidate, startup), not a feature unique to the candidate store.

Exam trap

SAUTO often tests the misconception that candidate store changes are immediately active or that it supports automatic merging of concurrent edits, when in fact it requires explicit commit and locking to manage multi-user access.

55
MCQmedium

When modeling network data with YANG, what is the difference between a 'state' data node and a 'config' data node?

A.Config data is for telemetry.
B.There is no difference in YANG.
C.State data is read-only and reflects current operational status.
D.Config data is read-only.
AnswerC

Config nodes are writable and intended for device configuration, whereas state nodes are read-only and report operational status such as counters or interface up/down. This read-only, operational nature is the defining axis separating state from config in YANG models.

Why this answer

In YANG, 'config' data nodes represent configuration that can be modified by the user, while 'state' data nodes are read-only and reflect operational status. State data is typically used for monitoring and telemetry, and it cannot be set via NETCONF.

Exam trap

SAUTO often tests YANG concepts; candidates might think config data is read-only or that state data can be configured, leading to incorrect answers.

How to eliminate wrong answers

Option A is wrong because config data is not for telemetry; state data is used for telemetry. Option B is wrong because there is a clear distinction between config and state. Option D is wrong because config data is read-write, not read-only.

56
MCQmedium

In the context of the Cisco Adaptive Security Appliance (ASA) REST API, what does a 'PATCH' method perform compared to a 'PUT' method?

A.There is no difference; they are interchangeable.
B.PATCH creates a new resource, while PUT updates an existing one.
C.PATCH deletes the resource, while PUT updates it.
D.PATCH updates only the specified fields, while PUT replaces the entire resource.
AnswerD

PATCH sends only the changed fields as a partial update, leaving unspecified attributes untouched, whereas PUT supplies a full representation that overwrites the entire resource. This distinction satisfies the scenario contrasting partial modification with complete replacement.

Why this answer

In REST APIs, PATCH is used for partial updates, modifying only the specified fields of a resource. PUT replaces the entire resource with the provided representation. The Cisco ASA REST API follows this standard, so PATCH updates only the given attributes, while PUT overwrites the whole object.

Exam trap

SAUTO often tests the confusion between PATCH and PUT, with candidates mistakenly thinking PATCH creates or deletes resources, or that they are identical.

How to eliminate wrong answers

Option A is wrong because PATCH and PUT have distinct semantics; they are not interchangeable. Option B is wrong because PATCH does not create resources; POST is typically used for creation. Option C is wrong because PATCH does not delete resources; DELETE is used for deletion.

57
MCQeasy

Which Python library is the standard for performing HTTP requests in an automation script?

A.http.client
B.requests
C.socket
D.urllib
AnswerB

The requests library abstracts raw socket handling and urllib plumbing behind a simple API, so scripts issue GET, POST, PUT and DELETE calls with automatic session, header and JSON handling. That directly satisfies the stem's requirement for the standard HTTP client in automation scripting.

Why this answer

The 'requests' library is the de facto standard for making HTTP requests in Python automation scripts because it provides a simple, human-friendly API that handles sessions, headers, authentication, JSON parsing, and connection pooling out of the box. It abstracts away the low-level complexity that the standard library requires.

Exam trap

SAUTO often tests whether candidates know that Python's standard library (urllib, http.client, socket) can make HTTP calls but that 'requests' is the community-standard, higher-level library for automation — the trap is choosing a built-in module thinking it is the standard.

How to eliminate wrong answers

Option A is wrong because http.client is a low-level standard-library module that requires manual connection management, header construction, and response parsing — it is not the standard choice for automation scripts. Option C is wrong because socket is a raw TCP/IP networking module that operates below HTTP; you would have to implement the HTTP protocol yourself. Option D is wrong because urllib is a standard-library package that can make HTTP requests but has a more verbose, less intuitive API and lacks features like automatic JSON decoding, session persistence, and connection pooling that requests provides.

58
MCQmedium

You are writing a Python script to retrieve interface statistics from a Cisco Firepower Management Center (FMC) using the REST API. When making the GET request, which header must be included to ensure the server understands the client prefers JSON format?

A.Content-Type: application/json
B.Accept: application/json
C.X-Auth-Token: JSON
D.Authorization: Bearer
AnswerB

Content negotiation is driven by the Accept header, which tells FMC the client's preferred response media type. Setting Accept: application/json makes the server return JSON rather than XML, satisfying the stem's requirement that the server understands the JSON preference.

Why this answer

The Accept header is used by the client to specify the media types it is willing to receive in the response. By setting Accept: application/json, the client tells the FMC REST API that it prefers JSON-formatted data. This ensures the server returns JSON rather than XML or another format.

The other headers serve different purposes: Content-Type describes the request body, X-Auth-Token is for authentication, and Authorization is for credentials.

Exam trap

SAUTO often tests the confusion between Content-Type and Accept headers, where candidates mistakenly choose Content-Type for specifying the desired response format instead of the request body format.

How to eliminate wrong answers

Option A is wrong because Content-Type indicates the media type of the request body, not the desired response format; it is used when sending data (e.g., POST/PUT), not for GET requests. Option C is wrong because X-Auth-Token is a custom header used by FMC for authentication after obtaining a token, and its value should be the token string, not 'JSON'. Option D is wrong because Authorization: Bearer is used for OAuth 2.0 bearer token authentication, which is not the standard method for FMC REST API (which uses X-Auth-Token), and it does not specify response format.

59
MCQeasy

When using NETCONF to manage a Cisco device, which message type is used to establish the initial session and exchange capability information?

A.<rpc>
B.<ok>
C.<rpc-reply>
D.<hello>
AnswerD

NETCONF sessions begin with the client and server exchanging <hello> messages, which advertise supported capabilities and the base protocol version. This handshake must complete before any <rpc> operations, so <hello> is the message type that establishes the session and exchanges capability information.

Why this answer

NETCONF sessions begin with a <hello> message exchanged by both the client and the server. The <hello> contains the session ID and a <capabilities> element listing supported YANG modules and protocol features, allowing both sides to negotiate what operations and data models are available before any configuration is attempted.

Exam trap

The trap here is assuming the first message is an RPC — candidates forget that NETCONF requires a bidirectional <hello> handshake before any operational RPC can be sent.

How to eliminate wrong answers

Option A is wrong because <rpc> is used after the session is established to invoke operations like get-config or edit-config, not for capability exchange. Option B is wrong because <ok> is a response element indicating an RPC succeeded, not a session-establishment message. Option C is wrong because <rpc-reply> carries the response to an RPC, not the initial capability negotiation.

60
Multi-Selectmedium

A security automation engineer is designing a Python script that interacts with multiple Cisco security appliances' REST APIs. The script must handle HTTP errors gracefully and implement retry logic for transient failures. Which two practices should be followed to ensure robust error handling? (Choose two.)

Select 2 answers
A.Use the Response.status_code attribute to manually check for specific error codes and implement custom retry logic.
B.Ignore HTTP 500 errors because they are server-side issues and will resolve on their own.
C.Use the raise_for_status() method on the response object to automatically raise an exception for HTTP error codes.
D.Catch requests.exceptions.RequestException to handle all possible exceptions raised by the requests library.
E.Set a very high timeout value to avoid timeouts and ensure requests always complete.
AnswersC, D

The raise_for_status() method of the requests library's Response object raises an HTTPError exception if the HTTP status code indicates an error (4xx or 5xx). This allows the script to catch these exceptions and handle them appropriately, such as logging the error or retrying the request. It is a best practice for robust error handling in API interactions.

Why this answer

Using raise_for_status() and catching RequestException are two best practices for robust error handling with the requests library. raise_for_status() triggers exceptions on HTTP errors, and catching RequestException handles all request-related exceptions. These practices ensure that errors are detected and managed, allowing for retries or graceful degradation.

Exam trap

The trap here is thinking that manual status code checks are sufficient, but using the built-in exception handling is more reliable and less error-prone.

61
MCQeasy

A network automation engineer is writing a Python script to interact with a Cisco Firepower Management Center (FMC) REST API. The script must authenticate and obtain a token for subsequent requests. Which HTTP header is used to pass the authentication token in subsequent API calls?

A.Cookie: token=...
B.Authorization: Bearer
C.X-Auth-Token
D.X-auth-access-token
AnswerD

The Cisco FMC REST API uses a custom header named X-auth-access-token to carry the authentication token obtained from the initial authentication request. After a successful POST to /api/fmc_platform/v1/auth/generatetoken, the response includes this token, which must be included in all subsequent requests. Using this header is the standard method for token-based authentication with FMC.

Why this answer

The Cisco FMC REST API requires the authentication token to be included in the X-auth-access-token header for all subsequent requests after initial authentication. This is a custom header specific to FMC, not the standard Authorization header or other token headers used by different APIs. Using the correct header ensures successful API calls.

Exam trap

The trap here is assuming that the standard Authorization: Bearer header is used, but FMC employs a custom header for token authentication.

62
MCQhard

You are developing a Python script that uses the ncclient library to configure a Cisco IOS-XE device via NETCONF. You need to send a <edit-config> operation that merges a new interface configuration. Which NETCONF operation and default-operation value should you use to ensure that only the specified configuration is merged without affecting other interfaces?

A.Use <edit-config> with default-operation='replace'.
B.Use <edit-config> with default-operation='merge'.
C.Use <copy-config> with the running configuration as the target.
D.Use <edit-config> with default-operation='none'.
AnswerB

The <edit-config> operation with default-operation='merge' merges the specified configuration with the existing configuration. This is the default behavior if default-operation is not specified. It ensures that only the provided nodes are modified, leaving other interfaces untouched. This is the correct approach for adding or modifying specific configuration without affecting other parts.

Why this answer

The <edit-config> operation with default-operation='merge' is the standard way to merge configuration changes without affecting other parts of the configuration. It modifies only the specified nodes. The 'replace' option would overwrite the entire configuration, while 'none' requires explicit operation attributes. <copy-config> is for full datastore replacement.

Exam trap

The trap here is assuming that 'replace' is needed to update an interface, when 'merge' is the safe default for partial updates.

63
MCQeasy

Which YANG node type is used specifically to group reusable definitions that can be imported by other modules?

A.typedef
B.leaf
C.grouping
D.container
AnswerC

A grouping statement holds a reusable set of nodes that other modules reference through a uses statement after importing the module. It exists solely to group reusable definitions, unlike container, list or leaf, which define data tree instances.

Why this answer

A grouping in YANG is a reusable collection of nodes (leaves, containers, lists) that can be referenced with the uses statement, either within the same module or imported from another module. It exists specifically to avoid duplicating common configuration structures across multiple parts of a model.

Exam trap

The trap is conflating grouping (a reusable template) with container (an instantiated data node) — both 'group' things, but only grouping is importable and reusable via uses.

How to eliminate wrong answers

Option A is wrong because typedef defines a reusable data type, not a group of nodes. Option B is wrong because leaf defines a single data node with a value, not a reusable structure. Option D is wrong because container is a data node that groups related nodes for a specific instance in the data tree, not a reusable template that can be imported and instantiated elsewhere.

64
MCQhard

In a Cisco REST API implementation using Python, you receive a '429 Too Many Requests' error. What is the appropriate programmatic response?

A.Switch the request method from GET to POST.
B.Disable SSL verification for subsequent calls.
C.Increase the timeout duration of the request.
D.Implement an exponential backoff strategy.
AnswerD

A 429 signals the client exceeded its allotted request quota. Exponential backoff retries after progressively longer, randomised delays, letting the quota window reset and preventing repeated throttling. Immediate retries or ignoring the error would worsen throttling, so backoff satisfies the stem's requirement for an appropriate programmatic response.

Why this answer

A 429 Too Many Requests status code indicates that the client has exceeded the rate limit imposed by the API server. The correct programmatic response is to implement an exponential backoff strategy, where the client waits progressively longer intervals between retries (e.g., 1s, 2s, 4s, 8s) to reduce the request rate and avoid overwhelming the server. This approach is a standard best practice for handling rate limiting in REST APIs, including Cisco's, and is often recommended in Cisco DevNet and automation certifications.

Exam trap

SAUTO often tests the misconception that HTTP errors like 429 can be resolved by changing request parameters (method, timeout, SSL) rather than implementing proper retry logic with backoff, which is the only correct programmatic response.

How to eliminate wrong answers

Option A is wrong because changing the HTTP method from GET to POST does not address rate limiting; the server enforces limits based on client identity or IP, not the method, and POST may even have stricter limits. Option B is wrong because disabling SSL verification is a security risk and has no effect on rate limiting; it would only bypass certificate validation, which is unrelated to 429 errors. Option C is wrong because increasing the timeout duration only affects how long the client waits for a response, not the rate at which requests are sent; it does not prevent or resolve rate limiting.

65
MCQhard

You are writing a script to automate firewall rules. When using the 'pyang' tool, what is the primary purpose of the '--format' option?

A.To translate the YANG model into a specific output format.
B.To set the recursion depth of the model tree.
C.To define the input file encoding.
D.To specify the YANG module version.
AnswerA

The --format flag controls how pyang renders the parsed YANG module, selecting an output plugin such as tree, yang, or jstree. It satisfies the scripting need to produce machine-readable or human-readable model output rather than validating or fetching schemas.

Why this answer

The --format option in pyang is used to specify the output format, such as tree, json, or xsd, for a given YANG model.

66
Multi-Selecteasy

Which THREE of the following are common JSON data types?

Select 3 answers
A.number
B.string
C.class
D.boolean
E.pointer
AnswersA, B, D

JSON defines number as a primitive value type, covering integers and floating-point values with optional exponents and signs. This satisfies the stem's requirement for a common JSON data type, alongside string, boolean, null, object and array. Numbers require no quoting, unlike string values.

Why this answer

JSON (JavaScript Object Notation, defined by RFC 8259) supports a fixed set of value types, and option A (number) is one of them: JSON numbers are written as decimal literals such as 42, -3.14, or 1.5e10, with no distinction between integers and floats. Option B (string) is correct because JSON strings are sequences of Unicode characters enclosed in double quotes, using backslash escapes like \n and \uXXXX. Option D (boolean) is correct because JSON defines the literal values true and false as a native boolean type.

The unmarked options do not belong: option C (class) is an object-oriented construct, not a JSON type — JSON only has objects (unordered key/value collections), not classes — and option E (pointer) is a memory-address concept from languages like C/C++, with no representation in the JSON specification.

Exam trap

SAUTO often tests whether candidates confuse programming-language types (class, pointer, int vs float) with JSON's actual six value types — the trap is assuming JSON supports types from languages like Python or C++.

67
Multi-Selecthard

Which TWO of the following are true regarding the use of the Python 'requests' library?

Select 2 answers
A.It only supports the synchronous execution model.
B.It can automatically serialize dictionaries to JSON via the json parameter.
C.It simplifies HTTP interactions with methods like .get() and .post()
D.It requires manual management of connection pools.
E.It is only compatible with Python 2.7.
AnswersB, C

The requests library's json parameter accepts a Python dictionary and serialises it to JSON automatically, setting the Content-Type header accordingly. This removes the need to call json.dumps() manually, satisfying the stem's claim about automatic serialisation of dictionaries.

Why this answer

Option B is correct because requests accepts a json= keyword argument on methods such as post(), put(), and patch(), which serializes a Python dictionary to a JSON body and automatically sets the Content-Type header to application/json. Option C is correct because the library's core purpose is to provide a high-level, human-friendly API for HTTP, exposing convenience methods like requests.get(), requests.post(), requests.put(), and requests.delete() that wrap urllib3 under the hood. Option A is not correct because requests is built on urllib3 and supports connection pooling and keep-alive, and while the base API is synchronous, it is not limited to a single execution model in the sense implied.

Option D is not correct because requests manages connection pooling automatically via HTTPAdapter and urllib3's PoolManager, so manual pool management is not required. Option E is not correct because requests supports Python 3.x (and historically 2.7), not exclusively Python 2.7.

Exam trap

The trap is overgeneralizing requests' capabilities — candidates may believe it requires manual connection pool management or only works with Python 2.7, when in fact it auto-manages pools and supports modern Python 3.

68
MCQhard

An engineer is using NETCONF to retrieve configuration data from a Cisco IOS XE device. The engineer wants to filter the response to only include interface configuration for GigabitEthernet1. Which YANG filter correctly achieves this using the subtree filter?

A.<filter type="subtree"><interface><name>GigabitEthernet1</name></interface></filter>
B.<filter type="subtree"><interfaces xmlns="urn:ietf:params:xml:ns:yang:ietf-interfaces"><interface><name>GigabitEthernet1</name></interface></interfaces></filter>
C.<filter type="subtree"><interfaces><interface><name>GigabitEthernet1</name></interface></interfaces></filter>
D.<filter type="xpath" select="/interfaces/interface[name='GigabitEthernet1']"/>
AnswerB

This filter uses the subtree filtering mechanism with the correct namespace for the ietf-interfaces module. It selects the interfaces container and filters for the interface with name GigabitEthernet1. The structure matches the YANG model, ensuring only the desired interface configuration is returned. This is the standard way to filter NETCONF responses.

Why this answer

The correct subtree filter includes the proper namespace for the ietf-interfaces module and follows the hierarchy: interfaces > interface > name. This ensures the NETCONF server correctly interprets the filter and returns only the configuration for GigabitEthernet1. Omitting the namespace or parent container leads to invalid filters and incorrect results.

Exam trap

The trap here is forgetting to include the namespace in the subtree filter, which is required for the device to match the filter to the correct YANG module.

69
MCQeasy

Which data format is primarily used by REST APIs and is considered the standard for programmatic device interaction in Cisco security environments?

A.YAML
B.JSON
C.XML
D.Binary
AnswerB

JSON's lightweight, text-based structure parses directly into native objects, making it the de facto payload format for REST APIs. Cisco security platforms such as SecureX and Firepower Management Center expose JSON over HTTPS for programmatic device interaction, satisfying the stem's requirement for the standard REST data format.

Why this answer

JSON (JavaScript Object Notation) is the lightweight, human-readable format preferred by modern REST APIs.

70
Multi-Selectmedium

Which THREE of the following are true regarding REST API design in Cisco security products?

Select 3 answers
A.Standard HTTP methods should be used for CRUD
B.All requests must be synchronous
C.XML is the only supported format
D.Resources are identified by unique URLs
E.Meaningful HTTP status codes indicate success or failure
AnswersA, D, E

Using standard HTTP methods (GET, POST, PUT, DELETE) for CRUD operations satisfies REST's uniform-interface constraint, which Cisco security product APIs such as Firepower and Umbrella enforce. This stateless, resource-oriented approach ensures predictable, interoperable calls across endpoints, unlike RPC-style designs that embed actions in the URL.

Why this answer

Option A is correct because REST API design in Cisco security products follows the standard HTTP verb mapping for CRUD operations: GET to read, POST to create, PUT/PATCH to update, and DELETE to remove resources. Option D is correct because REST is resource-oriented, so each resource is addressed by a unique URL (for example, /api/fmc_config/v1/domain/{domainUUID}/object/networks/{objectId}), which clients use to identify and manipulate that resource. Option E is correct because REST APIs return meaningful HTTP status codes such as 200 OK, 201 Created, 400 Bad Request, 401 Unauthorized, and 404 Not Found to indicate whether a request succeeded or failed.

Option B is not correct because REST APIs can support asynchronous operations, and Cisco security APIs commonly return task or job identifiers that clients poll for completion rather than requiring every request to be synchronous. Option C is not correct because Cisco security REST APIs typically support JSON, and many also support XML, so XML is not the only supported format.

Exam trap

The trap is overgeneralizing REST constraints — candidates assume REST must be synchronous or XML-only, when in fact REST is format-agnostic and supports async patterns via task polling.

71
MCQmedium

Which component of a REST API request is used to pass information about the requested resource in the URL?

A.Cookies
B.Headers
C.Path parameters
D.Body
AnswerC

Path parameters are embedded directly within the URL path, for example /devices/{id}, so they identify the specific resource being addressed. Query parameters instead filter or modify the request after the path. This satisfies the stem's requirement for passing resource-identifying information in the URL itself.

Why this answer

Path parameters are embedded directly in the URL path and identify a specific resource — for example, /users/{id} where {id} is the path parameter. They are the standard REST mechanism for passing resource identifiers in the URL itself, distinguishing them from query strings, headers, and body content.

Exam trap

SAUTO often tests whether candidates confuse path parameters (resource identity in the URL path) with query parameters (filters/modifiers after ?) or with headers and body, which serve entirely different roles in HTTP.

How to eliminate wrong answers

Option A is wrong because cookies are sent in the Cookie header and carry session state, not resource identifiers in the URL. Option B is wrong because headers carry metadata (content type, auth tokens, caching directives) outside the URL. Option D is wrong because the request body carries the payload for POST/PUT/PATCH operations, not URL-embedded resource identifiers.

72
MCQmedium

You are using Postman to test an API that requires an API key in the header. Where should this be configured in Postman?

A.Params tab
B.Headers tab
C.Body tab
D.Authorization tab
AnswerB

The Headers tab accepts arbitrary key–value pairs sent with every request, so an API key header such as `x-api-key: <value>` is transmitted exactly as the API expects. This satisfies the stem's requirement that the key travel in the request header, unlike query parameters or the body.

Why this answer

The Headers tab in Postman is where you configure custom HTTP headers, including API keys that must be sent in the request header (e.g., 'X-API-Key: abc123'). This is the correct location because API keys in headers are not part of the URL, body, or authorization framework.

Exam trap

SAUTO often tests the confusion between the Authorization tab and the Headers tab — candidates may think all auth-related configuration belongs in Authorization, but custom API key headers are configured in Headers.

How to eliminate wrong answers

Option A is wrong because the Params tab is for query parameters appended to the URL (e.g., ?key=value), not for headers. Option C is wrong because the Body tab is for the request payload (JSON, form data, etc.), not for headers. Option D is wrong because the Authorization tab is specifically for standard auth schemes like Basic, Bearer, OAuth 2.0, and API Key — but when API Key is selected there, Postman adds it as a header or query param automatically; however, the question asks where to configure it manually, and the Headers tab is the direct location.

Additionally, some APIs require custom header names that the Authorization tab's API Key helper may not support.

Ready to test yourself?

Try a timed practice session using only Network Programmability Foundation questions.