Categories

API Mock Server

Generate a runnable Redis-backed mock API server with 1-hour TTL, hot updates, and dynamic templated responses

Create a temporary mock server for frontend and API testing.

  • Input endpoint description as JSON
  • Generate a unique mock server ID
  • Store mock definition in Redis for 1 hour
  • Test immediately through /mock/{id}
  • Re-run with the same ID to hot-update responses without restarting

Example Results

1 examples

Create a runnable mock API session

Generate a temporary mock server in Redis and test endpoints for one hour

{
  "mockId": "abc123...",
  "baseUrl": "http://localhost:3000/mock/abc123/api"
}
View input parameters
{ "mockDefinitionJson": "{\n \"name\": \"User Service Mock\",\n \"basePath\": \"/api\",\n \"endpoints\": [\n {\n \"method\": \"GET\",\n \"path\": \"/users/:id\",\n \"status\": 200,\n \"responseType\": \"json\",\n \"dynamicResponse\": true,\n \"responseBody\": {\n \"id\": \"{{params.id}}\",\n \"name\": \"Mock User\",\n \"trace\": \"{{query.trace}}\",\n \"requestedAt\": \"{{now}}\"\n }\n }\n ]\n}" }

Key Facts

Category
Development
Input Types
textarea, text
Output Type
json
Sample Coverage
4
API Ready
Yes

Overview

Create a temporary mock server for frontend and API testing. - Input endpoint description as JSON - Generate a unique mock server ID - Store mock definition in Redis for 1 hour - Test immediately through /mock/{id} - Re-run with the same ID to hot-update responses without restarting

When to Use

  • Use it when you need to generate json content quickly in the browser.
  • Helpful for development workflows that need repeatable inputs and fast results.
  • Useful when you want to test input and output behavior before integrating the workflow elsewhere.

How It Works

  • Provide Mock Definition JSON, Existing Mock ID (Optional) as input to the tool.
  • The tool processes the request and returns a json result.
  • For repeatable workflows, use the API endpoint shown on the page after validating the result interactively.

Use Cases

Generate json data during debugging or QA.
Validate expected output before using the API or automation flows.
Compare small variations of input to understand output differences quickly.

Try with Samples

json

Related Hubs

FAQ

What does API Mock Server do?

API Mock Server helps you generate json content online without setting up a separate local script or app.

When should I use this tool?

Use it when you need a quick generate workflow, want to verify output, or need a browser-based utility for development tasks.

Can I try this tool with sample data?

Yes. Try short representative inputs first, then move to larger or more complex cases once the output looks correct.

What inputs does API Mock Server accept?

API Mock Server accepts Mock Definition JSON, Existing Mock ID (Optional).

Is there an API for API Mock Server?

Yes. The tool page includes an API endpoint so you can move from manual testing to scripted usage.

API Documentation

Request Endpoint

POST /en/api/tools/api-mock-server

Request Parameters

Parameter Name Type Required Description
mockDefinitionJson textarea Yes -
mockId text No -

Response Format

{
  "key": {...},
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
JSON Data: JSON Data

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-api-mock-server": {
      "name": "api-mock-server",
      "description": "Generate a runnable Redis-backed mock API server with 1-hour TTL, hot updates, and dynamic templated responses",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=api-mock-server",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

If you encounter any issues, please contact us at [email protected]