API Documentation & Testing Console
A complete suite of RESTful API endpoints for practicing API automation with Postman, RestAssured, Python requests, and Playwright API. Every endpoint features live execution, editable request bodies, authentication tokens, and copyable automation snippets.
Authentication State
Not Logged InExecute endpoint #5 (User Login) below to generate your session Bearer token, which will automatically populate the header for #6 (Protected Data).
Returns a list of all registered test users with profiles, roles, and contact details.
Automation code snippets
import requests
res = requests.get("https://bugmukti.com/api/v1/users")
assert res.status_code == 200
data = res.json()
assert len(data) >= 3
assert data[0]["firstname"] == "Aarav"import { test, expect } from '@playwright/test';
const res = await request.get('https://bugmukti.com/api/v1/users');
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.length).toBeGreaterThanOrEqual(3);
expect(body[0].firstname).toBe('Aarav');Creates a new user record. Provide a JSON payload with firstname, lastname, email, mobile, and role.
Request Body (JSON)
Automation code snippets
payload = {
"firstname": "Priya",
"lastname": "Sharma",
"email": "priya@example.com",
"mobileNumber": "919876543210"
}
res = requests.post("https://bugmukti.com/api/v1/users", json=payload)
assert res.status_code == 201
assert res.json()["data"]["id"] is not Noneconst payload = {
firstname: 'Priya',
lastname: 'Sharma',
email: 'priya@example.com',
mobileNumber: '919876543210'
};
const res = await request.post('https://bugmukti.com/api/v1/users', { data: payload });
expect(res.status()).toBe(201);
const body = await res.json();
expect(body.data.id).toBeTruthy();Performs a complete resource replacement for user record #1.
Request Body (JSON)
Automation code snippets
res = requests.put("https://bugmukti.com/api/v1/users/1", json=payload)
assert res.status_code == 200
assert "Lead SDET" in res.json()["updatedData"]["lastname"]const res = await request.put('https://bugmukti.com/api/v1/users/1', { data: payload });
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.updatedData.lastname).toContain('Lead SDET');Updates specific fields without replacing the entire entity (e.g. updating only the mobile number).
Request Body (JSON)
Automation code snippets
res = requests.patch("https://bugmukti.com/api/v1/users/1", json={"mobileNumber":"919999888877"})
assert res.status_code == 200
assert res.json()["updatedData"]["mobileNumber"] == "919999888877"const res = await request.patch('https://bugmukti.com/api/v1/users/1', {
data: { mobileNumber: '919999888877' }
});
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.updatedData.mobileNumber).toBe('919999888877');Removes user #1 from the system. Returns 200 OK with confirmation message.
Automation code snippets
res = requests.delete("https://bugmukti.com/api/v1/users/1")
assert res.status_code == 200
assert res.json()["status"] == "success"const res = await request.delete('https://bugmukti.com/api/v1/users/1');
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.status).toBe('success');Authenticates user credentials. Returns a signed JWT session token. Default test credentials: user1 / password1.
Credentials Payload (JSON)
Automation code snippets
res = requests.post("https://bugmukti.com/api/v1/auth/login", json={"username":"user1","password":"password1"})
assert res.status_code == 200
token = res.json()["token"]
assert token.startswith("eyJ")const res = await request.post('https://bugmukti.com/api/v1/auth/login', {
data: { username: 'user1', password: 'password1' }
});
expect(res.status()).toBe(200);
const body = await res.json();
const token: string = body.token;
expect(token.startsWith('eyJ')).toBeTruthy();Requires header Authorization: Bearer <token>. Returns 401 Unauthorized if missing or invalid; 200 OK with secret test telemetry if authorized.
Automation code snippets
headers = {"Authorization": f"Bearer {token}"}
res = requests.get("https://bugmukti.com/api/v1/protected", headers=headers)
assert res.status_code == 200
assert res.json()["status"] == "success"
# Assert 401 without header
res_no_auth = requests.get("https://bugmukti.com/api/v1/protected")
assert res_no_auth.status_code == 401const headers = { Authorization: `Bearer ${token}` };
const res = await request.get('https://bugmukti.com/api/v1/protected', { headers });
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.status).toBe('success');
// Assert 401 without header
const resNoAuth = await request.get('https://bugmukti.com/api/v1/protected');
expect(resNoAuth.status()).toBe(401);