Queries a list of file versions.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| FileId | long | Yes | The file ID. You can call ListFiles to query the file ID. | 100000001 |
| ProjectId | long | No | The DataWorks workspace ID. To find this, click the wrench icon in the upper-right corner and navigate to the workspace management page. | 100001 |
| ProjectIdentifier | string | No | The unique identifier of the DataWorks workspace, which is the identifier at the top of the Data Studio page where you switch workspaces. Either this parameter or ProjectId must be specified to identify the target DataWorks workspace for this API call. | dw_project |
| PageNumber | integer | No | The page number for pagination. | 1 |
| PageSize | integer | No | The number of entries per page. Default value: 10. Maximum value: 100. | 10 |
Response parameters
Examples
Sample success responses
JSONformat
{
"HttpStatusCode": 200,
"ErrorMessage": "The connection does not exist.",
"RequestId": "0000-ABCD-EFG****",
"ErrorCode": "Invalid.Tenant.ConnectionNotExists",
"Success": true,
"Data": {
"PageNumber": 1,
"PageSize": 10,
"TotalCount": 13,
"FileVersions": [
{
"FileContent": "SHOW TABLES;",
"Status": "COMMITTED",
"IsCurrentProd": false,
"CommitUser": "73842342****\n",
"NodeContent": {
"cycleType": 0,
"cronExpress": "00 05 00 * * ?"
},
"Comment": "Second version submission",
"FilePropertyContent": {
"fileName": "ods_user_info_d",
"fileType": 10
},
"FileName": "ods_user_info_d",
"UseType": "NORMAL",
"ChangeType": "UPDATE",
"FileVersion": 2,
"CommitTime": 1593881265000,
"NodeId": 1234
}
]
}
}Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | Forbidden.Access | Access is forbidden. Please first activate DataWorks Enterprise Edition or Flagship Edition. | No permission, please authorize |
| 429 | Throttling.Api | The request for this resource has exceeded your available limit. | - |
| 429 | Throttling.System | The DataWorks system is busy. Try again later. | - |
| 429 | Throttling.User | Your request is too frequent. Try again later. | - |
| 500 | InternalError.System | An internal system error occurred. Try again later. | - |
| 500 | InternalError.UserId.Missing | An internal system error occurred. Try again later. | - |
For a list of error codes, visit the Service error codes.
