Queries deleted files or directories.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | ListRecycledDirectoriesAndFiles |
The operation that you want to perform. Set the value to ListRecycledDirectoriesAndFiles. |
FileSystemId | String | Yes | 1ca404**** |
The ID of the file system. |
FileId | String | Yes | 04***08 |
The ID of the directory that you want to query. You can call the ListRecycleBinJobs operation to query the value of the FileId parameter. |
NextToken | String | No | 1256****25 |
The token that is used to retrieve the next page of the query results. You do not need to specify this parameter for the first query. If all the files and directories are incompletely returned in a query, the return value of the NextToken parameter is not empty. In this case, you can specify a valid value for the NextToken parameter to continue the query. |
MaxResults | Long | No | 100 |
The number of files or directories to return for each query. Valid values: 10 to 1000. Default value: 100. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 98696EF0-1607-4E9D-B01D-F20930B6**** |
The ID of the request. |
NextToken | String | None |
The token that is used to retrieve the next page of the query results. If all the files and directories are incompletely returned in a query, the return value of the NextToken parameter is not empty. In this case, you can specify a valid value for the NextToken parameter to continue the query. |
Entries | Array of Entry |
The array of information about files or directories in the recycle bin. |
|
FileId | String | 04***08 |
The IDs of the files or directories. |
Type | String | File |
The types of the returned objects. Valid values:
|
Name | String | test001 |
The name of the file or directory before it was deleted. |
DeleteTime | String | 2021-05-30T10:08:08Z |
The time at which the file or directory was deleted. |
Inode | String | 04***08 |
The inode of the file or directory. |
ATime | String | 2019-10-30T10:08:08Z |
The time at which the file or directory was last accessed. |
MTime | String | 2019-10-30T10:08:08Z |
The time at which the file or directory was last modified. |
CTime | String | 2019-10-30T10:08:08Z |
The time at which the metadata was last modified. |
Size | Long | 1073741824 |
The size of the file. Unit: bytes. The value 0 is returned for this parameter if Directory is returned for the Type parameter. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=ListRecycledDirectoriesAndFiles
&FileSystemId=1ca404****
&FileId=04***08
&NextToken=1256****25
&MaxResults=100
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ListRecycledDirectoriesAndFilesResponse>
<RequestId>98696EF0-1607-4E9D-B01D-F20930B6****</RequestId>
<NextToken>None</NextToken>
<Entries>
<FileId>04***08</FileId>
<Type>File</Type>
<Name>test001</Name>
<DeleteTime>2021-05-30T10:08:08Z</DeleteTime>
<Inode>04***08</Inode>
<ATime>2019-10-30T10:08:08Z</ATime>
<MTime>2019-10-30T10:08:08Z</MTime>
<CTime>2019-10-30T10:08:08Z</CTime>
<Size>1073741824</Size>
</Entries>
</ListRecycledDirectoriesAndFilesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "98696EF0-1607-4E9D-B01D-F20930B6****",
"NextToken" : "None",
"Entries" : [ {
"FileId" : "04***08",
"Type" : "File",
"Name" : "test001",
"DeleteTime" : "2021-05-30T10:08:08Z",
"Inode" : "04***08",
"ATime" : "2019-10-30T10:08:08Z",
"MTime" : "2019-10-30T10:08:08Z",
"CTime" : "2019-10-30T10:08:08Z",
"Size" : 1073741824
} ]
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | IllegalCharacters | The parameter contains illegal characters. | The error message returned because the specified value of a parameter is invalid. |
400 | MissingFileSystemId | FileSystemId is mandatory for this action. | The error message returned because the FileSystemId parameter is not specified. |
400 | InvalidParameter.KMSKeyId.KMSUnauthorized | KMS is not authorized. | The error message returned because you are not authorized to access Key Management Service (KMS). |
400 | InvalidParameter.KMSKeyId.CMKNotEnabled | The CMK needs to be enabled. | The error message returned because the specified customer master key (CMK) is disabled. |
404 | InvalidFileSystem.NotFound | The specified file system does not exist. | The error message returned because the specified file system does not exist. |
404 | InvalidFileId.NotFound | The specified FileId(%FileId) does not exist. | The error message returned because the specified file or directory does not exist. |
404 | InvalidParameter.InvalidNextToken | The specified NextToken is invaild. | The error message returned because an invalid value is specified for the NextToken parameter. |
For a list of error codes, visit the API Error Center.