checkAsyncStatus
To check the status of an asynchronous SOAP web services job, you use the checkAsyncStatus operation. When you use this operation, you reference a job Id. In response, the system returns the job’s status, among other details.
SOAP Request
The following example shows a checkAsyncStatus request.
<soap:Body>
<platformMsgs:checkAsyncStatus>
<platformMsgs:jobId>ASYNCWEBSERVICES_563214_053120061943428686160042948_4bee0685
</platformMsgs:jobId>
</platformMsgs:checkAsyncStatus>
</soap:Body>=
SOAP Response
<soapenv:Body>
<checkAsyncStatusResponse
xmlns="urn:messages_2017_1.platform.webservices.netsuite.com">
<asyncStatusResult xmlns="urn:core_2017_1.platform.webservices.netsuite.com">
<jobId>ASYNCWEBSERVICES_563214_053120061943428686160042948_4bee0685</jobId>
<status>pending</status>
<percentCompleted>0.0</percentCompleted>
<estRemainingDuration>0.0</estRemainingDuration>
</asyncStatusResult>
</checkAsyncStatusResponse>
</soapenv:Body>
In REST web services, you can use the async service to retrieve the status of a single async operation. For detailed information about asynchronous processing in REST and for more examples, see REST Web Services Request Processing.
REST Request
You can send a request similar to the following to get the task ID of the asynchronous request: GET https://demo123.suitetalk.api.netsuite.com/services/rest/async/v1/job/1/task/
Then you can send a request similar to the following to see the status of a completed asynchronous request: GET https://demo123.suitetalk.api.netsuite.com/services/rest/async/v1/job/1/task/1
REST Response
The following example shows the returned result.
{
"links": [
{
"rel": "related",
"href": "https://demo123.suitetalk.api.netsuite.com/services/rest/async/v1/job/1/task/1/result"
},
{
"rel": "self",
"href": "https://demo123.suitetalk.api.netsuite.com/services/rest/async/v1/job/1/task/1"
},
],
"completed": true,
"endTime": 2020-12-09T12:04:40Z,
"id": "1",
"progress": "succeeded",
"startTime": "2020-12-09T12:04:28Z"
}