Skip to main content

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:
{
  "id": 1,
  "name": "George Orwell"
}

Response Format

All endpoints return responses wrapped in a standard ApiResponse object:
{
  "success": true,
  "timestamp": "2026-03-03T10:00:00Z",
  "data": { ... },
  "message": "Optional message",
  "error": null
}

Response Fields

  • success (boolean) - Indicates if the request was successful
  • timestamp (string) - ISO 8601 timestamp of the response
  • data (object) - The response payload
  • message (string) - Optional success or info message
  • error (object) - Error details (null on success)

Build docs developers (and LLMs) love