How Sandboxing Works

Learn how Playground API isolates mutations to your private session while preserving pristine baseline data for all users.

The Overlay Merging Engine

Playground API utilizes a read-time virtual overlay engine:

  • Layer 1 (Baseline Seed): Read-only global dataset shared by all users.
  • Layer 2 (Private Overlay): Your POST creates, PUT updates, and DELETE removals stored against your session ID.
  • Layer 3 (Merged Output): When you call GET /posts, the server overlays your changes onto the seed data dynamically.

Session Identification (Cookies & Headers)

Sessions are automatically managed via HTTP cookies. For automated Playwright test suites or mobile apps where cookies may be restricted, you can pass the identity header:

headerAuth.js
1
// Header Identification for Mobile / CI Test Runs
2
fetch('https://playground-api-xi.vercel.app/api/v1/posts', {
3
headers: {
4
'X-Playground-Identity': 'test-run-session-id',
5
},
6
});

Resetting Sandbox to Baseline State

To wipe your mutations and restore pristine baseline data, send a single DELETE /api/v1/session/reset request.