Static mock JSON data endpoints for frontend and API testing

Lightweight, deterministic static JSON fixtures served with Access-Control-Allow-Origin: * headers for unit tests, tutorials, and local frontend prototypes.

Available static JSON fixtures

Each file below is a static JSON document hosted directly on our CDN with permissive read-only CORS headers configured in /_headers. For high-frequency automated CI runs or load testing, please download the files once and serve them from your own repository or test runner so you never depend on an external network connection during CI.

Static mock JSON files
Static URL pathExact sizeCORS policySHA-256 checksumDownload
/mock-data/errors-400.json 393 bytes Access-Control-Allow-Origin: * b99aadc75c3208da974194f69cdebf52817758a7d40e7ae05e9ea6f5304de73d Download JSON
/mock-data/orders-1.json 514 bytes Access-Control-Allow-Origin: * e5f81d0bce69b87705d910d601ea85ad6576e12a62057169741fe51d4b28c0f4 Download JSON
/mock-data/posts-1.json 484 bytes Access-Control-Allow-Origin: * 0b4675135701e23ecd235d8978175a2371c7a2f479b4e14dcfd3b6e578a40995 Download JSON
/mock-data/products-1.json 758 bytes Access-Control-Allow-Origin: * 06e192b56536ceb59812fd9deffaaa7f2b73efaf0148f5459c2a779e20c29476 Download JSON
/mock-data/users-1.json 909 bytes Access-Control-Allow-Origin: * bb370b7cde99b99c27a60a2fdd4db14b096b0ac5c38f7c665e7f6797d081a91f Download JSON

Example usage in browser fetch(), Node.js and curl

// 1. Browser or Node 18+ fetch() example
const res = await fetch('https://www.sampletestfiles.com/mock-data/users-1.json');
const payload = await res.json();
console.assert(payload.data.length === 5 && payload.data[0].username === 'amorgan');

// 2. Testing HTTP 400 validation error payload parsing
const errRes = await fetch('https://www.sampletestfiles.com/mock-data/errors-400.json');
const errBody = await errRes.json();
console.log(errBody.error.code, errBody.error.field_errors[0].rule);

Schema overview of the 5 mock files

Frequently asked questions

Are these mock JSON files backed by a database or server code?
No. They are 100% static .json files pre-built at compile time and served with Content-Type: application/json and Access-Control-Allow-Origin: *. PUT, POST, and DELETE requests are not accepted.
Should I hit these URLs in a high-concurrency load test?
No. Static mock URLs are intended for interactive debugging, code sandboxes, and low-volume unit tests. For CI/CD pipelines or load tests, download the JSON files (or use /datasets/) and commit them directly to your test fixtures folder.

Operational transparency, verification and developer reference

For technical questions or feedback regarding SampleTestFiles, contact contact@sjwebtechwork.com. Every sample file, dataset, and diagnostic utility on this site follows strict reproducibility and privacy rules: