edit-icon download-icon

PollTaskResult

Last Updated: Apr 23, 2018

Description

The PollTaskResult API obtains a task details list of the completed tasks of a domain name (including successful tasks and failed tasks that reach the retry limit). This API must be used with AcknowledgeTaskResult to confirm task results. After task results are confirmed, the corresponding task records cannot be queried by using this API.

Request parameters

Parameter Type Required Sample value Description
PageNum Integer Yes 1 Page number.
PageSize Integer Yes 20 Page size.
DomainName String No test.com Domain name.
InstanceId String No S20181T0WLI85212 Instance ID.
Lang String No en Language of the error message returned by the API, which has the following enumerated values: zh (Chinese) and en (English). The default value is en.
TaskNo String No 75addb07-28a3-450e-b5ec-test Task number.
TaskResultStatus Integer No 2 The task result type, with the following enumerated values:
  • 2: Success
  • 3: Failed
UserClientIp String No 127.0.0.1 User IP address.

Response parameters

Parameter Type Sample value Description
RequestId String E879DC07-38EE-4408-9F33-73B30CD965CD Unique request ID.
TotalItemNum Integer 10 Total number of entries.
CurrentPageNum Integer 1 Current page number.
TotalPageNum Integer 10 Total number of pages.
PageSize Integer 1 Page size.
PrePage Boolean false Whether the previous page exists.
NextPage Boolean false Whether the next page exists.
Data Task details list.
  └TaskNo String b95bc334-f7d8-4f39-8a62-4c4302a243d8 Task number.
  └TaskDetailNo String 15fee9d10d514bada66bd08c5723c583 Task details number.
  └TaskType String CHG_DNS Task type.
  └InstanceId String S201817141000000 Domain name instance ID.
  └DomainName String test.com Domain name.
  └TaskStatus String EXECUTE_SUCCESS Task status. Possible values:
  • WAITING_EXECUTE: Awaiting execution
  • EXECUTING: Execution in progress
  • EXECUTE_SUCCESS: Execution successful
  • EXECUTE_FAILURE: Execution failed
  └UpdateTime String 2018-03-26 15:22:18 Execution time of the last task details operation.
  └CreateTime String 2018-03-26 15:08:20 Task creation time.
  └TryCount Integer 0 Number of task details operation retries.
  └ErrorMsg String The operation is successful. Task execution error message.
  └TaskStatusCode Integer 2 Task status code. Possible values:
  • 0: Awaiting execution
  • 1: Execution in progress
  • 2: Execution successful
  • 3: Execution failed
  └TaskResult String test Task result.
  └TaskTypeDescription String Modify DNS Task type description. Change the Lang parameter to change the language used in this field.

Samples

Sample request

  1. /?Action=PollTaskResult
  2. &PageNum=1
  3. &PageSize=20
  4. &DomainName=test.com
  5. &InstanceId=S20181T0WLI85212
  6. &TaskNo=75addb07-28a3-450e-b5ec-test
  7. &TaskResultStatus=2
  8. &TaskType=1
  9. &<Public request parameter>

Sample of a normal response

  • XML format
  1. <PollTaskResultResponse>
  2. <Data>
  3. <TaskDetail>
  4. <TryCount>0</TryCount>
  5. <TaskDetailNo>15fee9d10d514bada66bd08c5723c583</TaskDetailNo>
  6. <TaskNo>b95bc334-f7d8-4f39-8a62-4c4302a243d8</TaskNo>
  7. <CreateTime>2018-03-26 15:08:20</CreateTime>
  8. <InstanceId>S201817141000000</InstanceId>
  9. <UpdateTime>2018-03-26 15:22:18</UpdateTime>
  10. <TaskStatus>EXECUTE_SUCCESS</TaskStatus>
  11. <DomainName>test.com</DomainName>
  12. <TaskTypeDescription>DNS Modification</TaskTypeDescription>
  13. <TaskStatusCode>2</TaskStatusCode>
  14. <ErrorMsg>The operation is successful.</ErrorMsg>
  15. <TaskType>CHG_DNS</TaskType>
  16. </TaskDetail>
  17. </Data>
  18. <TotalItemNum>10</TotalItemNum>
  19. <PageSize>1</PageSize>
  20. <CurrentPageNum>1</CurrentPageNum>
  21. <RequestId>C2CB6161-7971-4EB6-BC16-92A2BA3816D9</RequestId>
  22. <TotalPageNum>10</TotalPageNum>
  23. </PollTaskResultResponse>
  • JSON format
  1. {
  2. "CurrentPageNum":1,
  3. "Data":{
  4. "TaskDetail":[{
  5. "CreateTime":"2018-03-26 15:08:20",
  6. "DomainName":"test.com",
  7. "ErrorMsg":"The operation is successful.",
  8. "InstanceId":"S201817141000000",
  9. "TaskDetailNo":"15fee9d10d514bada66bd08c5723c583",
  10. "TaskNo":"b95bc334-f7d8-4f39-8a62-4c4302a243d8",
  11. "TaskStatus":"EXECUTE_SUCCESS",
  12. "TaskStatusCode":2,
  13. "TaskType":"CHG_DNS",
  14. "TaskTypeDescription":"DNS Modification",
  15. "TryCount":0,
  16. "UpdateTime":"2018-03-26 15:22:18"
  17. }]
  18. },
  19. "PageSize":1,
  20. "RequestId":"E879DC07-38EE-4408-9F33-73B30CD965CD",
  21. "TotalItemNum":10,
  22. "TotalPageNum":10
  23. }

Sample of an abnormal response

  • XML format
  1. <Error>
  2. <RequestId>3D864CDF-026E-45FE-99C8-B31D0E6A775A</RequestId>
  3. <HostId>domain.aliyuncs.com</HostId>
  4. <Code>MissingPageSize</Code>
  5. <Message>PageSize is mandatory for this action.</Message>
  6. <Recommend><![CDATA[https://error-center.aliyun.com/status/search?Keyword=MissingPageSize&source=PopGw]]></Recommend>
  7. </Error>
  • JSON format
  1. {
  2. "Code":"MissingPageSize",
  3. "HostId":"domain.aliyuncs.com",
  4. "Message":"PageSize is mandatory for this action.",
  5. "Recommend":"https://error-center.aliyun.com/status/search?Keyword=MissingPageSize&source=PopGw",
  6. "RequestId":"85A308D1-F383-4552-B9E7-8D312218D434"
  7. }

Error codes

See the error codes of the product.

Thank you! We've received your feedback.