Cisco Certified Support Technician (CCST) NetworkingAutomation and ProgrammabilityHard

A network security engineer is tasked with automating the process of blocking malicious IP addresses on perimeter firewalls. The automation involves a script that receives a list of suspicious IPs and sends an API call to each firewall's controller to add these IPs to a blocklist. The engineer wants to ensure that if the script is run multiple times with the same list of IPs, it does not create duplicate entries or cause unintended side effects beyond ensuring the IPs are blocked. Which API property is the engineer seeking?

  1. AIdempotent
  2. BAtomic
  3. CStateless
  4. DAsynchronous
Show answer & explanation

Correct answer: A. Idempotent

An 'idempotent' API operation is one that produces the same result whether it is executed once or multiple times with the same input. In this scenario, running the script multiple times to block the same IPs should ensure they are blocked without creating duplicates or errors if they are already blocked, which is the definition of idempotency.

Why the other options are wrong

  • B. Atomic refers to an operation that either completes entirely or not at all, preventing partial updates, but it doesn't specifically address the issue of repeated calls with the same input.
  • C. Stateless means each API request contains all necessary information, and the server doesn't store client state between requests. While desirable for REST, it doesn't directly address the duplicate entry concern.
  • D. Asynchronous refers to operations that don't block the caller while waiting for a response, which is unrelated to duplicate entries.

Idempotent API Operation

An API operation that, when executed multiple times with the same input, produces the same result as if it had been executed only once, without causing unintended side effects.

  • Safe to repeat multiple times
  • Prevents unintended side effects (e.g., duplicates)
  • Common for PUT, DELETE, and some POST operations

Memory trick: Good APIs are RESTful, Idempotent, and Stateless.

More Automation and Programmability questions