Restful Booker API Testing Project

Authentication API Analysis

Version 1.0 | Prepared by Filip Jelinek

Authentication API Analysis

Document Information

Item Details
Project Restful Booker API Testing
Sprint Sprint 2 – Authentication
Endpoint POST /auth
Version 1.1
Status Completed
Author Filip Jelinek
Last Updated July 2026

In-page Navigation

Purpose

The purpose of this document is to analyze the Authentication endpoint of the Restful Booker API before designing test scenarios, test cases, and Postman requests.

The analysis identifies:

This document serves as the technical foundation for Sprint 2.


Endpoint Information

Property Value
Endpoint /auth
HTTP Method POST
Authentication Required No
Content-Type application/json
Response Format application/json

Endpoint Purpose

The endpoint authenticates a user using a username and password.

If the credentials are valid, the API returns an authentication token.

The generated token is later used to authorize protected endpoints:


Request Analysis

Required Headers

Header Required Expected Value
Content-Type Yes application/json

Request Body

{
  "username": "admin",
  "password": "password123"
}

Request Properties

Property Type Required Description
username String Yes User login name
password String Yes User password

Successful Response

Example:

{
  "token": "abc123456789"
}

Response Properties

Property Type Description
token String Authentication token used for protected requests

Authentication Flow

Client
    │
    ▼
POST /auth
    │
    ▼
Validate Credentials
    │
    ▼
Generate Token
    │
    ▼
Return Token
    │
    ▼
Store Token
    │
    ▼
Use Token for Protected Requests

Functional Requirements

The endpoint should:


Input Validation Analysis

The endpoint should be tested with:

Valid Input

Invalid Credentials

Missing Data

Invalid Values

Invalid Request Format


Expected Response Validation

The response should be validated for:


HTTP Status Code Analysis

Expected successful response:

200 OK

Negative responses should be documented during testing because the public documentation does not define every error condition.


Authentication Token Analysis

The generated token is expected to:

The documentation does not define:

These represent exploratory testing opportunities.


Risks

Potential risks include:


Requirement Gaps

The published documentation does not specify:

These gaps should be documented during execution instead of assumed.


Test Design Implications

The endpoint requires:

The generated authentication token should be extracted dynamically and stored as an environment or collection variable for subsequent protected requests.


Dependencies

POST /auth
        │
        ▼
Generate Token
        │
        ▼
Store Token
        │
        ▼
PUT /booking/{id}

PATCH /booking/{id}

DELETE /booking/{id}

Conclusion

The Authentication endpoint is the entry point for all protected operations within the Restful Booker API.

Although the endpoint itself is relatively simple, it introduces one of the project’s most important dependencies because the generated authentication token is required for subsequent update and delete operations.

The endpoint should therefore be validated not only for successful authentication but also for response structure, token usability, input validation, and consistency with the documented API contract.


Prepared by: Filip Jelinek

Role: QA Tester

Version: 1.1

Status: Completed