Preview visitor task artifacts¶
Returns preview bytes/streams, not JSON. Unsupported format415, oversized413/code 19, conversion failure422/code 20. Download may be used if admission passes and the file remains downloadable. Errors after stream commitment interrupt the connection.
GET https://api.moi.matrixorigin.cn/v5/public/webapp/conversations/{conversation_id}/tasks/{task_id}/files/{file_id}/preview
Before you call this API¶
BASE_URL uses the product API prefix https://api.moi.matrixorigin.cn/v5. For a dedicated deployment, use its corresponding product API address.
Prepare links and visitor identity in the same environment. Do not supply a product PAT or Workspace request header.
Request¶
curl --request GET \
"$BASE_URL/public/webapp/conversations/$CONVERSATION_ID/tasks/$TASK_ID/files/$FILE_ID/preview?webapp=$AGENT_ID&t=$WEBAPP_TOKEN&s=$WEBAPP_SESSION"
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
|
Query |
string |
Yes |
Agent ID corresponding to the link. |
|
Query |
string |
Yes |
Current valid publication token. For short-code links, resolve first and use the short code as t. |
|
Query |
string |
Yes |
Visitor session credentials under the same publication. |
|
Path |
string |
Yes |
Active Web App conversation created by this visitor. |
|
Path |
string |
Yes |
Task ID under that conversation. |
|
Path |
string |
Yes |
Artifact file ID actually published by that task. |
Successful response¶
HTTP 200 response body contains file or preview bytes. Download uses attachment; preview uses inline. Process content according to actual Content-Type rather than decoding bytes as JSON.
This entry point returns byte/event streams. Follow this page and stream and file boundaries.
Error response¶
Public errors and identity handling distinguishes unavailable links, disablement, invalid sessions, parameters, and system failures.