📘Cisco DevNet Associate (200-901 DEVASC)
1. Introduction to API Styles
An API (Application Programming Interface) allows one software application to communicate with another software application.
In the DevNet Associate exam, you must understand:
- Different API architectural styles
- How they work
- Their characteristics
- When they are typically used in IT environments
- Their advantages and limitations
The most important styles for the exam are:
- REST
- RPC
- Synchronous APIs
- Asynchronous APIs
2. REST (Representational State Transfer)
REST is the most commonly used API style today, especially in web services and cloud platforms.
REST APIs are typically built on:
- HTTP protocol
- Standard HTTP methods (GET, POST, PUT, DELETE)
- JSON format for data exchange
2.1 Key Characteristics of REST
1. Resource-Based
REST is built around resources.
A resource is any object or data that the API manages.
Examples in an IT environment:
- A network device
- A user account
- A VLAN
- A virtual machine
- A ticket in a ticketing system
Each resource is identified using a URI (Uniform Resource Identifier).
Example:
/devices
/devices/101
/users/55
2. HTTP Methods in REST
REST uses standard HTTP methods:
| Method | Purpose |
|---|---|
| GET | Retrieve data |
| POST | Create new resource |
| PUT | Update resource |
| DELETE | Remove resource |
Example (network automation platform):
- GET /devices → Get list of devices
- POST /devices → Add a new device
- PUT /devices/101 → Update device
- DELETE /devices/101 → Remove device
3. Stateless
REST is stateless.
This means:
- Each request is independent
- The server does NOT remember previous requests
- All required information must be included in each request
This improves:
- Scalability
- Performance
- Simplicity
4. Data Format
REST commonly uses:
- JSON (most common)
- XML (less common today)
Example JSON response:
{
"id": 101,
"hostname": "router1",
"status": "active"
}
5. Uses HTTP Status Codes
REST APIs use standard HTTP response codes:
- 200 OK
- 201 Created
- 400 Bad Request
- 401 Unauthorized
- 404 Not Found
- 500 Internal Server Error
Understanding these is important for troubleshooting in the exam.
2.2 Where REST is Used in IT
REST is used in:
- Cloud platforms
- Network controllers
- Monitoring tools
- DevOps automation tools
- SaaS platforms
Examples:
- Cisco Meraki Dashboard API
- Cisco DNA Center APIs
- GitHub REST API
2.3 Advantages of REST
- Simple to understand
- Uses standard HTTP
- Lightweight
- Scalable
- Works well over the internet
2.4 Limitations of REST
- Sometimes requires multiple requests
- No strict standard enforcement
- Can be less efficient for complex operations
3. RPC (Remote Procedure Call)
RPC is another API style.
Instead of focusing on resources (like REST), RPC focuses on actions or functions.
It works like calling a function in another system.
3.1 How RPC Works
In RPC:
- The client calls a specific method
- The server executes that method
- The server returns the result
Example (network system):
rebootDevice(deviceID)
getDeviceStatus(deviceID)
createUser(username)
Here, the API is centered around actions, not resources.
3.2 Types of RPC
Common RPC technologies include:
- gRPC
- XML-RPC
- SOAP
SOAP (Simple Object Access Protocol)
- Uses XML
- Strict structure
- Enterprise environments
- Strong security features
Often used in:
- Financial systems
- Enterprise applications
gRPC
- Developed by Google
- High performance
- Uses Protocol Buffers (binary format)
- Used in microservices architecture
3.3 RPC Characteristics
- Action-based
- Usually tightly coupled
- Can be faster than REST
- Often used internally between services
3.4 RPC vs REST (Exam Comparison)
| Feature | REST | RPC |
|---|---|---|
| Focus | Resources | Actions/Functions |
| Protocol | HTTP | Various |
| Data Format | JSON (usually) | JSON, XML, Binary |
| Style | Standardized | Implementation-specific |
| Scalability | High | Depends on implementation |
For the exam:
- REST = resource-oriented
- RPC = function-oriented
4. Synchronous APIs
Synchronous means:
The client:
- Sends a request
- Waits for response
- Does nothing until response is received
This is blocking communication.
4.1 How It Works
Example (IT environment):
- A monitoring tool sends request to network controller
- It waits for device status
- Only after response arrives, it continues processing
4.2 Characteristics
- Simple design
- Easy to understand
- Immediate response
- Client waits
4.3 Limitations
- Not efficient for long tasks
- Can slow down applications
- Not good for large-scale event processing
4.4 Common Usage
- Most REST APIs
- CLI-based API calls
- Simple automation scripts
5. Asynchronous APIs
Asynchronous means:
The client:
- Sends a request
- Does NOT wait
- Continues other work
- Gets response later
This is non-blocking communication.
5.1 How It Works
Two common methods:
1. Polling
Client checks repeatedly:
GET /task/123/status
2. Webhooks
Server sends notification automatically when ready.
Example:
- Network controller finishes device configuration
- Sends notification to client system
5.2 Message-Based Asynchronous Systems
Often uses message brokers such as:
- Apache Kafka
- RabbitMQ
These systems:
- Send messages to queues
- Process events independently
- Enable event-driven architecture
5.3 Characteristics
- Non-blocking
- Scalable
- Good for long-running operations
- Good for event-driven systems
5.4 IT Use Cases
- Network provisioning tasks
- Bulk device configuration
- Log processing
- Monitoring alerts
- Cloud resource deployment
6. Synchronous vs Asynchronous (Exam Comparison)
| Feature | Synchronous | Asynchronous |
|---|---|---|
| Client waits? | Yes | No |
| Blocking? | Yes | No |
| Complexity | Simple | More complex |
| Performance | Lower for large systems | Better scalability |
| Good for | Simple tasks | Long tasks, events |
Exam Tip:
- Immediate response → Synchronous
- Background processing → Asynchronous
7. REST vs RPC vs Sync vs Async (Important Exam Concept)
REST and RPC are architectural styles.
Synchronous and Asynchronous are communication patterns.
You can combine them:
- REST + Synchronous (most common)
- REST + Asynchronous (long-running task APIs)
- RPC + Synchronous
- RPC + Asynchronous (microservices with message brokers)
The exam may test whether you understand this difference.
8. Quick Exam Summary
You must remember:
REST
- Resource-based
- Uses HTTP methods
- Stateless
- JSON format
- Most common in modern APIs
RPC
- Action/function-based
- Calls remote method
- Can use SOAP or gRPC
- Often used in internal systems
Synchronous
- Client waits
- Blocking
- Simple
Asynchronous
- Client does not wait
- Event-driven
- Better for scaling
- Uses polling or webhooks
9. Final Exam Preparation Tips
For DevNet Associate:
Be able to:
- Identify whether an API is REST or RPC
- Recognize synchronous vs asynchronous behavior
- Understand where each style is used
- Compare advantages and disadvantages
- Understand event-driven systems
- Recognize message brokers
- Understand polling vs webhooks
If you understand:
- Resource vs Action
- Blocking vs Non-blocking
- HTTP vs method calls
You are well prepared for this section of the exam.
