๐Ÿ’ก Testing in Browser or Postman? You can open https://bugmukti.com/api/v1/users directly in a new tab to view the live JSON response immediately!
Open /api/v1/users โ†—
REST API Sandbox

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 In

Execute endpoint #5 (User Login) below to generate your session Bearer token, which will automatically populate the header for #6 (Protected Data).

GET /api/v1/users
Public

Returns a list of all registered test users with profiles, roles, and contact details.

โ†— Open in Browser (Raw JSON)
200 OK 18 ms
Automation code snippets
Python (requests)
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"
TypeScript (Playwright API)
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');
POST /api/v1/users
Create

Creates a new user record. Provide a JSON payload with firstname, lastname, email, mobile, and role.

Request Body (JSON)

201 Created 28 ms
Automation code snippets
Python (requests)
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 None
TypeScript (Playwright API)
const 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();
PUT /api/v1/users/1
Replace

Performs a complete resource replacement for user record #1.

Request Body (JSON)

200 OK 22 ms
Automation code snippets
Python (requests)
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"]
TypeScript (Playwright API)
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');
PATCH /api/v1/users/1
Modify

Updates specific fields without replacing the entire entity (e.g. updating only the mobile number).

Request Body (JSON)

200 OK 19 ms
Automation code snippets
Python (requests)
res = requests.patch("https://bugmukti.com/api/v1/users/1", json={"mobileNumber":"919999888877"})
assert res.status_code == 200
assert res.json()["updatedData"]["mobileNumber"] == "919999888877"
TypeScript (Playwright API)
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');
DELETE /api/v1/users/1
Delete

Removes user #1 from the system. Returns 200 OK with confirmation message.

200 OK 16 ms
Automation code snippets
Python (requests)
res = requests.delete("https://bugmukti.com/api/v1/users/1")
assert res.status_code == 200
assert res.json()["status"] == "success"
TypeScript (Playwright API)
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');
POST /api/v1/auth/login
Auth

Authenticates user credentials. Returns a signed JWT session token. Default test credentials: user1 / password1.

Credentials Payload (JSON)

200 OK 32 ms
Automation code snippets
Python (requests)
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")
TypeScript (Playwright API)
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();
GET /api/v1/protected
Bearer Token Required

Requires header Authorization: Bearer <token>. Returns 401 Unauthorized if missing or invalid; 200 OK with secret test telemetry if authorized.

Status 14 ms
Automation code snippets
Python (requests)
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 == 401
TypeScript (Playwright API)
const 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);