Validation (hand-written)
Generated by
scripts/generate_docs.py(scripts/regen_docs.sh). Do not edit by hand.
Methods of client.validation (reportnet_api.resources.validation_ext.ValidationResource). Every method also exists on AsyncReportnetClient as await a_client.validation.<name>(...) with the same arguments. Roles are copied from the API spec; where it states none, this page says so rather than guessing.
Methods
- download_validations_file
- export_validations_to_file
- list_group_validations
- list_group_validations_dl
- list_validations
- start_validation
- start_validations_export
download_validations_file
fetch the generated CSV to dest.
HTTP: GET /validation/downloadFile/{datasetId}
Call: client.validation.download_validations_file(...) (async client: await a_client.validation.download_validations_file(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
dest |
str \| os.PathLike[str] |
yes |
Returns: bool
Allowed roles:
Not stated in the API spec.
Returns False (writing nothing) while the file does not exist yet (404),
True once it was saved. The backend deletes the file after serving it, so a
second call returns False again.
export_validations_to_file
Generate the validations CSV and wait for it, saving it at dest.
Call: client.validation.export_validations_to_file(...) (async client: await a_client.validation.export_validations_to_file(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
dest |
str \| os.PathLike[str] |
yes | ||
poll_interval |
float |
no | 2.0 |
|
timeout |
float |
no | 300.0 |
Returns: None
Allowed roles:
Not an endpoint of its own; the rights are those of the underlying calls.
Calls start_validations_export() then polls download_validations_file()
every poll_interval seconds; raises JobError after timeout seconds.
Columns (from ValidationServiceImpl): entity, table, field, code, code
name, code description, level error, message, number of records. A
leftover file with the same name from an abandoned export could be served
instead of a fresh one. The server path has no per-user part and the file
is deleted when served, so two simultaneous exports of one dataset can
take each other's file, and a dropped download loses it (export again).
A failed export is not reported (the backend still answers 200), so it
ends as a timeout.
list_group_validations
failed validations grouped by rule (what the UI shows).
HTTP: GET /validation/listGroupValidations/{datasetId}
Call: client.validation.list_group_validations(...) (async client: await a_client.validation.list_group_validations(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
page_num |
int |
no | 0 |
|
page_size |
int |
no | 20 |
|
sort_by |
str \| None |
no | None |
|
asc |
bool |
no | True |
|
level_errors |
list[str] \| None |
no | None |
|
type_entities |
list[str] \| None |
no | None |
|
table_filter |
str \| None |
no | None |
|
field_value_filter |
str \| None |
no | None |
Returns: dict[str, Any] | None
Allowed roles:
Not stated in the API spec.
Returns the backend's FailedValidationsDatasetVO: idDataset,
idDatasetSchema, nameDataSetSchema, errors (a list), totalRecords,
totalErrors and totalFilteredRecords. Each error is one rule's failures grouped by code: message, idRule,
levelError, typeEntity, numberOfRecords, nameTableSchema, shortCode,
nameFieldSchema (what the UI's validation table shows).
page_num is a 0-based page number; page_size defaults to 20 on the
backend. sort_by is a column name (the backend maps tableSchemaName,
fieldSchemaName and entityType to its own columns). level_errors
takes CORRECT/WARNING/ERROR/INFO/BLOCKER, type_entities
TABLE/DATASET/FIELD/RECORD. The backend swallows its own
EEAException and answers an empty 200, so this can return None.
Backend rule checkAccessSuperUser('DATASET', id), not the role list of
list_validations. For a data-lake dataflow (bigData: true) use
list_group_validations_dl(): this one answers errors: [] and
totalRecords: 0 there even when the UI shows failures.
list_group_validations_dl
grouped failures, data-lake datasets.
HTTP: GET /validation/listGroupValidationsDL/{datasetId}
Call: client.validation.list_group_validations_dl(...) (async client: await a_client.validation.list_group_validations_dl(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
page_num |
int |
no | 0 |
|
page_size |
int |
no | 20 |
|
sort_by |
str \| None |
no | None |
|
asc |
bool |
no | True |
|
level_errors |
list[str] \| None |
no | None |
|
type_entities |
list[str] \| None |
no | None |
|
table_filter |
str \| None |
no | None |
|
field_value_filter |
str \| None |
no | None |
Returns: dict[str, Any] | None
Allowed roles:
Not stated in the API spec.
For a dataflow whose dataflow_datasets() answer has bigData: true
(data lake), validation results live in the data lake and
list_group_validations() reads the empty old per-dataset database, so it
answers errors: [], totalRecords: 0. This is the route the Reportnet UI
calls for those datasets. Same arguments and answer shape as
list_group_validations(). Live-tested on the sandbox (2026-10-27): it
returned the same two rule groups and totals the UI shows. The backend source
(MasterDataLakes) has no DL variant of list_validations() (one entry per
failing record), so that one stays empty for data-lake datasets. The UI also
sends a shortCode filter, not wrapped here.
list_validations
failed validations, one per failure.
HTTP: GET /validation/listValidations/{datasetId}
Call: client.validation.list_validations(...) (async client: await a_client.validation.list_validations(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
page_num |
int |
no | 0 |
|
page_size |
int |
no | 20 |
|
sort_by |
str \| None |
no | None |
|
asc |
bool |
no | True |
|
level_errors |
list[str] \| None |
no | None |
|
type_entities |
list[str] \| None |
no | None |
|
table_filter |
str \| None |
no | None |
|
field_value_filter |
str \| None |
no | None |
Returns: dict[str, Any] | None
Allowed roles:
Not stated in the API spec.
Returns the backend's FailedValidationsDatasetVO: idDataset,
idDatasetSchema, nameDataSetSchema, errors (a list), totalRecords,
totalErrors and totalFilteredRecords. Each error is one failure: idValidation, idObject, idTableSchema,
nameTableSchema, message, levelError, typeEntity, validationDate,
nameFieldSchema, shortCode.
page_num is a 0-based page number; page_size defaults to 20 on the
backend. sort_by is a column name (the backend maps tableSchemaName,
fieldSchemaName and entityType to its own columns). level_errors
takes CORRECT/WARNING/ERROR/INFO/BLOCKER, type_entities
TABLE/DATASET/FIELD/RECORD. The backend swallows its own
EEAException and answers an empty 200, so this can return None.
Roles: any dataset role incl. observer/requester, custodians, stewards.
For a data-lake dataflow (bigData: true) this answers empty even when the
UI shows failures; there is no DL variant of this route (see
list_group_validations_dl()).
start_validation
queue a validation.
HTTP: PUT /orchestrator/jobs/addValidationJob/{datasetId}
Call: client.validation.start_validation(...) (async client: await a_client.validation.start_validation(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes | ||
released |
bool |
no | False |
Returns: None
Allowed roles:
Not stated in the API spec.
The route the Reportnet UI's "Validate" button calls. It only queues an
Orchestrator job and returns None (live, 2026-11-06: the body was a bare
number, 44570, not understood and not used here). No status is exposed on
a data-lake dataset's listing entry; completion shows as a
VALIDATION_FINISHED_EVENT user notification
(GET /notification/findUserNotifications), which easy.validate_and_wait()
polls. Read the results with list_group_validations() (or _dl()). This WRITES: it replaces the dataset's
existing validation results and takes a dataset lock (a second start while
one runs may get 423). Roles: stewards, custodians, lead reporter,
reporter write and similar (see JobControllerImpl), or ADMIN. released
is for validating a dataset that is being released.
start_validations_export
generate the validations CSV.
HTTP: POST /validation/export/{datasetId}
Call: client.validation.start_validations_export(...) (async client: await a_client.validation.start_validations_export(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataset_id |
int |
yes |
Returns: None
Allowed roles:
Not stated in the API spec.
Not a job: the backend writes dataset-{id}-validations.csv on the server
and only notifies the Reportnet UI, so there is no id or status to poll.
Fetch it with download_validations_file(), or use
export_validations_to_file() which does both. Leaves a notification in the
user's Reportnet UI.