Dataflow (hand-written)
Generated by
scripts/generate_docs.py(scripts/regen_docs.sh). Do not edit by hand.
Methods of client.dataflow (reportnet_api.resources.dataflow_ext.DataflowResource). Every method also exists on AsyncReportnetClient as await a_client.dataflow.<name>(...) with the same arguments. Roles are copied from the API spec; where it states none, this page says so rather than guessing.
Methods
create_dataflow
create a dataflow and return its new id.
HTTP: POST /dataflow
Call: client.dataflow.create_dataflow(...) (async client: await a_client.dataflow.create_dataflow(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
name |
str |
yes | ||
description |
str |
yes | ||
obligation_id |
int \| None |
no | None |
|
dataflow_type |
DataflowType |
no | 'REPORTING' |
|
fields |
dict[str, Any] \| None |
no | None |
Returns: int
Allowed roles:
Not stated in the API spec.
DataflowControllerImpl#createDataFlow, body a DataFlowVO. Requires
the user role DATA_CUSTODIAN, DATA_STEWARD, DATA_REQUESTER or
ADMIN (a login token; an ApiKey carries no such role). name and
description must not be blank, and every type but REFERENCE needs
obligation_id (a ROD obligation id), else 400. BUSINESS needs an
admin (401 otherwise) plus dataProviderGroupId/fmeUserId in
fields. fields adds other DataFlowVO keys as-is (e.g.
deadlineDate, which must be after today for non-reference types);
name, description, type or obligation in it raise ValueError.
A 200 whose body is not an id raises ReportnetAPIError.
The dataflow starts in DESIGN status, with the caller as its
custodian. A name already used by any dataflow (case-insensitive)
answers 500 "There was an unknown error creating the dataflow."
dataflow_datasets
the dataflow with its datasets (designDatasets, reportingDatasets, dataCollections, euDatasets, referenceDatasets, testDatasets).
HTTP: GET /dataflow/v1/{dataflowId}
Call: client.dataflow.dataflow_datasets(...) (async client: await a_client.dataflow.dataflow_datasets(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataflow_id |
int |
yes | ||
provider_id |
int \| None |
no | None |
Returns: dict[str, Any] | None
Allowed roles:
Not stated in the API spec.
Reporters must pass provider_id. Requires a dataflow role (or a
matching ApiKey / data custodian-steward reference access).
Returns None when the backend answers 200 with an empty body (it
swallows its own errors, e.g. for an unknown dataflow).
dataflows
dataflows visible to the logged user.
HTTP: POST /dataflow/{getDataflows,referenceDataflows,businessDataflows,citizenScienceDataflows}
Call: client.dataflow.dataflows(...) (async client: await a_client.dataflow.dataflows(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
kind |
DataflowKind |
no | 'reporting' |
|
filters |
dict[str, str] \| None |
no | None |
|
order_header |
str \| None |
no | None |
|
asc |
bool \| None |
no | None |
|
page_size |
int \| None |
no | None |
|
page_num |
int \| None |
no | None |
Returns: dict[str, Any]
Allowed roles:
Not stated in the API spec.
Returns the PaginatedDataflowVO dict: dataflows, totalRecords,
filteredRecords. Backend rule is isAuthenticated(); an ApiKey
signs in as the key's owner, so it lists the owner's dataflows.
asc=None omits the param, which the backend treats as False: with
order_header set that is a descending sort. Paging needs both
page_size and page_num (0-based); giving only one raises
ValueError. A backend-side failure comes back as an empty 200 page,
indistinguishable from "no dataflows".
delete_dataflow
delete a dataflow with its design datasets, documents and representatives.
HTTP: DELETE /dataflow/{dataflowId}
Call: client.dataflow.delete_dataflow(...) (async client: await a_client.dataflow.delete_dataflow(...))
| Argument | Type | Required | Default | Description |
|---|---|---|---|---|
dataflow_id |
int |
yes |
Returns: None
Allowed roles:
Not stated in the API spec.
DataflowControllerImpl#deleteDataFlow. Requires DATAFLOW_STEWARD or
DATAFLOW_CUSTODIAN on the dataflow. 423 while a schema import or
a schema copy into it is running. The backend logs and swallows its
own failures (DataflowServiceImpl#deleteDataFlow), so a 200 does not
prove the dataflow is gone: dataflow_datasets() afterwards does.