Skip to main content

Export mock

Generated from apiome-rest/openapi.yaml (API version 1.204.1) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: export-mock · 6 operations

GET /v1/export/{tenant_slug}/mock​

List the tenant's live test-drive mocks

The live test-drive mocks this workspace holds, newest first — what the per-tenant concurrency cap is measured against. Expired instances are omitted; hosted mocks provisioned from a published version (#3615) are managed on /v1/mocks/… and never appear here.

Operation id: list_export_mocks_v1_export__tenant_slug__mock_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for list the tenant's live test-drive mocks.application/json array of ExportMockInstanceResponse
422Validation Errorapplication/json HTTPValidationError

POST /v1/export/{tenant_slug}/mock​

Start an ephemeral mock of an emitted export artifact

Emit the source revision to the requested target, freeze the resulting OpenAPI document into a short-lived, tenant-scoped mock instance, and return its live base URL. The instance is served by the existing Mock Server data plane (/v1/mock/{mock_id}/…) and auto-tears-down at its TTL — after which the same URL answers 410 Gone. Only targets the engine can serve (the capability endpoint's supportedTargets) are accepted.

Operation id: provision_export_mock_v1_export__tenant_slug__mock_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for start an ephemeral mock of an emitted export artifact.

Responses

StatusDescriptionBody
201Successful response for start an ephemeral mock of an emitted export artifact.application/json ExportMockInstanceResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/export/{tenant_slug}/mock/capability​

Can this server start a mock of an emitted artifact?

The capability signal the Export Studio renders its Test-drive tab from (MFX-44.1's flag, answered for the mock tool). Reports whether the Mock Server engine is deployed and the export binding enabled, which target keys the engine can serve, and the TTL / concurrency / rate bounds a provision will apply — so a disabled panel can say why and an enabled one can state the terms before the user clicks Start.

Operation id: get_export_mock_capability_v1_export__tenant_slug__mock_capability_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for can this server start a mock of an emitted artifact?.application/json ExportMockCapabilityResponse
422Validation Errorapplication/json HTTPValidationError

GET /v1/export/{tenant_slug}/mock/{mock_id}​

Inspect one test-drive mock

One instance with a freshly computed expiry countdown and request count — what the Studio polls while a mock is live, and how it learns the mock has expired.

Operation id: get_export_mock_v1_export__tenant_slug__mock__mock_id__get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
mock_idpathstringyesPath parameter identifying the mock id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for inspect one test-drive mock.application/json ExportMockInstanceResponse
422Validation Errorapplication/json HTTPValidationError

DELETE /v1/export/{tenant_slug}/mock/{mock_id}​

Stop a test-drive mock now

Tear the instance down before its TTL and discard its request log. The base URL stops resolving immediately, and the workspace's concurrency budget is freed.

Operation id: destroy_export_mock_v1_export__tenant_slug__mock__mock_id__delete

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
mock_idpathstringyesPath parameter identifying the mock id segment.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
204Successful response for stop a test-drive mock now.—
422Validation Errorapplication/json HTTPValidationError

GET /v1/export/{tenant_slug}/mock/{mock_id}/requests​

Read a test-drive mock's request log

The requests this mock served, newest first: method, path, status, whether an operation matched, the scenario in force, and whether the body agreed with the response schema. The log is a bounded in-memory ring buffer scoped to the serving replica — a live view of a mock that expires in minutes, not a durable audit trail.

Operation id: get_export_mock_requests_v1_export__tenant_slug__mock__mock_id__requests_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
mock_idpathstringyesPath parameter identifying the mock id segment.
limitqueryintegernoMost entries to return.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for read a test-drive mock's request log.application/json ExportMockRequestLogResponse
422Validation Errorapplication/json HTTPValidationError

Schemas used​

ExportMockCapabilityResponse​

Whether this server can start test-drive mocks, and the bounds it applies (MFX-44.5).

The Studio calls this before it renders anything mock-shaped: an unavailable server means no Test-drive tab (or a disabled one carrying :attr:reason), and supported_targets keeps the decision of which targets can be mocked on the server, where the emitter registry lives.

PropertyTypeRequiredDescription
availablebooleanyesWhether a mock can be provisioned on this server now.
reasonstring or nullnoWhy mocking is unavailable, or null when it is available.
supportedTargetsarray of stringyesTarget emitter keys whose emitted document the mock engine can serve.
defaultTtlMinutesintegeryesTTL applied when a provision request names none.
maxTtlMinutesintegeryesCeiling a requested TTL is clamped to.
maxPerTenantintegeryesConcurrent live test-drive mocks one tenant may hold.
rateLimitPerMinuteintegeryesPer-instance request budget the data plane enforces.

ExportMockInstanceResponse​

A live test-drive mock: where to reach it, what it serves, and when it disappears.

PropertyTypeRequiredDescription
idstringyesThe mock instance id.
baseUrlstringyesStable base URL of the mock's data plane; append an operation path to it.
statusstringyesactive while it serves, expired once past its TTL.
targetstringyesThe resolved target format key the mock was emitted from.
targetKeystringyesThe emitter key the mock was started for (openapi) — what the Studio holds, so it can recognise a mock of the configuration it is showing.
targetLabelstringyesHuman label of that target (e.g. OpenAPI 3.1).
artifactstringyesThe artifact (project) id the mock was provisioned from.
versionstring or nullnoThe resolved revision's version label, when it has one.
operationCountintegeryesHow many operations the frozen document exposes.
operationsarray of ExportMockOperationnoThe operations themselves, ordered by path then method.
scenariosarray of stringnoSelectable scenario names; send one as X-Mock-Scenario per request.
activeScenariostringyesThe scenario in force when a request names none.
rateLimitPerMinuteintegeryesPer-instance request budget the data plane enforces.
requestCountintegeryesLifetime data-plane requests served (best-effort).
createdAtstring or nullnoISO-8601 provision time.
expiresAtstring or nullnoISO-8601 auto-teardown time.
expiresInSecondsintegeryesSeconds until auto-teardown, computed server-side so the countdown is immune to browser clock skew; 0 once expired.
lastActivityAtstring or nullnoISO-8601 time of the last served request, or null if none yet.

ExportMockProvisionRequest​

Start a test-drive mock for one (source, target, options) export configuration.

The same coordinates /verify, /document and /roundtrip take, so the mock serves exactly the artifact the Studio is showing: the emit is re-run server-side from the source revision rather than trusting a document posted by the browser.

PropertyTypeRequiredDescription
artifactstringyesThe artifact (project) id to mock an export of.
versionstring or nullnoRevision UUID, version label (1.0.0), or null for the latest revision.
targetstringyesTarget emitter key (openapi) or format key (openapi-3.1).
optionsobject or nullnoPer-target emit options (MFX-1.4); null or empty applies the target defaults.
ttlMinutesinteger or nullnoAuto-teardown TTL in minutes; clamped to the configured maximum.
seedinteger or nullnoDeterministic response-generation seed; defaults to 0 (stable bodies).

ExportMockRequestLogResponse​

The retained request log for one mock instance, newest first.

PropertyTypeRequiredDescription
mockIdstringyesThe instance the log is for.
entriesarray of ExportMockRequestEntryResponsenoRetained requests, newest first.
retainedintegeryesHow many requests the log currently holds.
capacityintegeryesHow many the ring buffer retains per instance before discarding the oldest.
truncatedbooleanyesTrue when the instance has served more requests than the log retains.

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.