API and REST Assured Interview Preparation
Guide
1. Foundational Concepts
API: An Application Programming Interface is a set of rules allowing software applications to
communicate.
REST API: An architectural style using HTTP protocols to perform operations on resources.
JSON: JavaScript Object Notation, a lightweight data-interchange format.
2. HTTP Fundamentals
REST vs HTTP: HTTP is the transport protocol; REST is the design pattern.
Concept Definition
Safe Methods that do not modify resources (e.g., GET).
Idempotent Identical requests have the same effect (e.g., PUT).
Cacheable Responses can be stored for future use.
3. Rest Assured Automation
Rest Assured uses method chaining to create fluent, readable tests.
• Assertions: Use Hamcrest matchers (e.g., equalTo) for readable verification.
• Serialization/De-serialization: Conversion between Java objects and JSON payloads.
• Specifications: Use RequestSpecBuilder and ResponseSpecBuilder to reuse configurations.
4. Authentication & Security
OAuth 2.0: Authorization framework covering flows like Authorization Code, Implicit, and Client
Credentials.
JWT: JSON Web Token for stateless authentication.