Skip to content
faker.tools
All 79

Plate IV · Developer, API & Database Seeding Utilities

REST API Response Simulator

Full request and response pairs, including the error shapes.

http
GET /api/v1/users HTTP/1.1

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Request-Id: 0504f72e-c22d-40b1-8bdc-416b3d853a4e
Date: Sun, 26 Jul 2026 21:05:30 GMT
Cache-Control: no-store
X-RateLimit-Remaining: 986

{
  "data": [
    {
      "id": 1,
      "fullName": "Alice Young",
      "email": "alice.young@example.com",
      "city": "Boise",
      "isActive": true,
      "createdAt": "2025-11-01T21:05:30Z"
    },
    {
      "id": 2,
      "fullName": "Ryan Lopez",
      "email": "ryan.lopez@example.com",
      "city": "Brooklyn",
      "isActive": true,
      "createdAt": "2026-01-09T21:05:30Z"
    },
    {
      "id": 3,
      "fullName": "Linda Anderson",
      "email": "linda.anderson@example.com",
      "city": "Savannah",
      "isActive": false,
      "createdAt": "2026-01-21T21:05:30Z"
    },
    {
      "id": 4,
      "fullName": "Iris Martin",
      "email": "iris.martin@example.com",
      "city": "Portland",
      "isActive": true,
      "createdAt": "2024-02-09T21:05:30Z"
    },
    {
      "id": 5,
      "fullName": "Thomas Moore",
      "email": "thomas.moore@example.com",
      "city": "Boise",
      "isActive": true,
      "createdAt": "2025-05-06T21:05:30Z"
    }
  ],
  "pagination": {
    "page": 1,
    "perPage": 5,
    "total": 65,
    "totalPages": 5
  },
  "links": {
    "self": "/api/v1/users?page=1",
    "next": "/api/v1/users?page=2",
    "prev": null
  }
}
64 lines · 1.4 KBGenerated in your browser · REST API Response Simulator

Client code handles the 200 case fine. The 401 that needs a token refresh, the 422 with field-level errors, the 429 with a Retry-After — those are where it breaks. Pick a status here and get a complete, correctly shaped response for it.

What you can control

  • Error bodies carry a type, a message, a code and a request ID, which is the shape most real APIs use.
  • A 422 includes field-level validation details, so you can test inline error rendering.
  • Response headers include rate-limit and request-ID fields that clients commonly read.
  • The pagination envelope wraps list responses with page metadata and navigation links.

What this is not

This produces static response text for use in a mock server or a fixture file. It does not stand up a live endpoint.

Questions

Can I point my app at this as a live API?

No. It generates response text to paste into a mock server such as MSW, Mirage, WireMock or a Postman example.

Why does the error body have a request ID?

Because that is what makes a production error report actionable. Including one in your fixtures means your error display has somewhere to put it.

What does the 422 detail array contain?

A field name, the rule that failed, and a human-readable message — the minimum a form needs to show an error next to the right input.

Next in Developer

All 11