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 URL path | Exact size | CORS policy | SHA-256 checksum | Download |
|---|---|---|---|---|
| /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
/mock-data/users-1.json: Paginated response envelope (page,per_page,total,data[]) containing 5 synthetic user objects withid,username,name,role,email(at reservedexample.com/.org/.netdomains), and booleanactivestatus./mock-data/products-1.json: Hardware/networking product catalog containing SKU strings, decimal USD prices, boolean inventory flags, and floating-point ratings./mock-data/orders-1.json: Relational order records referencingcustomer_idvalues fromusers-1.jsonwith ISO 8601 UTC timestamps./mock-data/posts-1.json: Blog/article metadata objects with array tags and boolean publication states./mock-data/errors-400.json: Structured API validation error response modeling a magic-byte vs. extension mismatch.
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:
- Zero server-side file storage of visitor inputs: When you use our File Generator, Test Data Generator, Magic-Byte File Inspector, Browser Support Checker, or Developer Tools, all computation runs inside your browser's local JavaScript engine and Web Workers. No files or form inputs are transmitted to our servers.
- Deterministic provenance and public-domain licensing: All hosted fixtures under
/pub-files/and/mock-data/are synthesized from mathematical test patterns, sine waves, and invented records under our CC0 / Public Domain Licence and documented with exact commands on Methodology. - Cryptographic verification: Every file is accompanied by its exact byte length and 64-character SHA-256 digest, listed in our SHA-256 Checksum Directory, /checksums.txt, and /files.json.