Domain name for API request: databuddy.intl.tencentcloudapi.com.
Get the file's metadata, optionally including file content, and read historical snapshots by version.
Prerequisite
Error codes (Module: Studio)
| Error Code | Inner Code | Description | Handling Suggestion |
|---|---|---|---|
MissingParameter.WorkspaceId |
1030001 | Lack of WorkspaceId | Please input WorkspaceId |
MissingParameter.FileId |
1030003 | FileId and FilePath cannot be empty at the same time | Pass at least one of FileId and FilePath |
InvalidParameterValue.FileType |
1030102 | FileType value unsupported | FileType takes FILE/NOTEBOOK_FILE/SQL_FILE |
ResourceNotFound.FileNotFound |
1030203 | File does not exist or has been deleted | Confirm the FileId or FilePath |
ResourceNotFound.FileVersionNotFound |
1030205 | The specified file version does not exist | Confirm the VersionId or call ListFileVersions to retrieve |
UnauthorizedOperation.FileReadDenied |
1030304 | No read permission for this file | Contact the file owner or space admin for authorization |
InternalError |
1030900 | Internal service error | Please carry the RequestId and contact support |
A maximum of 20 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: GetFile. |
| Version | Yes | String | Common Params. The value used for this API: 2026-07-15. |
| Region | Yes | String | Common Params. For more information, please see the list of regions supported by the product. |
| WorkspaceId | Yes | String | Workspace ID. Source: WorkspaceId returned by the ListWorkspaces API. |
| FileId | No | String | File ID. Source: FileId returned by the CreateFile / ListFiles API. Choose either this or FilePath |
| FileType | No | String | File type. Value: FILE (regular file/script), NOTEBOOK_FILE (Notebook), SQL_FILE (SQL file). Corresponds to common/domain/entity.proto EntityType |
| IncludeContent | No | Boolean | Whether to return file content. If true, Storage.Content returns base64 content. false by default |
| VersionId | No | String | File version ID. Source: VersionId returned by the ListFileVersions API. If not specified, the latest version is read. |
| FilePath | No | String | Full path of the file, beginning with /, for example /etl/daily/demo.ipynb. Either this or FileId |
| Parameter Name | Type | Description |
|---|---|---|
| Data | FileInfo | Returned results |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
Query file metadata and content
POST / HTTP/1.1
Host: databuddy.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: GetFile
<Common request parameters>
{
"WorkspaceId": "17676920188276733",
"FileId": "837014075591299072",
"FileType": "NOTEBOOK_FILE",
"IncludeContent": false,
"VersionId": "872595707510808576",
"FilePath": "/Workspace/Users/xingyundong@700002355291/abc.ipynb"
}
{
"Response": {
"Data": {
"AppId": "251436191",
"BundleId": "",
"BundleInfo": "",
"CreateTime": "1777367707",
"CreateUserUin": "700002164618",
"FileConfig": {
"AdvanceConfig": "",
"DefaultCatalog": "",
"DefaultSchema": "",
"ExtraParams": "",
"OutputConf": [],
"Params": "eyJtbGZsb3dfcHJlX2V4ZWN1dGVfY29zX3BhdGgiOiIifQ==",
"ResourceId": ""
},
"FileId": "837014075591299072",
"FileName": "abc.ipynb",
"FileType": "NOTEBOOK_FILE",
"OwnerUserName": "wedata30-dev@tencent.com",
"Path": "/Workspace/Users/xingyundong@700002355291/abc.ipynb",
"Permissions": "[MANAGE]",
"ReleaseStatus": false,
"ResourceMode": 1,
"Status": "active",
"Storage": {
"Content": "",
"StoragePath": "",
"StorageType": 0
},
"UpdateTime": "1785851029",
"UpdateUserUin": "700002164618",
"WorkspaceId": "17676920188276733"
},
"RequestId": "30507de5-777a-48b0-ab08-c86597439dd5"
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
There is no error code related to the API business logic. For other error codes, please see Common Error Codes.
フィードバック