View file processing lineage¶
View its associated workflow processes, build artifacts, and process topology from the Catalog file.
GET https://moi.matrixorigin.cn/newmoi/lineage/catalog-files/{file_id}/overview
Preparation before calling¶
First query the file product, and then call this interface only when the data.has_artifact in the response is true. Prepare a personal access token with access to the target workspace, the target workspace ID, and the catalog file ID.
file_id must be a Catalog file that has been processed by the workflow and registered with the DataAsset. Raw files that are simply uploaded or mounted to a Volume but have not been processed will not automatically generate a processing link.
Request parameters¶
file_idstringRequired- Catalog file ID.
Request example
curl "https://moi.matrixorigin.cn/newmoi/lineage/catalog-files/$FILE_ID/overview" \
-H "X-API-Key: $AI_STUDIO_API_KEY" \
-H "X-Workspace-ID: $WORKSPACE_ID"
Successful response¶
data returns file entry, associated products, workflow calls and processing topology. Save the artifact_id and node_id within; the file name or node display name cannot replace these IDs.
The response fields are as follows.
In field paths, [] denotes each item in an array. For example, items[].name is the name field of each item in the items array.
codestring- OK when successful.
msgstring- OK when successful.
data.artifact.artifact_idstring- Product ID.
data.artifact.root_asset_idstring- Root data asset ID.
data.artifact.case_idstring- Association case ID.
data.artifact.raw_file_idstring- Raw file ID; returned only if present.
data.artifact.parsed_file_idstring- Parsed file ID; returned only if present.
data.artifact.parsed_file_availableboolean- Whether the parsed file is available.
data.workflow.workflow_idstring- Workflow ID; only returned if there is a value.
data.workflow.workflow_version_idstring- Workflow version ID; returned only if there is a value.
data.workflow_invocation.inputobject- Workflow call input; only returned if there is a value.
data.workflow_invocation.varsobject- Workflow call variables; only returned if there is a value.
data.topology.nodes[]array- Processing nodes in the topology.
data.topology.edges[]array- Processing edges in the topology.
data.topology.producer_node_idstring- The node ID that produced the current product; only returned if there is a value.
data.entry.catalog_file_idstring- Catalog file ID; returned only if there is a value.
Successful response example
{
"code": "OK",
"msg": "OK",
"data": {
"artifact": {
"artifact_id": "art-001",
"root_asset_id": "asset-001",
"case_id": "case-001",
"parsed_file_available": true
},
"workflow": {
"workflow_id": "wf-001",
"workflow_version_id": "ver-001"
},
"workflow_invocation": {
"input": {},
"vars": {}
},
"topology": {
"nodes": [
{
"node_id": "node-001",
"label": "解析文件"
}
],
"edges": [],
"producer_node_id": "node-001"
},
"entry": {
"catalog_file_id": "file-001"
}
}
}
Error response¶
codestring- Error code.
msgstring- Readable error message.
datanull- `null` in an error response.
Error response example
{
"code": "ErrNotFound",
"msg": "资源不存在",
"data": null
}