GetInventoryExportTaskStatus
Queries the status of an asynchronous export task for inventory results.
Operation description
Polls the task status based on the exportTaskId returned by AsyncExportInventoryKnowledge or AsyncExportInventoryAsset. When status is SUCCESS, a pre-signed OSS downloadUrl is returned (signed on each query). When status is FAILED, an errorMessage is returned. When status is RUNNING, no downloadUrl is returned.
Try it now
Test
RAM authorization
Request syntax
POST / HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ExportTaskId |
integer |
Yes |
The asynchronous export task ID returned by AsyncExportInventoryKnowledge or AsyncExportInventoryAsset. |
501 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response body. |
||
| RequestId |
string |
Id of the request |
0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931 |
| ErrorCode |
string |
The error code. |
UnknownError |
| ErrorMessage |
string |
The error message. |
UnknownError |
| Success |
boolean |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The export task result. |
|
| ExportTaskId |
integer |
The asynchronous export task ID. |
edd26f83-a5b0-4b7a-950b-ec4cd1b75397 |
| Status |
string |
The task status. Valid values: INIT, RUNNING, SUCCESS, and FAILED. |
SUCCESS |
| FileName |
string |
The suggested file name for saving the exported file. |
/crm-order-biz%3Bsrc%3Bmain%3Bresources%3Bmybatis%3Bmappers%3Brrscrm%3BOrderOutCountMapper.xml |
| DownloadUrl |
string |
The temporary download URL for the XLSX file. This parameter is returned only when status is SUCCESS. The URL is a pre-signed OSS URL. |
https://cas-documents-service.oss-cn-shanghai.aliyuncs.com/Batch_Upload_Monitor_Domain.xlsx?Expires=1753150095&OSSAccessKeyId=LTAIuSosQIEgsbko&Signature=d3pTFzTD07pXU11x7%2FekBbWqQfk%3D |
| ExpireTime |
integer |
The expiration time of the download URL, in UNIX millisecond timestamp format. This parameter is returned only when status is SUCCESS. |
1761448390 |
| TotalCount |
integer |
The total number of exported records. This parameter is returned only when status is SUCCESS. |
100 |
| ErrorMessage |
string |
The failure reason. This parameter is returned only when status is FAILED. |
NoPermission |
Examples
Success response
JSON format
{
"RequestId": "0C1CB646-1DE4-4AD0-B4A4-7D47DD52E931",
"ErrorCode": "UnknownError",
"ErrorMessage": "UnknownError",
"Success": true,
"Data": {
"ExportTaskId": 0,
"Status": "SUCCESS",
"FileName": "/crm-order-biz%3Bsrc%3Bmain%3Bresources%3Bmybatis%3Bmappers%3Brrscrm%3BOrderOutCountMapper.xml",
"DownloadUrl": "https://cas-documents-service.oss-cn-shanghai.aliyuncs.com/Batch_Upload_Monitor_Domain.xlsx?Expires=1753150095&OSSAccessKeyId=LTAIuSosQIEgsbko&Signature=d3pTFzTD07pXU11x7%2FekBbWqQfk%3D",
"ExpireTime": 1761448390,
"TotalCount": 100,
"ErrorMessage": "NoPermission"
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.