📘Cisco DevNet Associate (200-901 DEVASC)
HTTP Response Codes Overview
When a client (like a web browser, script, or network tool) makes a request to a REST API, the server responds with a status code. This code tells you what happened with your request.
These codes are three-digit numbers, and they are grouped into five classes:
| Class | Range | Meaning |
|---|---|---|
| 1xx | 100–199 | Informational: The server received the request and is continuing the process. Rarely used in REST APIs. |
| 2xx | 200–299 | Success: The request worked as expected. |
| 3xx | 300–399 | Redirection: The client needs to take additional action (like following a new URL). |
| 4xx | 400–499 | Client Error: Something was wrong with the request sent by the client. |
| 5xx | 500–599 | Server Error: Something went wrong on the server side. |
For DevNet exam purposes, you’ll mainly focus on 2xx, 4xx, and 5xx codes.
1. 2xx Success Codes
These codes indicate the request worked successfully.
200 OK
- Meaning: The request was successful, and the server is returning the requested data.
- Example: You request a list of devices from a network controller API. The server responds with the device list and a 200 OK.
201 Created
- Meaning: A new resource has been successfully created.
- Example: You send a POST request to add a new switch configuration. The server creates it and responds with 201 Created along with the new resource’s ID.
204 No Content
- Meaning: The request was successful, but there is no data to return.
- Example: You send a DELETE request to remove a VLAN from a switch. The VLAN is removed, but the server doesn’t need to return anything, so it replies 204 No Content.
2. 4xx Client Error Codes
These codes indicate the client (you) made a mistake in the request.
400 Bad Request
- Meaning: The request is malformed or contains invalid syntax.
- Example: You send a request to create a new router, but the JSON payload is missing a required field like
hostname. The server replies 400 Bad Request.
401 Unauthorized
- Meaning: The request lacks valid authentication credentials.
- Example: You try to access an API endpoint without providing an API token. The server replies 401 Unauthorized.
403 Forbidden
- Meaning: The server understood the request, but you don’t have permission.
- Example: You try to delete a device configuration as a read-only user. The server replies 403 Forbidden.
404 Not Found
- Meaning: The requested resource doesn’t exist.
- Example: You try to get a VLAN with ID 100, but it doesn’t exist. The server replies 404 Not Found.
409 Conflict
- Meaning: The request conflicts with the current state of the server.
- Example: You try to create a device that already exists. The server replies 409 Conflict.
3. 5xx Server Error Codes
These codes indicate that the server failed to process a valid request.
500 Internal Server Error
- Meaning: The server encountered an unexpected error.
- Example: The API server crashes while processing your request. The client receives 500 Internal Server Error.
502 Bad Gateway
- Meaning: The server received an invalid response from another server it was trying to communicate with.
- Example: Your network API is behind a gateway that can’t reach the database, returning 502 Bad Gateway.
503 Service Unavailable
- Meaning: The server is temporarily unable to handle the request (maintenance or overload).
- Example: The network management API is overloaded with too many requests. It replies 503 Service Unavailable.
Quick Reference Table for Exam
| Code | Name | Meaning | IT Example |
|---|---|---|---|
| 200 | OK | Request succeeded | Fetching device list |
| 201 | Created | Resource created | Adding a new switch |
| 204 | No Content | Success, no data | Deleting a VLAN |
| 400 | Bad Request | Request malformed | Missing JSON field |
| 401 | Unauthorized | Authentication needed | No API token provided |
| 403 | Forbidden | Access denied | Read-only user tries to delete config |
| 404 | Not Found | Resource not found | VLAN ID doesn’t exist |
| 409 | Conflict | Conflict with current state | Device already exists |
| 500 | Internal Server Error | Server problem | Server crashed |
| 502 | Bad Gateway | Invalid server response | API gateway can’t reach DB |
| 503 | Service Unavailable | Server overloaded | Too many requests |
Exam Tips
- Remember 2xx = success, 4xx = client error, 5xx = server error.
- Know the common codes for CRUD operations:
- GET → 200 OK
- POST → 201 Created
- PUT → 200 OK or 204 No Content
- DELETE → 204 No Content
- Think in IT terms: API calls to network devices, servers, or services, not real-world objects.
