Get output schema
Read the target JSON output schema, automatic mapping mode, stored mapping, lifecycle state, and live diagnostics. Poll this endpoint until status reaches success after enabling automatic mapping.
On this page
HTTP request
GET https://api.parsewise.ai/api/v1/projects/{project_id}/schema/
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
project_id |
path | Yes | string (uuid) |
Request Header
| Name | Required | Type | Description |
|---|---|---|---|
X-API-Key |
Yes | string | API key with the pw_live_ prefix. See Authentication. |
Responses
| Status | Type | Description |
|---|---|---|
200 |
V1SchemaResponse | — |
Security
- ApiKeyAuth — apiKey — in
X-API-Keyheader. API key with pw_live_ prefix.
Python example
import os
import requests
API_KEY = os.environ["PARSEWISE_API_KEY"]
BASE_URL = "https://api.parsewise.ai/api/v1"
project_id = "<uuid>"
resp = requests.get(
f"{BASE_URL}/projects/{project_id}/schema/",
headers={"X-API-Key": API_KEY},
)
resp.raise_for_status()
print(resp.json() if resp.content else None)
Definitions
CodeEnum
Type: string. One of:
node_kind_mismatchproperty_not_in_schemarequired_unmappedagent_not_foundagent_ambiguousdimension_not_founddimension_not_on_agentdimension_not_in_scopedimension_value_unknowntype_incompatible
SeverityEnum
Type: string. One of:
errorwarning
Status56fEnum
Type: string. One of:
pendingsuccessfailed
V1MappingDiagnostic
One validation finding at a schema position of the output mapping.
| Name | Required | Type | Description |
|---|---|---|---|
path |
Yes | string | Position in the schema tree using a/b/[*]/c notation ([*] for array items, {*} for dimension-keyed object values). Empty string for the root. |
severity |
Yes | SeverityEnum | How serious the finding is. error findings make the mapping unsaveable; warning findings are informational — the mapping can be saved and affected fields are omitted from the output. |
code |
Yes | CodeEnum | Machine-readable finding type. |
message |
Yes | string | Human-readable explanation of the finding. |
V1SchemaResponse
Target schema and output mapping state.
| Name | Required | Type | Description |
|---|---|---|---|
schema |
Yes | any | The project target JSON Schema (Draft 2020-12). |
auto_map |
Yes | boolean | Whether automatic agent and mapping generation is active for the current mapping state. |
mapping |
Yes | any (nullable) | The declarative mapping node tree, or null when no mapping has been saved yet. Nodes reference agents and dimensions by name, so a mapping can be reused across projects with the same agent names. |
status |
Yes | Status56fEnum | Lifecycle of the mapping. pending while no usable mapping exists, success when a mapping is saved, failed when automatic generation failed. |
source |
Yes | V1SchemaResponseSourceEnum | Whether the mapping was generated automatically (llm) or authored manually (manual). |
error |
Yes | string (nullable) | Failure detail when status is failed, otherwise null. |
generated_at |
Yes | string (date-time) (nullable) | When the mapping was last saved or generated. |
schema_in_sync |
Yes | boolean | True when the mapping was saved against the current output schema. False after the schema changes, meaning the mapping should be re-saved or regenerated. |
diagnostics |
Yes | array<V1MappingDiagnostic> | Validation findings for the stored mapping against the current schema and agents. |
V1SchemaResponseSourceEnum
Type: string. One of:
llmmanual