API REFERENCE / V1

Sample Users API

Build a user table without connecting to customer records. Seeds vary country, role and status deterministically, while IDs, names and emails retain their demo pattern. The API does not provide name, role, status or country filters.

GEThttps://techidea.online/api/v1/sample/users

No client API key. Implemented endpoint; public launch and production security remain unverified.

Use it in an application

Use seed=demo and a small limit while developing a paginated user table. The same seed makes screenshots and UI tests repeatable; change the seed to exercise a different combination of roles and statuses.

200 synthetic records per seed; names explicitly say Demo User and emails use example.com.

Query parameters

ParameterRequiredRules
seedNoOptional 1–64 ASCII letters, digits, underscores or hyphens. Default techidea-v1. Identical seeds return identical data.
pageNoOptional integer 1–10000; default 1. Beyond the last page returns an empty array.
limitNoOptional integer 1–100; default 20.

Unknown and repeated parameters are rejected. Send no request body. Optional empty playground fields are omitted from the URL. The server validates that country/state codes exist, not just their format.

Example request

Configured production base: https://techidea.online. These snippets show the contract, not a claim that a public deployment is live. Check the HTTP status before using data.

const response = await fetch("https://techidea.online/api/v1/sample/users?seed=demo&page=1&limit=2");
const body = await response.json();
if (!response.ok) {
  throw new Error(body.error?.message || "HTTP " + response.status);
}
console.log(body);

Example JSON response

Recorded from the M4A handler for /api/v1/sample/users?seed=demo&page=1&limit=2 · HTTP 200. This is a static documentation example, not a live playground result.

{
  "success": true,
  "data": [
    {
      "id": 1,
      "name": "Demo User 001",
      "email": "demo-user-1@example.com",
      "country": "US",
      "role": "editor",
      "status": "active"
    },
    {
      "id": 2,
      "name": "Demo User 002",
      "email": "demo-user-2@example.com",
      "country": "JP",
      "role": "editor",
      "status": "active"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 2,
    "total": 200,
    "totalPages": 100
  },
  "meta": {
    "fictional": true,
    "seed": "demo",
    "notice": "Synthetic demonstration data only. Not real people, customers, products or offers."
  }
}

Record fields

FieldMeaning
idInteger demo ID, 1–200.
nameExplicit fictional name such as Demo User 001.
emailReserved example.com email address.
countryDemonstration country alpha-2 code; no personal-location claim.
roleviewer, editor or admin.
statusactive or inactive.

The envelope includes success, data and meta. Location metadata identifies the dataset and coverage; sample metadata marks the data fictional and records the seed.

Pagination

Defaults are page=1 and limit=20, with limit capped at 100 and page at 10000. The pagination object contains page, limit, total and totalPages. Filtering happens before pagination; an out-of-range page returns an empty array with the real total. No cursors are implemented.

Errors and troubleshooting

Do not send these addresses mail or treat these rows as real profiles. A blank seed is invalid in the API; omit it to use techidea-v1. Changing a seed changes data, not the total of 200 records.

Example error for /api/v1/sample/users?limit=101 · HTTP 400:

{
  "success": false,
  "error": {
    "code": "INVALID_PARAMETER",
    "message": "limit must be an integer from 1 to 100."
  }
}
HTTPMeaning
200Successful JSON response; an empty data array is valid.
400Missing, unknown, repeated or invalid query parameter; unsupported preflight header.
403Origin is not permitted by the configured CORS policy.
405Unsupported method; use GET, HEAD or OPTIONS.
413Request bodies are not accepted.
414Request URL exceeds 2,048 characters.
429Rate limited. Wait for Retry-After; do not retry immediately.
500Safe internal error or configured response-size limit exceeded.
503Service disabled, configuration incomplete, or gateway unavailable.

Access and rate limits

The prepared Nginx defaults are 60 requests/minute/IP with burst 20, a global 50 requests/second budget and 10 concurrent connections/IP. These are configurable deployment defaults, not verified live limits. A 429 includes Retry-After. The playground waits before permitting another request; your integration should also honor that header.

The browser sends no gateway token. Production defaults to disabled until the private Nginx gateway is configured; a direct request can return 503. CORS defaults to anonymous wildcard reads but can be restricted to exact origins. Do not send credentials. Responses are no-store with a default 256 KiB server cap. Read access and launch requirements →

Data source, license and limitations

These records are generated by TechIdea's deterministic M4A sample-data functions. They are fictional, not purchased records or customer data. No third-party product/user dataset license applies. example.com addresses are examples; products are not offers. Use the rows for demonstrations and tests, not business decisions.

LIVE · SAME ORIGIN

API playground

GET

Requests go to this site, not the production example URL. A 503 means the gateway or service is unavailable. No API key or proxy secret is sent by this UI.

Optional 1–64 ASCII letters, digits, underscores or hyphens. Default techidea-v1. Identical seeds return identical data.
Optional integer 1–10000; default 1. Beyond the last page returns an empty array.
Optional integer 1–100; default 20.

GET /api/v1/sample/users?seed=techidea-v1&page=1&limit=20

No request has been sent.

Related APIs