Get drawing provenance and page mappings¶
Read original provenance, visual manifest, and registered page images for a source file to check retrieval evidence.
GET https://api.moi.matrixorigin.cn/v5/drawings/{source_file_id}/provenance
Before you call this API¶
Set MOI_ENDPOINT to the product API prefix https://api.moi.matrixorigin.cn/v5. For private deployments, use the corresponding product API URL.
Use source_file_id from retrieval with the same knowledge base ID, workspace, and credentials. Requires knowledge base semantic_model.use. The path has no workspace_id but still requires X-Workspace-ID. source_file_id is neither drawing_number nor drawing_id.
Request parameters¶
curl --get "$MOI_ENDPOINT/drawings/$SOURCE_FILE_ID/provenance" \
--header "X-API-Key: $AI_STUDIO_API_KEY" --header "X-Workspace-ID: $WORKSPACE_ID" \
--data-urlencode "knowledge_base_id=42" --data-urlencode "page_number=1"
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
source_file_id |
Path |
string |
Yes |
Source file ID from retrieval, path-encoded. |
knowledge_base_id |
Query |
integer |
Yes |
Positive integer knowledge base ID. |
page_number |
Query |
integer |
No |
Must be positive when supplied. Checks only that this page exists, while still returning all pages; not a single-page filter. Omit to skip existence checking. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"knowledge_base_id": 42,
"source_file_id": "source-example",
"external_source_uri": null,
"visual_manifest_file_id": "manifest-example",
"provenance_status": "ready",
"gaps": [
"external_origin_missing"
],
"pages": [
{
"page_number": 1,
"page_image_file_id": "page-1",
"preview_url": "/semantic-models/42/artifacts/page-1/preview"
},
{
"page_number": 2,
"page_image_file_id": "page-2",
"preview_url": "/semantic-models/42/artifacts/page-2/preview"
}
]
}
}
Provenance objects and states explains fields, ready/legacy, and gaps. ready does not guarantee every provenance field is complete;200 does not prove an arbitrary source_file_id exists or is downloadable.
Error response¶
{
"code": "ErrServiceUnavailable",
"msg": "Service unavailable"
}
Field |
Type |
Description |
|---|---|---|
code |
string |
Missing page404/ErrDrawingPageUnavailable; parameters400/ErrParamInvalid; see Related APIs for permissions/dependencies. |
msg |
string |
Regular localized error text. The example above shows general dependency unavailability, not a missing-page error. |