cURL
curl --request GET \ --url https://api.example.com/api/authors/{id}
{ "success": true, "timestamp": "<string>", "data": { "id": 123, "name": "<string>" } }
Retrieve a specific author by their ID
GET /api/authors/{id}
curl -X GET "http://localhost:8080/api/authors/1" \ -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \ -H "Content-Type: application/json"
{ "success": true, "timestamp": "2026-03-03T10:00:00Z", "data": { "id": 1, "name": "George Orwell" } }
{ "success": false, "timestamp": "2026-03-03T10:00:00Z", "error": { "code": "UNAUTHORIZED", "message": "Authentication required" } }
{ "success": false, "timestamp": "2026-03-03T10:00:00Z", "error": { "code": "NOT_FOUND", "message": "Author not found with id: 999" } }