Design: REST API Design for Systems
Design focuses on the REST API layer including endpoints, request/response structure, authentication, and versioning. Backend implementation details and database design are out of scope.
Functional Requirements
FR1: Design a REST API to allow clients to perform CRUD operations on system resources.
FR2: Support authentication and authorization for secure access.
FR3: Provide pagination, filtering, and sorting for list endpoints.
FR4: Ensure API responses follow consistent and clear structure with proper HTTP status codes.
FR5: Support versioning to allow backward compatibility.
FR6: Handle error reporting with meaningful messages.
FR7: Allow rate limiting to protect the system from abuse.
Non-Functional Requirements
NFR1: API should handle up to 10,000 concurrent clients.
NFR2: Average API response time should be under 200ms (p99).
NFR3: Availability target is 99.9% uptime (about 8.77 hours downtime per year).
NFR4: API must be stateless to support horizontal scaling.
NFR5: Use JSON as the data exchange format.