Retrieve task text evidence¶
Retrieve task text evidence.
POST https://api.moi.matrixorigin.cn/v5/semantic-models/runtime/search
Before you call this API¶
Use injected service URLs, technical credentials, Workspace, and short-lived authorization only in the current task environment. Retain original authorization header values. An ordinary PAT cannot replace task identity or establish authorization. Examples use jq. See Shared information for variables, objects, and states.
Request body¶
curl -X POST "${MOI_ENDPOINT%/}/semantic-models/runtime/search" \
-H "X-API-Key: $MOI_API_KEY" \
-H "X-Workspace-ID: $MOI_WORKSPACE_ID" \
-H "X-MOI-Runtime-Authorization: $MOI_RUNTIME_AUTHORIZATION" \
-H 'Content-Type: application/json' \
--data-binary "$(jq -n --arg REQUEST_ID "$REQUEST_ID" --arg KNOWLEDGE_QUERY "$KNOWLEDGE_QUERY" '
{
"request_id": $REQUEST_ID,
"keywords": [
$KNOWLEDGE_QUERY
],
"max_hits": 3,
"before": 2,
"after": 1
}
')"
Text evidence and complete paragraphs remain in the raw artifacts objects. output may be a bounded view; a summary alone is not a complete read. source_page performs no semantic ranking. Continue with output.source_page.has_more/next_cursor and do not mix in ordinary fields.
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
Unique ID for this operation, 1–256 bytes, without surrounding whitespace or an audit: prefix. Retain for replay of identical input. |
|
string (array of strings) |
Conditionally required |
Supply valid keywords for ordinary retrieval; omit in source_page mode. |
|
integer |
Conditionally required |
Must be greater than 0 for ordinary retrieval. |
|
string (array of strings) |
No |
Restricted to sources allowed for the current task. |
|
string |
No |
Restricted to bound volume scope. |
|
integer |
No |
Nonnegative retrieval row limit. |
|
integer |
No |
Nonnegative preceding-context expansion. |
|
integer |
No |
Nonnegative following-context expansion. |
|
boolean |
No |
Uses full-text indexing without vector candidates. |
|
object |
No |
Sequentially enumerates enabled paragraphs from the same source; mutually exclusive with ordinary retrieval fields. |
|
integer |
Conditionally required |
Actual model ID returned by the source. |
|
string |
Conditionally required |
File ID for the same source. |
|
string |
No |
Original returned next_cursor value. |
|
integer |
No |
0/omission uses 20; maximum 100. Negatives rejected. |
Successful response¶
{
"code": "OK",
"msg": "OK",
"data": {
"call_id": "request_example",
"output": {
"chunks": [],
"row_count": 0
}
}
}
Field |
Type |
Description |
|---|---|---|
|
string |
OK on success. |
|
string |
Response description. |
|
string |
Corresponding original request_id. |
|
boolean |
true indicates business failure; false may be omitted. |
|
object |
Current operation result. |
|
object (array of objects) |
Original artifacts and evidence from the same task. |
|
object |
Operation metadata, returned when present. |
|
array |
Current text-result view; complete evidence is also stored in artifacts. |
|
integer |
Result row count or hit count for this operation. |
Error responses¶
Handle HTTP status, business results, and error fields separately. See Errors and environments. On source or version conflicts, read current state; do not automatically retry with a different identity, resource, or request ID.