curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/je-testing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"deleted_at": "2023-11-07T05:31:56Z",
"effort": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"detail": {},
"request_id": "<string>"
},
"finished_at": "2023-11-07T05:31:56Z",
"force": true,
"idempotency_key": "<string>",
"kind": "je_testing",
"name": "<string>",
"payload_expires_at": "2023-11-07T05:31:56Z",
"progress": {
"items_done": 0,
"items_failed": 0,
"items_total": 123,
"knowledge_graph": {
"countable": true,
"phase_count": 123,
"phase_index": 123,
"documents": 123,
"mentions": 123,
"step": "<string>",
"step_done": 123,
"step_total": 123
},
"stage": "<string>",
"units_done": 0,
"units_total": 123
},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"query_scope": {
"type": "workspace"
},
"result": {
"agent_usage": {
"compaction_requests": 1,
"execution_requests": 1,
"finalization_requests": 1,
"total_requests": 1
},
"answer": "<string>",
"binding": {
"columns": [
{
"column": "<string>",
"path": "<string>",
"slot": "<string>",
"table_name": "<string>",
"component": "<string>",
"detail": "<string>"
}
],
"notes": [
"<string>"
],
"periods": [
{
"role": "<string>",
"value": "<string>"
}
],
"policy_sheets": [
"<string>"
],
"revised_because": "<string>",
"tables": [
{
"path": "<string>",
"role": "<string>",
"table_name": "<string>",
"component": "<string>"
}
],
"value_sets": [
{
"column": "<string>",
"name": "<string>",
"path": "<string>",
"slot": "<string>",
"table_name": "<string>",
"component": "<string>",
"note": "",
"values": [
"<string>"
]
}
]
},
"confidence": "certain",
"criteria": [
{
"criterion_id": "<string>",
"description": "<string>",
"status": "performed",
"incomplete_reason": "binding_unresolved",
"spec_id": "<string>"
}
],
"degraded": "<string>",
"discrepancies": [
"<string>"
],
"evidences": [
{
"quote": "<string>",
"relevance": "<string>",
"source_path": "<string>",
"component": "<string>",
"derivation": {
"steps": [
{
"kind": "extraction",
"label": "<string>",
"result_id": "<string>",
"sql": "<string>",
"preview_rows": [
{}
],
"reads": [
"<string>"
]
}
]
},
"page": 123,
"queries": [
{
"sql": "<string>",
"columns": [
{
"data_type": "<string>",
"name": "<string>"
}
],
"grounding_reason": "<string>",
"grounding_status": "exact",
"preview_truncated": false,
"regions": [
{
"a1_range": "<string>",
"source_path": "<string>",
"basis": "verified",
"bounding": false,
"kind": "sheet",
"matched_rows": 0,
"scan_index": 123,
"scan_label": "<string>",
"sheet_name": "<string>"
}
],
"result_id": "<string>",
"row_count": 0,
"rows": [
{}
],
"source_paths": [
"<string>"
],
"supports_answer": true,
"verified": false
}
],
"source_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"execution_status": "performed",
"exhausted": false,
"figures": [
{
"count": 1,
"criterion": "<string>",
"definition": "<string>",
"population": 1,
"spec_id": "<string>",
"band_group": "<string>",
"breakdown": {
"result_id": "<string>",
"columns": [
"<string>"
],
"rows": [
[
"<string>"
]
],
"truncated": false
},
"cannot_be_performed": false,
"exception_listing_result_id": "<string>",
"result_ids": [
"<string>"
],
"value": "<string>"
}
],
"grounding_job_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"population_statement": "<string>",
"quality": {
"status": "clean",
"missing_artifacts": [
"binding"
],
"retried_checks": [
"specs"
],
"tool_failures": [
{
"count": 2,
"outcome": "model_retry",
"tool": "<string>"
}
],
"validation_warnings": [
{
"check": "specs",
"status": "failed_open"
}
],
"withheld_receipt_figures": 0
},
"reasoning": "<string>",
"result_type": "je_testing",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_digest": "<string>",
"sql_receipts": [
{
"result_id": "<string>",
"sql": "<string>",
"columns": [
"<string>"
],
"executor": "<string>",
"grounding_status": "exact",
"handle": "<string>",
"parameters": {},
"replay": {
"catalog_sha256": "<string>",
"engine": "duckdb",
"engine_threads": 123,
"engine_version": "<string>",
"kind": "aggregate",
"logical_plan_sha256": "<string>",
"normalized_sql": "<string>",
"result_artifact_sha256": "<string>",
"result_data_sha256": "<string>",
"result_digest_version": "<string>",
"sql_sha256": "<string>",
"result_dependencies": [
"<string>"
],
"schema_version": 1
},
"result_row_count": 0,
"row_count": 0,
"rows": [
{}
],
"saved_as": "<string>",
"table_bindings": [
{
"path": "<string>",
"table_name": "<string>",
"component": "<string>",
"source_sha256": "<string>"
}
],
"truncated": false,
"view_sql": "<string>",
"views_used": [
"<string>"
],
"warnings": [
"<string>"
]
}
],
"steps_used": 0,
"tool_calls": [
{
"arguments_digest": "<string>",
"duration_ms": 123,
"hits": 123,
"tool": "<string>"
}
],
"usage": {
"by_model": [
{
"model": "<string>",
"cached_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"requests": 0
}
],
"cached_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"requests": 0
}
},
"result_state": "available",
"source": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "upload"
},
"started_at": "2023-11-07T05:31:56Z",
"surface": "deep_search",
"units": 0,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}je_testing
Run journal-entry testing over a workspace’s ledger package. Cost class: job.
The caller receives a 202 with a queued
:class:~ndi_service.app.platform_api.results.Job immediately and polls
GET /jobs/{id} for the
:class:~ndi_service.app.platform_api.results.JetResult.
The agent orients itself in the tables the workspace holds, writes SQL over
them itself, and answers with sql_receipts: every statement it ran, the
tables each one registered (path, tab, and the view name the SQL used), and
a bounded result. A figure in the answer is meant to be readable out of one
of those receipts, and a receipt carries everything needed to re-run it.
paths scopes the run to exactly the files of the package under test;
path_prefix scopes it to a folder, and the two compose as an
intersection. Omit paths to test the whole workspace: the agent orients
over every queryable file the caller can see and finds the ledger package
itself, the same way deep-search behaves when unscoped. A run keeps its
conversation: pass the result’s session_id on a later request to ask a
follow-up in the same thread.
reasoning_effort controls the thinking budget without changing the
engine. Omit it for the route’s default; null keeps the catalogue prescription.
exhausted: true means the step budget ran out before the procedure
finished — a successful, partial response, not a failure.
curl --request POST \
--url https://ndi-api.nace.ai/v1/workspaces/{workspace_id}/je-testing \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"query": "<string>"
}
'{
"created_at": "2023-11-07T05:31:56Z",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"deleted_at": "2023-11-07T05:31:56Z",
"effort": "<string>",
"error": {
"code": "invalid_request",
"message": "<string>",
"retryable": true,
"detail": {},
"request_id": "<string>"
},
"finished_at": "2023-11-07T05:31:56Z",
"force": true,
"idempotency_key": "<string>",
"kind": "je_testing",
"name": "<string>",
"payload_expires_at": "2023-11-07T05:31:56Z",
"progress": {
"items_done": 0,
"items_failed": 0,
"items_total": 123,
"knowledge_graph": {
"countable": true,
"phase_count": 123,
"phase_index": 123,
"documents": 123,
"mentions": 123,
"step": "<string>",
"step_done": 123,
"step_total": 123
},
"stage": "<string>",
"units_done": 0,
"units_total": 123
},
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"query": "<string>",
"query_scope": {
"type": "workspace"
},
"result": {
"agent_usage": {
"compaction_requests": 1,
"execution_requests": 1,
"finalization_requests": 1,
"total_requests": 1
},
"answer": "<string>",
"binding": {
"columns": [
{
"column": "<string>",
"path": "<string>",
"slot": "<string>",
"table_name": "<string>",
"component": "<string>",
"detail": "<string>"
}
],
"notes": [
"<string>"
],
"periods": [
{
"role": "<string>",
"value": "<string>"
}
],
"policy_sheets": [
"<string>"
],
"revised_because": "<string>",
"tables": [
{
"path": "<string>",
"role": "<string>",
"table_name": "<string>",
"component": "<string>"
}
],
"value_sets": [
{
"column": "<string>",
"name": "<string>",
"path": "<string>",
"slot": "<string>",
"table_name": "<string>",
"component": "<string>",
"note": "",
"values": [
"<string>"
]
}
]
},
"confidence": "certain",
"criteria": [
{
"criterion_id": "<string>",
"description": "<string>",
"status": "performed",
"incomplete_reason": "binding_unresolved",
"spec_id": "<string>"
}
],
"degraded": "<string>",
"discrepancies": [
"<string>"
],
"evidences": [
{
"quote": "<string>",
"relevance": "<string>",
"source_path": "<string>",
"component": "<string>",
"derivation": {
"steps": [
{
"kind": "extraction",
"label": "<string>",
"result_id": "<string>",
"sql": "<string>",
"preview_rows": [
{}
],
"reads": [
"<string>"
]
}
]
},
"page": 123,
"queries": [
{
"sql": "<string>",
"columns": [
{
"data_type": "<string>",
"name": "<string>"
}
],
"grounding_reason": "<string>",
"grounding_status": "exact",
"preview_truncated": false,
"regions": [
{
"a1_range": "<string>",
"source_path": "<string>",
"basis": "verified",
"bounding": false,
"kind": "sheet",
"matched_rows": 0,
"scan_index": 123,
"scan_label": "<string>",
"sheet_name": "<string>"
}
],
"result_id": "<string>",
"row_count": 0,
"rows": [
{}
],
"source_paths": [
"<string>"
],
"supports_answer": true,
"verified": false
}
],
"source_file_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
],
"execution_status": "performed",
"exhausted": false,
"figures": [
{
"count": 1,
"criterion": "<string>",
"definition": "<string>",
"population": 1,
"spec_id": "<string>",
"band_group": "<string>",
"breakdown": {
"result_id": "<string>",
"columns": [
"<string>"
],
"rows": [
[
"<string>"
]
],
"truncated": false
},
"cannot_be_performed": false,
"exception_listing_result_id": "<string>",
"result_ids": [
"<string>"
],
"value": "<string>"
}
],
"grounding_job_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"population_statement": "<string>",
"quality": {
"status": "clean",
"missing_artifacts": [
"binding"
],
"retried_checks": [
"specs"
],
"tool_failures": [
{
"count": 2,
"outcome": "model_retry",
"tool": "<string>"
}
],
"validation_warnings": [
{
"check": "specs",
"status": "failed_open"
}
],
"withheld_receipt_figures": 0
},
"reasoning": "<string>",
"result_type": "je_testing",
"session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"spec_digest": "<string>",
"sql_receipts": [
{
"result_id": "<string>",
"sql": "<string>",
"columns": [
"<string>"
],
"executor": "<string>",
"grounding_status": "exact",
"handle": "<string>",
"parameters": {},
"replay": {
"catalog_sha256": "<string>",
"engine": "duckdb",
"engine_threads": 123,
"engine_version": "<string>",
"kind": "aggregate",
"logical_plan_sha256": "<string>",
"normalized_sql": "<string>",
"result_artifact_sha256": "<string>",
"result_data_sha256": "<string>",
"result_digest_version": "<string>",
"sql_sha256": "<string>",
"result_dependencies": [
"<string>"
],
"schema_version": 1
},
"result_row_count": 0,
"row_count": 0,
"rows": [
{}
],
"saved_as": "<string>",
"table_bindings": [
{
"path": "<string>",
"table_name": "<string>",
"component": "<string>",
"source_sha256": "<string>"
}
],
"truncated": false,
"view_sql": "<string>",
"views_used": [
"<string>"
],
"warnings": [
"<string>"
]
}
],
"steps_used": 0,
"tool_calls": [
{
"arguments_digest": "<string>",
"duration_ms": 123,
"hits": 123,
"tool": "<string>"
}
],
"usage": {
"by_model": [
{
"model": "<string>",
"cached_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"requests": 0
}
],
"cached_input_tokens": 0,
"input_tokens": 0,
"output_tokens": 0,
"requests": 0
}
},
"result_state": "available",
"source": {
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "upload"
},
"started_at": "2023-11-07T05:31:56Z",
"surface": "deep_search",
"units": 0,
"workspace_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}{
"error": {
"code": "invalid_request",
"detail": null,
"message": "Request body has extra fields that this operation does not accept.",
"request_id": "req-01j9k2n3p4q5r6s7t8v9",
"retryable": false
}
}Authorizations
Headers
Replaying a request with the same key returns the original job with 200, never a second job.
200Path Parameters
Workspace identifier.
Query Parameters
Bounded inline wait. 0 (the default) returns 202 immediately. Above 0 the route returns 200 with a terminal job if the work finished in time, and 202 with the still-running job if it did not. Either way, read status.
0 <= x <= 300Body
Body for POST /workspaces/{workspace_id}/je-testing.
What to answer, in the caller's own words. Stripped before its length is checked; a blank query is refused rather than run.
1 - 4096Free-form background for the model — the engagement, the entity, what the caller already knows. It informs the answer; it does not widen or narrow which files the caller may see.
20000Narrow the run to one folder subtree, workspace-relative. Passed through to every tool call the run makes rather than evaluated once at the edge. Omit it for the whole workspace.
Scope the run to exactly these uploaded files — the ledger package to test. Every tool the agent runs (listings, reads, SQL) sees only these files and the content ingested from them. Each entry names an uploaded source file, never a folder; scope folders with path_prefix, which composes with this as an intersection. Unknown or inaccessible paths are refused up front. Omit to test the whole workspace: the agent then orients over every queryable file the caller can see and finds the ledger package itself, exactly as deep-search does when unscoped.
1 - 64 elements1 - 1024Thinking budget for the testing agent; changing it does not change the engine. Null keeps the catalogue's per-model prescription. The console's Effort pill sends 'low' (default) or 'medium'.
none, minimal, low, medium, high Confirmed ledger source selection; mutually exclusive with path selectors.
Continue a prior je-testing conversation: the id echoed on an earlier result's session_id. The agent resumes with that thread's full context — its orientation and its receipted statements — and treats this request as the follow-up. Omit to start a new thread. Only the API key that started the thread may continue it; a thread whose turn is still running returns 409 session_busy.
Response
Successful Response
The je-testing route's response shape.
One kind, one result: the agent engine answers on je_testing. The
pipeline engine behind je-testing-v2 answers on the same JetResult
under its own kind, but that route is unpublished, so this shape names only
the kind a caller of the published route can receive.
When the job row was created.
Server-minted id. Poll GET /v1/jobs/{job_id} or pass wait_seconds on create.
Lifecycle: queued, running, succeeded, failed, or cancelled.
queued, running, succeeded, failed, cancelled When the caller hid this run from listings, via delete_job. A soft delete: the job still reads by id and still counts toward GET /v1/usage — what it stops doing is appearing in GET /v1/jobs.
How hard this run worked, for the search kinds that carry it. A consolidated deep-search job (kind deep_search_v2, or a scoped intelligent_search run) echoes the requested level: 'low', 'medium', or 'high'. Historical intelligent_search rows carry the retired internal selector instead: 'fast' is fact-search (and still what new fact-search rows say), 'automatic' is automatic-search, 'deep' (or the legacy 'balanced') is the pre-consolidation deep-search and the console's QA chat — those two are not distinguishable by this field. Null for every other kind. Read from the stored request, so it rides the same retention path as query and result: null once result_state leaves available.
Typed failure envelope when status is failed. Null on any other status.
Show child attributes
Show child attributes
When the job reached a terminal status.
The request's own force flag, echoed regardless of outcome. Present for kinds whose request carries one (e.g. kg_build, where a true value cleared the durable store before the job ran) so a caller can tell that apart from a build that failed leaving the prior store untouched — result alone cannot, since it is absent on failure either way.
Key that was replayed to return this job. Absent when the create call had no Idempotency-Key.
"je_testing"Display name (the console's 'project'). Public Parse, Split, Classify, Extract, and Ground runs supply a stable server default when blank; citation-generated Ground jobs are excluded. mutable via PATCH /v1/jobs/{job_id}.
When input and result payloads are dropped. Null means they are kept indefinitely.
Live progress while the job is running. Null while queued and after the job finishes.
Show child attributes
Show child attributes
Caller-minted grouping id shared by jobs submitted together. Filterable on GET /v1/jobs.
The question this job was asked, for the search kinds that carry one (intelligent_search, qa_file, qa_tables, filtered_search); null for every other kind. Read from the stored request, so it rides the same retention path as result: null once result_state leaves available. Narrow by design — the frozen access context never reaches the wire. File scope is summarised separately as query_scope.
The question ran against the whole workspace.
- WorkspaceQueryScope
- FileQueryScope
- PathPrefixQueryScope
- FilesQueryScope
Show child attributes
Show child attributes
Present only on succeeded, and only while retained.
Show child attributes
Show child attributes
Why result may be null. available with a null result means the job has not succeeded yet; expired and not_retained mean the payload was dropped by retention.
available, expired, not_retained Bytes staged through POST /v1/uploads. Single-use, TTL-bound.
- UploadSource
- UrlSource
- WorkspaceFileSource
- ParseResultSource
Show child attributes
Show child attributes
When execution began. Null while still queued.
Which console history this deep-search job belongs to. deep_search is the public route and the Deep Search page; qa and workbook are the console chat skins over the same agent. It does not pick the implementation. Null for fact-search and every non-deep-search kind. Jobs stored before this field existed echo deep_search. Read from the stored payload, so it rides the same retention path as query.
deep_search, qa, workbook Billable units once the job finishes; 0 while queued or running.
The workspace this job reads. Null for a document operation whose source is an upload, a URL, or a prior parse result.