Read a file through a temporary capability link¶
Allow an external model provider to read one file through its issued link.
GET https://api.moi.matrixorigin.cn/v5/catalog-files/{file_id}/content
Before you call this API¶
First have an identity with read permission issue a model link. Set MODEL_FILE_URL to the complete returned url and use expires_at for expiration.
Request parameters¶
curl --fail-with-body -sS -X GET "$MODEL_FILE_URL" \
-o "$OUTPUT_FILE"
Field |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Yes |
File ID in the path, matching the file bound to the signature. |
|
string |
Yes |
Query parameter appearing exactly once, using the value from the issued link. |
Access the issued url directly without a product PAT or workspace header. The signature binds workspace, file, and expiration seconds. Missing/invalid/expired signatures, unreadable files, and empty content all return public 404. Successful bytes include no-store, no-referrer, and related headers.
Successful response¶
sample
The response is a byte stream. Consume and close it, and check read/exit status before using the file. Failure after the response starts may interrupt the connection.
Error responses¶
{
"code": "ErrNotFound",
"msg": "示例本地化错误"
}
Public errors use string code/msg and hide internal signature/storage causes.