Interpret sequence diagram that includes API calls

📘Cisco DevNet Associate (200-901 DEVASC)


1. What is a Sequence Diagram?

A sequence diagram is a type of diagram used in software design that shows how different components or systems interact with each other over time.

  • It focuses on the order of events (or messages) between systems.
  • The main idea is to show who talks to whom and when.

Key Components of a Sequence Diagram:

  1. Actors – These are the entities that interact with the system.
    • Examples: User, Application, API Client.
  2. Objects/Systems – The components that interact, often shown as boxes.
    • Examples: Cisco DNA Center, Meraki Dashboard, Network Device.
  3. Lifelines – Vertical dashed lines that show the life of an object during the interaction.
  4. Messages/Arrows – Horizontal arrows that show calls, requests, or responses between actors and objects.
    • Examples: API requests, API responses, function calls.
  5. Activation Bars – Thin rectangles on lifelines that show when an object is active or processing a request.

2. How API Calls Appear in a Sequence Diagram

In an IT automation context (Cisco DevNet environment), sequence diagrams often show API calls between components.

Example Scenario: A network administrator uses a script to get device status from Cisco DNA Center.

  1. User/Script → Cisco DNA Center API: Sends a request to get device status.
    • Arrow labeled: GET /dna/intent/api/v1/network-device
  2. Cisco DNA Center → Database/Controller: The system processes the request.
    • Optional internal arrows can show calls between system components.
  3. Cisco DNA Center → User/Script: Returns response data.
    • Arrow labeled: 200 OK + JSON payload

So in the sequence diagram:

  • Each step is represented chronologically from top to bottom.
  • Each arrow represents an API request or response.
  • You can quickly see which system is responsible for which action.

3. Common Symbols in API Sequence Diagrams

SymbolMeaning in API Context
Solid arrow →Synchronous API call or request
Dashed arrow →Response from the API
Rectangle on lifelineProcessing time for the API
Label on arrowAPI method (GET, POST, PUT, DELETE) and endpoint
Notes/CommentsExtra info about data format, errors, or authentication

4. Interpreting the Diagram for the Exam

When asked to interpret a sequence diagram with API calls, you should be able to:

  1. Identify actors and systems
    • Who initiates the request? (e.g., script, user)
    • Who responds? (e.g., API server, network controller)
  2. Follow the order of events
    • Top-to-bottom order matters.
    • First arrow = first action.
  3. Understand the type of API call
    • Look for HTTP methods (GET, POST, PUT, DELETE).
    • Look at endpoints and data payloads.
  4. Recognize responses and data formats
    • Successful responses: HTTP 200 OK
    • Error responses: HTTP 4xx or 5xx
    • Data is often JSON or XML
  5. Notice activation and processing
    • Long activation bars = longer processing tasks
    • Multiple arrows from one system = multiple calls

5. Example in IT Terms (Simple Version)

Imagine a Python script that talks to Meraki Dashboard API to list all devices:

Sequence Diagram Steps:

  1. Script → Meraki API: GET /networks/{networkId}/devices
  2. Meraki API → Database: Look up devices
  3. Meraki API → Script: Return JSON list of devices
  4. Script → Script: Parse JSON and print device names
  • Each arrow shows a message or API call
  • The diagram helps visualize how the script interacts with the API

6. Exam Tips

  • Always check who is sending and who is receiving.
  • Pay attention to arrow direction (request vs response).
  • Remember API details: HTTP method, endpoint, response code.
  • Note the order of calls — sequence diagrams are chronological.
  • Look for activation bars — they indicate processing by the system.

Summary

  • Sequence diagrams show interactions over time.
  • API calls are represented as arrows between systems.
  • You should be able to read who sends requests, who responds, and in what order.
  • Recognize HTTP methods, endpoints, and responses.
  • Useful for understanding automation scripts, network controllers, and IT system interactions.
Buy Me a Coffee