Skip to main content
REST API

Bulk Operations

RequestParseValidateHard

What you will learn

  • Partial success is common โ€” test that per-item status is returned, not a single global 200/500
  • Send batch_size + 1 and expect 413 Payload Too Large โ€” the limit must be enforced, not just documented
  • Use idempotency keys on batch calls โ€” a retried batch must produce the same item-level outcomes, not duplicates

Description

Create or update multiple resources in a single request.

Test Scenario

const response = await request.post('/api/v1/users/bulk', {
  data: [
    { name: 'User 1', email: 'u1@test.com' },
    { name: 'User 2', email: 'u2@test.com' },
  ]
});
expect(response.status()).toBe(201);
Endpoint/api/v1/users/bulk

Testing Tips

  • โ€ขSend array of objects
  • โ€ขCheck partial success handling
  • โ€ขVerify response includes all results
// Playwright API Testing - REST
import { test, expect } from '@playwright/test';
test('REST API request', async ({ request }) => {
const response = await request.get('/api/v1/resource');
expect(response.ok()).toBeTruthy();
expect(response.status()).toBe(200);
const data = await response.json();
expect(data).toBeDefined();
});

Challenge ID: rest-bulk-operations

2 frameworks available

API Playground

Send requests and inspect responses

Endpoint: /api/v1/users/bulk

Press Enter to send