Introduction
The Authors API provides endpoints to manage author information in the Library Management System. This API is split into two categories:- Public endpoints (
/api/authors) - Available to all authenticated users for reading author data - Management endpoints (
/api/management/authors) - Restricted to administrators for creating, updating, and deleting authors
Base URLs
- Public:
/api/authors - Management:
/api/management/authors
Authentication
- Public endpoints: Require authentication (Bearer token)
- Management endpoints: Require ADMIN role
Available Endpoints
Public Endpoints
List Authors
Get a paginated list of all authors
Get Author
Retrieve a specific author by ID
Management Endpoints (Admin Only)
Create Author
Add a new author to the system
Update Author
Modify an existing author’s information
Delete Author
Remove an author from the system
Data Model
All author endpoints return data in the following structure:Response Format
All endpoints return responses wrapped in a standardApiResponse object:
Response Fields
success(boolean) - Indicates if the request was successfultimestamp(string) - ISO 8601 timestamp of the responsedata(object) - The response payloadmessage(string) - Optional success or info messageerror(object) - Error details (null on success)