Skip to main content
PacketMentor logo
Open menu
← All topics
Automation & Programmability Foundational

Reading API Sequence Diagrams

The CCNAAUTO 200-901 5.14 skill: a sequence diagram shows actors + ordered messages between them. Read top to bottom; each arrow is one API call.

Quick summary
  • Boxes at the top = actors / systems. Vertical dashed lines dropping from each = their lifelines. Arrows between lifelines = messages, read top to bottom.
  • Solid arrow = request. Dashed arrow = response. Labels on arrows = method name or HTTP verb + path + status.
  • Loops and conditionals shown with alt / loop / opt boxes drawn around a group of arrows.

Mental model

Cisco objective 5.14 says “Interpret a sequence diagram that includes API calls”. A sequence diagram is a picture of a conversation: who talked, in what order, what they said.

┌────────┐    ┌───────────┐    ┌──────────────┐
│ Client │    │ Auth API  │    │ Resource API │
└────────┘    └───────────┘    └──────────────┘
    │              │                 │
    │─POST /login──▶                 │
    │              │                 │
    │◀──200 {token}┤                 │
    │              │                 │
    │─GET /devices (Authorization: Bearer <token>)▶│
    │              │                 │
    │◀────────────────────200 [...]──┤
    │              │                 │

Three actors (boxes at top). Each has a lifeline (the vertical line below). Arrows between lifelines are messages, read top to bottom in time order.

The vocabulary

ElementMeaning
Box at topA participant (Client, API server, Database, Device, User)
Dashed vertical line belowThat participant’s lifeline (where they exist in time)
Solid narrow box over the lifelineActivation / “the actor is working”
Solid arrow ──▶Message / request
Dashed arrow ◀── or --▶Return / response
Self-arrow (loops back to same lifeline)The actor calls itself (internal method call)
alt boxIf-else branch; two sub-frames with a condition label
loop boxRepeat the enclosed messages while some condition holds
opt boxOptional sub-flow; happens only if a condition is true
par boxParallel execution of two sub-frames

Reading the example

Client → Auth API      POST /login             (request credentials)
Client ← Auth API      200 {token}             (receive bearer token)
Client → Resource API  GET /devices + Bearer   (use token to fetch data)
Client ← Resource API  200 [...]               (receive devices list)

Two-step OAuth2-style flow: log in to get a token, use the token for subsequent calls.

A busier example

┌────────┐  ┌─────────┐  ┌─────────────────┐  ┌──────────┐
│Browser │  │ Web app │  │ Catalyst Center │  │  Switch  │
└────────┘  └─────────┘  └─────────────────┘  └──────────┘
    │           │                │                 │
    │─GET /ui──▶│                │                 │
    │           │─POST /auth────▶│                 │
    │           │◀────token──────┤                 │
    │           │─GET /devices──▶│                 │
    │           │                │─SSH/show──────▶│
    │           │                │◀───output──────┤
    │           │◀───devices JSON┤                 │
    │◀─HTML─────┤                │                 │

Interpretation:

  • Browser hits the web app.
  • Web app authenticates to Catalyst Center.
  • Web app asks Catalyst Center for devices.
  • Catalyst Center queries each switch over SSH to get live state.
  • Catalyst Center returns the merged list to the web app.
  • Web app renders HTML back to the browser.

loop and alt frames

   loop  for each device
    │
    │─GET /device/{id}/clients────▶│
    │◀───200 [clients]─────────────┤
    │
   end loop

   alt   switch is reachable
    │─GET /switch/stats─▶│
    │◀────200 stats──────┤
   else
    │─record "down" ───▶ (log)
   end alt

Any grouping with a label on top (loop, alt, opt, par) applies to the enclosed arrows.

Reading tips for the exam

  1. Identify the actors at the top of the diagram.
  2. Follow the time order top to bottom.
  3. Note the arrow direction — who initiated vs who replied.
  4. Pay attention to labels on arrows — HTTP method + URL + headers tell you what the call is.
  5. Watch for alt/loop/opt frames — they change the flow.
  6. Describe the end result in one sentence.

Where you see sequence diagrams

  • API documentation (how an OAuth2 flow unfolds).
  • Vendor whitepapers.
  • RFCs (TLS handshake, QUIC handshake).
  • Incident post-mortems (“what messages happened in what order when the system failed”).

Tools that draw them: PlantUML, Mermaid (used in GitHub markdown), draw.io, Lucidchart.

FAQ

What is a Mermaid sequence diagram? A text format for drawing sequence diagrams. Looks like:

sequenceDiagram
    Client->>Auth: POST /login
    Auth-->>Client: 200 {token}
    Client->>Resource: GET /devices
    Resource-->>Client: 200 [...]

GitHub and GitLab render these inline from markdown.

Is a flowchart the same as a sequence diagram? No. Flowchart shows decision logic (branches, loops) regardless of actors. Sequence diagram emphasises the chronology between two or more actors.

Are swimlane diagrams on the exam? Not called out specifically. Swimlanes are a flowchart variant that assigns each step to an actor; useful but not required for 5.14.

Do I need to draw sequence diagrams for the exam? No. 5.14 is interpret-level. Reading, not drawing.

Master this on a real network

Want this drilled into reflex?

1:1 weekly sessions, live feedback on your labs, and US interview prep: built around the CCNA Automation® exam blueprint. Free first session. No card on file until you decide.

Claim my free session →

Get the free CCNA 12-week roadmap

You're already reading up on Reading API Sequence Diagrams. The roadmap is the order I recommend studying every CCNA topic in: with what to lab each week and where Reading API Sequence Diagrams fits. A written personal reply, not an autoresponder. Expect it within one business day.

Personal reply from a senior network engineer. No third-party tracking. Unsubscribe any time.