What is API | Bondar Academy
Course: Playwright API Testing with TypeScript
Module: API Testing Basics
Instructor: Artem Bondar
Lesson Summary
API Overview API stands for Application Programming Interface , which facilitates communication between a client (like a browser) and a server. This interaction occurs via the HTTP protocol using URLs , also known as URIs (Uniform Resource Identifiers). API URL Components An API URL typically consists of: Protocol: Usually HTTPS Domain: e.g., example.com Path/Resource: e.g., /API/articles Query Parameters: Key-value pairs after a question mark, e.g., limit=10&offset=0 Types of API Requests There are four main types of API requests: POST: Create a new record GET: Read an existing record PUT: Update an existing record DELETE: Remove an existing record The acronym CRUD represents these operations: Create, Read, Update, Delete. HTTP Status Codes Common HTTP status codes include: 200 Level: Success (e.g., 201 , 204 ) 400 Level: Client error (e.g., malformed request) 500 Level: Server error (e.g., internal issues) Client-Server Interaction In a typical client-server architecture, a user submits information (like a username and password) via a web browser, which sends a POST request to the server. The server processes this request and responds with data, often in JSON format. API Automation For automation, instead of using UI testing frameworks like Playwright that interact with the browser, you can directly send API requests. This approach is faster and more stable, as it bypasses the UI rendering process. In this course, you will learn how to utilize Playwright for direct API interactions to enhance testing speed and reliability.