You may have attempted to download a large amount of data from NetSuite but keep getting an aborted message in the response JSON from your /bulk/{id}/status
call that looks something like this:
{
"bulk_finish_time": "Some_time_in_zulu_format",
"bulk_start_time": "Some_time_in_zulu_format",
"error": null,
"fileFormat": "json",
"id": "and_id",
"instanceId": your_instance_id,
"job_direction": "DOWNLOAD",
"object_name": "Object_Name",
"recordsCount": number_of_records,
"recordsFailedCount": 0,
"status": "ABORTED"
}
The problem may be that you are not using a Single Session Lock Key. The lock key can be whatever unique key you like for that particular account and user. We suggest this format - account_id+username (eg 123-456-789kburnett)
Now your response from /bulk/{id}/status should look like:
{
"bulk_finish_time": "Some_time_in_zulu_format",
"bulk_start_time": "Some_time_in_zulu_format",
"error": null,
"fileFormat": "json",
"id": "and_id",
"instanceId": your_instance_id,
"job_direction": "DOWNLOAD",
"object_name": "Object_Name",
"recordsCount": number_of_records,
"recordsFailedCount": 0,
"status": "COMPLETED"
}
By using a single session lock you are telling the NetSuite API to only deal with the current API call (in this case the bulk job) and to ignore all other requests. Otherwise, for longer calls, the stream will be interrupted , leading to "status": "ABORTED"
".