200-301 domain - 10% of the exam

Automation and Programmability

Automation and Programmability is 10% of the 200-301 exam. These are the objectives it covers, each with practice questions, with every answer explained.

The domain in numbers

37
Practice questions
3
Objectives
37
Medium

Where people go wrong

  • Picking a tool that breaks the stated constraint

    The wrong answers pick a tool that breaks one of the stated constraints. A tool that needs a per-device agent or polls from a local agent fails an agentless requirement. Terraform is declarative and uses HCL for provisioning, and NETCONF is a protocol that exchanges XML, so neither is a YAML playbook tool. Ansible is agentless, connects from a control node over SSH, and pushes configuration defined in YAML playbooks.

    See it in a sample question
  • Describing Terraform as an imperative script

    The wrong answers describe Terraform as an imperative script, a blind re-push of everything, or a credential or log store. Terraform is declarative: it compares the declared end state with the resources recorded in its state file and plans only the difference. The state maps configuration to real resources, which is how drift is detected. A subnet deleted by hand is planned for re-creation while healthy resources are left alone.

    See it in a sample question
  • Reversing the northbound and southbound interfaces

    The wrong answers reverse the two controller interfaces or merge them. The northbound API faces the applications above the controller, usually as REST, so software can request services without device detail. The southbound interface faces the switches and routers below it and carries the instructions that program them. East-west APIs link controllers to each other. An application requesting services from the controller uses the northbound tier.

    See it in a sample question
  • Mapping the wrong HTTP verb to the operation

    The wrong answers map the verb to the wrong CRUD operation. POST creates a new resource in a collection and lets the server assign an identifier. PUT replaces a whole representation, so omitted fields risk being cleared, while PATCH changes only the supplied fields of an existing resource. GET is safe and idempotent, so it suits polling. DELETE is idempotent but not safe, and POST is neither.

    See it in a sample question
  • Misreading JSON types, indexes and syntax

    The wrong answers misread the structure of a JSON document. An array uses square brackets for an ordered list, while an object uses braces for key-value pairs. Arrays are zero-indexed, so switches[1] is the second element. Numbers and true are bare literals, and quoting them makes them strings. A trailing comma after the last array element is a syntax error. A name beside a value is an object member, not an array.

    See it in a sample question

Objectives in this domain

What to study

The official documents this domain's practice questions cite most.

Sample questions from this domain

Free sampleAutomation and Programmabilitymedium

A team is choosing an automation tool that pushes configuration to network devices over SSH using human-readable YAML playbooks and runs without a permanent agent installed on each device. Which tool matches this agentless, push-based description?

  • ATerraform, which uses HashiCorp Configuration Language to declare and provision infrastructure resources
  • BA REST client alone, which issues raw HTTP verbs against device APIs but has no playbook engine
  • CAnsible, which is agentless and pushes YAML playbooks to devices over SSH from a control node Correct
  • DNETCONF by itself, which is a configuration protocol carrying XML payloads rather than an automation tool
Identify Ansible as the agentless, push-based automation tool that applies YAML playbooks over SSH. Ansible operates from a control node, requires no permanent agent on managed devices, connects over SSH, and applies declarative YAML playbooks in a push model. These characteristics distinguish it from declarative provisioners like Terraform and from transport protocols like NETCONF.

Why A is wrong: Terraform is a valid current tool but declares infrastructure in HCL and focuses on provisioning state, not pushing YAML playbooks over SSH, so the description does not fit.

Why B is wrong: A bare REST client sends HTTP requests but provides no YAML playbook automation framework, so it does not satisfy the stated workflow.

Why C is correct: Ansible is agentless and uses a push model, connecting from a control node over SSH and applying YAML playbooks, which matches every detail of the requirement.

Why D is wrong: NETCONF is a management protocol that exchanges XML over a secure transport, not an agentless tool that runs YAML playbooks, so it is the wrong category.

Free sampleAutomation and Programmabilitymedium

A platform engineer wants a declarative tool to provision cloud and network infrastructure, where they describe the end state and the tool tracks resources in a state file and works out the changes needed to reach it. Which tool fits this declarative, state-tracking model?

  • ATerraform, which uses a declarative configuration and a state file to converge infrastructure to the described end state Correct
  • BA purely imperative scripting approach where the engineer codes each step and ordering by hand with no resource tracking
  • CAnsible used only in ad hoc mode, issuing one-off commands without any record of the resources it created
  • DA SNMP polling manager that reads device counters and raises alerts but never provisions infrastructure
Terraform is declarative and uses a state file to track resources and converge infrastructure to the desired end state. Terraform compares the desired declarative configuration against the resources recorded in its state file and generates the changes required to converge on that end state, which distinguishes it from imperative or monitoring-only tools.

Why A is correct: Terraform takes a declarative description of desired infrastructure, records existing resources in a state file, and computes the plan needed to reach that state.

Why B is wrong: An imperative step-by-step script is the opposite of the declarative, state-tracked model the engineer wants, so it does not fit.

Why C is wrong: Ad hoc Ansible commands run procedurally and keep no resource state file, so although Ansible is a real automation tool, this usage does not provide the state tracking described.

Why D is wrong: An SNMP manager monitors devices rather than provisioning resources, so it cannot fulfil a declarative infrastructure-provisioning requirement.

Free sampleAutomation and Programmabilitymedium

An automation engineer is mapping the API tiers of a controller-based SDN solution. A custom orchestration application needs to request network services from the controller without knowing how the controller talks to the underlying switches. Which API does the application use?

  • AA northbound API, typically a REST interface, that the application uses to consume controller services Correct
  • BA southbound API such as NETCONF or OpenFlow that the controller uses to program the devices
  • CAn east-west API used to synchronise state between two peer controllers in a cluster
  • DA southbound API such as RESTCONF that pushes configuration straight from the application to each switch
Applications consume controller services through northbound APIs, while the controller programs devices through southbound APIs. Northbound APIs abstract the network upward so applications can request services from the controller, commonly via REST, while southbound APIs such as NETCONF and OpenFlow are how the controller drives the devices below it.

Why A is correct: Northbound APIs sit above the controller and let applications request abstracted network services, usually over REST, without dealing with device-level protocols.

Why B is wrong: Southbound APIs face the network devices below the controller, so an application asking the controller for services would not call them directly.

Why C is wrong: East-west APIs handle controller-to-controller communication for redundancy and scale, not an application requesting services from a single controller.

Why D is wrong: This bypasses the controller entirely and mislabels a device-facing protocol, whereas the application is meant to interact only with the controller through the northbound tier.

Free sampleAutomation and Programmabilitymedium

A REST client repeatedly polls router R1's API for interface counters. To avoid changing any state on R1 and to allow the response to be safely cached and retried, which property must the chosen HTTP method have, and which verb provides it?

  • AIt must be safe and idempotent; GET reads the resource without altering server state Correct
  • BIt must be idempotent but not safe; DELETE can be retried without altering the result
  • CIt must create a fresh resource each call; POST guarantees a new snapshot every time
  • DIt must fully replace the resource each call; PUT keeps the counters consistent
Recognise that read-only polling needs a safe, idempotent method and that GET is the verb providing both properties. A safe method does not modify server state, and an idempotent method yields the same result however many times it is sent. GET satisfies both, so repeated reads of interface counters never alter R1 and can be cached or retried freely.

Why A is correct: GET is defined as both safe and idempotent, so repeated polls only read the counters and never change R1, which is exactly what safe caching and retry require.

Why B is wrong: DELETE is idempotent but not safe because it removes the resource, so using it to poll counters would destroy the interface object instead of reading it.

Why C is wrong: POST is neither safe nor idempotent and is intended to create resources, so repeated polls would attempt to create objects rather than harmlessly read counters.

Why D is wrong: PUT replaces the entire resource representation and thereby changes server state, so it is not safe for read-only polling even though it is idempotent.

Free sampleAutomation and Programmabilitymedium

While reviewing JSON returned by a device API, an engineer needs to identify which structure holds an ordered list of interface entries rather than a single set of named attributes. Which JSON construct represents that ordered list?

{
  "hostname": "core-sw1",
  "interfaces": [ "Gig0/1", "Gig0/2", "Gig0/3" ]
}
  • AAn object, written with braces and made up of key and value pairs that are unordered
  • BAn array, written with square brackets and holding an ordered sequence of values Correct
  • CA string, written inside double quotation marks to hold a single block of text
  • DA boolean, written as the literal true or false to express a single condition
Recognise that a JSON array, delimited by square brackets, represents an ordered list of values. JSON uses braces for objects, which are unordered collections of key/value pairs, and square brackets for arrays, which are ordered lists of values. The interfaces field uses square brackets, so it is an array holding the ordered interface names.

Why A is wrong: A JSON object uses braces and holds unordered key/value pairs, which describes a record of named attributes rather than an ordered list.

Why B is correct: A JSON array is delimited by square brackets and stores an ordered list of values, exactly matching the interfaces collection in the sample.

Why C is wrong: A string is one scalar text value in quotation marks, so it cannot represent a list of three separate interface entries.

Why D is wrong: A boolean carries only true or false and cannot hold an ordered collection of interface names.

Other domains in this exam

See also the 200-301 cert hub, the study guide, and the cheat sheet.

Examworthy is not affiliated with or endorsed by Cisco. Original, blueprint-aligned practice material only.