Mock try-out
There are three ways to see what a mock answers before a consumer depends on it, from lightest to
heaviest. A GraphQL version's hosted mock is called the same way, at its /graphql URL:
| Way | Where | Needs a running mock |
|---|---|---|
| Try it — render one request without sending it | The Scenarios and Correlation editors | No |
| Hosted mock — call the version's mock URL | The Mock cell on Published or Versions | Yes, turned on |
| GraphQL mock — query a GraphQL version, or open GraphiQL | The /graphql URL in the Mock cell on Published | Yes, turned on |
| Mock server test drive — a short-lived mock of a file you just exported | Export studio, Review & Generate | Started for you, for 30 minutes |
Preview a response (Try it)
Route/ade/dashboard/published
- On Published, click “Scenarios” (or “Correlation”) in a version's Mock cell.
- Under Try it, choose an operation —
GET /pets— and fill in any parameters. - Click “Render”. You see the status, headers and body the mock would return, and a trace naming the layer that answered — a scenario and its rule, correlation or the spec's example.
Nothing is saved and nothing is sent: the preview uses the editor's unsaved draft, so you can try a change before Save scenarios. Latency and chaos are reported rather than applied. Details are in Mock response preview.


/ade/dashboard/publishedCall the hosted mock
Turn on the version's mock on Published, copy its URL and
call it. Send X-Mock-Scenario: <name> to pick a scenario:
curl https://mock.apiome.dev/acme/payments-api/2.3.1/payments
curl -H 'X-Mock-Scenario: quota-exceeded' https://mock.apiome.dev/acme/payments-api/2.3.1/payments
The Mock cell's sparkline counts the requests over 30 days. Counts reach it within a few seconds, because the mock writes them in batches.
After you turn a mock off, it can keep answering for up to 5 seconds. After you revoke an API key, private mocks can keep accepting it for up to 30 seconds. Both are the default cache times. Your administrator can change them: see The mock runtime's database work per request.
A mock starts from the version's stored OpenAPI
document: the same bytes GET /v1/schema serves.
Publishing a version stores that document, so starting a mock, saving its scenarios and
Try it do not generate it again.
Query a GraphQL mock
Route/ade/dashboard/published
A version imported from GraphQL SDL is mocked at one URL, which its Mock cell shows and copies in place of the base URL.
- On Published, turn on the GraphQL version's Mock switch.
- Click the copy button beside the URL ending in
/graphql. - Open the URL in a browser to explore the schema in GraphiQL, or send operations to it:
curl -X POST https://mock.apiome.dev/acme/people-graph/1.0.0/graphql \
-H 'Content-Type: application/json' \
-d '{"query": "{ user(id: \"1\") { id email } }"}'
Fields with declared examples return them; everything else is seeded synthetic data, the same for
the same ?__seed=. Scenarios and chaos name a root field as Query.user. The note under the URL
is a reminder that subscriptions are not served yet: a subscription returns an error with code
UNSUPPORTED_ON_THIS_DEPLOYMENT. Limits, errors and the resolver order are in
GraphQL mocks.


/ade/dashboard/publishedPublish events to Kafka
An AsyncAPI version whose mock is bound to a Kafka broker publishes its events there. It sends one message per channel every couple of seconds while the mock is on. Binding a version is done through the REST API; see Event mock brokers.
- On Published, check that the AsyncAPI version's Mock cell reads Events · Kafka broker bound, plus WebSocket/SSE.
- Point a Kafka consumer at the broker and the channel's topic.
user/signeduppublishes touser.signedup. - To send one message right away, post to the channel's
publishroute. Add a JSON body to choose the payload:
curl -X POST https://mock.apiome.dev/acme/user-events/1.1.0/__channels__/user/signedup/publish \
-H 'Content-Type: application/json' \
-d '{"userId": "u-1", "email": "ada@example.com"}'
A payload that doesn't match the message schema is refused (422) and never sent. GET …/__channels__
lists each channel's topic, encoding and whether it can be published.
Test-drive an export
Route/ade/dashboard/export/studio
After you generate an OpenAPI file in the Export studio, the Review & Generate step offers the Mock server tab under Test drive — proof that the file behaves like an API, not just that it parses.


/ade/dashboard/export/studio- Click “Start mock”. The file is served as a live API for 30 minutes (the server default). Its base URL appears with “Copy URL”, a countdown — Expires in 30:00 — how many operations it has and how many requests it has served.
- Under Try an operation, choose a Scenario if the file declares any, fill in path
parameters (for example
1for{widgetId}) and click “Send”. The response shows its status, time and body; a body that does not match the file's own response schema is called out. - The Request log states each request's outcome in words: Schema-shaped response,
Matched, Body did not match the schema or No operation matched. Requests you send from
your own client with
curlappear here too. - “Restart” gives you a fresh mock; “Stop mock” ends it early. When time is up the panel says Expired — start another to keep testing.
The panel is hidden for targets the mock engine cannot serve, and Start mock is disabled, with the reason, on a server without mock infrastructure.
With the CLI or the API
- CLI:
apiome mock preview <project> <version> -X GET --path /pets/42renders a request like Try it;apiome mock run BUNDLEserves a version offline — see Portable mock runtime. - REST:
POST /v1/versions/{tenant}/{project_id}/{version_record_id}/mock/preview(Try it);POST /v1/export/{tenant}/mock,GET /v1/export/{tenant}/mock/{mock_id}/requestsandDELETE /v1/export/{tenant}/mock/{mock_id}(test drive) — see the API reference.
Where next
The Mock runtime guides cover the bundle format, fixture packs, callbacks, correlation, proxy capture, attestation and GraphQL mocks.