getTaskResult : request task result
Description
After creating a task, its status needs to be checked periodically in order to obtain the final result.
https://api.capmonster.cloud/getTaskResult
request format: JSON POST
Limit: 120 requests per task. If the limit is exceeded, the user's account may be temporarily locked.
Request parameters
clientKey
Type: String
Required: Yes
Unique key of your account.
taskId
Type: Integer
Required: Yes
ID which was obtained in createTask method.
Request example
{
"clientKey":"API_KEY",
"taskId": 7654321
}
Response structure
errorId
Type: Integer
Error identificator.
0 - no errors, no errorCode property;
1 - error, information about it is in the errorCode property.
errorCode
Type: String
Error code. Check out error list.
status
Type: String
processing - task is not ready yet;
ready - task complete, solution object can be found in solution property.
solution
Type: Object
Task result data. Different for each type of task.
cost
Type: Float
Solution cost in US dollars (USD). The value depends on the task type and matches the current pricing. The field is returned only in the ready response, when status is ready.
Response example
Response is in process
{
"errorCode": null,
"errorDescription": null,
"errorId": 0,
"status": "processing"
}
Successful response
{
"errorId":0,
"cost":0.0003,
"status":"ready",
"solution": {
"text":"answer"
}
}
