MappingTreeEmptyState
Phase 04 D-13 — unified empty-state envelope for getMappingTree. Replaces today's two paths (400 "Job has no run data" + 200 "No steps found"). ALL three empty-state variants ship 200-OK with the same envelope shape, discriminated by `reason`: - `no_runs` — job has no currentRunId; never started. - `no_steps` — run exists but no steps recorded yet (may still be initialising). - `in_progress` — latest run is still `running` and only root step exists. Consumers branch on `body.tree === null` for empty-state vs success, then on `body.reason` to decide UX/messaging. WR-02 (Phase 04 REVIEW): `runId`, `runNumber`, `stats` are OMITTED when absent (per memory `feedback_ajv_openapi_nullable`'s omit-on-absence posture), never serialized as `null`. The `tree: null` discriminator is the ONE accepted null in this envelope.
Voice TestingIVR TestingComplianceFinancial ServicesLoad Testing
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://artifacts.apis.io/nopaque-co-uk/json-schema/nopaque-co-uk-mapping-tree-empty-state-schema.json",
"title": "MappingTreeEmptyState",
"description": "Phase 04 D-13 — unified empty-state envelope for getMappingTree.\n\nReplaces today's two paths (400 \"Job has no run data\" + 200 \"No steps found\").\nALL three empty-state variants ship 200-OK with the same envelope shape,\ndiscriminated by `reason`:\n\n- `no_runs` — job has no currentRunId; never started.\n- `no_steps` — run exists but no steps recorded yet (may still be initialising).\n- `in_progress` — latest run is still `running` and only root step exists.\n\nConsumers branch on `body.tree === null` for empty-state vs success, then\non `body.reason` to decide UX/messaging.\n\nWR-02 (Phase 04 REVIEW): `runId`, `runNumber`, `stats` are OMITTED when\nabsent (per memory `feedback_ajv_openapi_nullable`'s omit-on-absence\nposture), never serialized as `null`. The `tree: null` discriminator is\nthe ONE accepted null in this envelope.\n",
"x-generated": "2026-11-29",
"x-method": "derived",
"x-generator": "derive-json-schema.py",
"x-source": "openapi/nopaque-co-uk-mapping-api-openapi.yml#/components/schemas/MappingTreeEmptyState",
"type": "object",
"required": [
"jobId",
"status",
"tree",
"reason",
"message"
],
"properties": {
"jobId": {
"type": "string",
"format": "uuid"
},
"runId": {
"type": "string",
"format": "uuid",
"description": "Run id — present in `no_steps` / `in_progress`; OMITTED in `no_runs`."
},
"runNumber": {
"type": "integer",
"minimum": 1,
"description": "Run number — present in `no_steps` / `in_progress`; OMITTED in `no_runs`."
},
"status": {
"type": "string",
"description": "Job-level status — may be `idle` (no_runs), `running` (in_progress), etc."
},
"stats": {
"$ref": "#/$defs/MappingJobStats",
"description": "Job stats — OMITTED when absent (never null)."
},
"tree": {
"type": "null",
"description": "Always null in the empty-state envelope — primary discriminator alongside `reason`."
},
"reason": {
"type": "string",
"enum": [
"no_runs",
"no_steps",
"in_progress"
],
"description": "D-13 discriminator — why the tree is empty."
},
"message": {
"type": "string",
"description": "Human-readable explanation + next-step hint."
}
},
"$defs": {
"MappingJobStats": {
"type": "object",
"description": "Aggregate statistics for the current run, populated while the job executes.",
"required": [
"totalCalls",
"completedCalls",
"failedCalls",
"loopsDetected",
"retriedCalls"
],
"properties": {
"totalCalls": {
"type": "integer",
"minimum": 0,
"description": "Total calls placed so far in this run."
},
"completedCalls": {
"type": "integer",
"minimum": 0,
"description": "Successfully completed calls."
},
"failedCalls": {
"type": "integer",
"minimum": 0,
"description": "Calls that failed (after retries)."
},
"loopsDetected": {
"type": "integer",
"minimum": 0,
"description": "Number of times a repeated menu was detected."
},
"retriedCalls": {
"type": "integer",
"minimum": 0,
"description": "Calls that required at least one retry."
}
}
}
}
}
Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.
MCP server
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
Tools for schemas
4 MCP tools reach this
find_json_schemasBrowse and filter every JSON Schema in the catalog.
apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
resolveTurn a domain, URL or GitHub org into the provider it belongs to.
find_cohortsEvery scored population of providers in the catalog.
All 92 tools →
Call it yourself
curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/nopaque-co-uk-mapping-tree-empty-state"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.