GetReferenceFile
Queries the reference file and its upload status.
Operation description
Queries the metadata and upload status of a reference file. If the file content exists, returns a temporary HTTPS download URL valid for 5 minutes.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
dataworks:GetReferenceFile |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ProjectId |
integer |
Yes |
The ID of the workspace. |
23620 |
| ObjectId |
string |
Yes |
The ID of the node or workflow. |
node-id |
| FileName |
string |
Yes |
The name of the reference file within the object, excluding the directory path. |
knowledge.md |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| RequestId |
string |
The request ID. |
0000-ABCD-1234 |
| Code |
string |
The BFF response code. The string |
200 |
| Message |
string |
The BFF request result description. This parameter may be empty if the request is successful. |
success |
| Data |
object |
The metadata of the reference file. |
{"FileName":"knowledge.md","UploadingStatus":"Uploaded"} |
| RegionId |
string |
The region ID. |
cn-shanghai |
| ProjectId |
integer |
The workspace ID. |
23620 |
| ObjectId |
string |
The ID of the node or workflow. |
node-id |
| FileName |
string |
The name of the reference file within the object, excluding the directory path. |
knowledge.md |
| FileSize |
integer |
The actual size of the file in bytes. |
1024 |
| UploadingStatus |
string |
The upload status. Valid values: Uploading (in progress), Uploaded (succeeded), and Failed (failed). Valid values:
|
Uploaded |
| CreateTime |
integer |
The creation time. The value is a UNIX timestamp in milliseconds. |
1794787200000 |
| ModifyTime |
integer |
The modification time. The value is a UNIX timestamp in milliseconds. |
1794787200000 |
| ContentUrl |
string |
The temporary HTTPS download URL returned in the details query. The URL is valid for 5 minutes. This parameter may be empty if the file is not uploaded successfully. |
https://example.com/knowledge.md |
Examples
Success response
JSON format
{
"RequestId": "0000-ABCD-1234",
"Code": "200",
"Message": "success",
"Data": {
"RegionId": "cn-shanghai",
"ProjectId": 23620,
"ObjectId": "node-id",
"FileName": "knowledge.md",
"FileSize": 1024,
"UploadingStatus": "Uploaded",
"CreateTime": 1794787200000,
"ModifyTime": 1794787200000,
"ContentUrl": "https://example.com/knowledge.md"
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 403 | Forbidden.AccessDenied | Request was denied due to workspace access control. | |
| 404 | ReferenceFile.NotFound | The specified reference file does not exist. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.