I have just started using the “Asynchronous”: true flag when calling the tools/create-archive REST API call and have found what I believe to be a bug.
If I place a call, wait for the job to finish and then call jobs//archive I get the result of the job. I can then create another job, wait for it to finish and then download the output no problem. My issue comes if I create multiple jobs without first downloading the output from the previous job. In those circumstances, as soon a new job is created, the output from previous jobs is no longer accessible and I get the response:
{
“Details” : “Job has no such output: archive”,
“HttpError” : “Not Found”,
“HttpStatus” : 404,
“Message” : “Accessing an inexistent item”,
“Method” : “GET”,
“OrthancError” : “Accessing an inexistent item”,
“OrthancStatus” : 7,
“Uri” : “/jobs/8be34b7d-bd31-4abb-b59d-c59a6800c6e4/archive”
}
This happens every single time and the only output that can be accessed is the last job to have been created.
After getting the above 404 message, if I query the job again I get:
{
“CompletionTime”: “20220524T140355.723968”,
“Content”: {
“ArchiveSize”: “4884469”,
“ArchiveSizeMB”: 4,
“Description”: “REST API”,
“InstancesCount”: 3,
“UncompressedSize”: “5743022”,
“UncompressedSizeMB”: 5
},
“CreationTime”: “20220524T140355.265902”,
“EffectiveRuntime”: 0.45000000000000001,
“ErrorCode”: 0,
“ErrorDescription”: “Success”,
“ErrorDetails”: “”,
“ID”: “8be34b7d-bd31-4abb-b59d-c59a6800c6e4”,
“Priority”: 0,
“Progress”: 100,
“State”: “Success”,
“Timestamp”: “20220524T143738.530289”,
“Type”: “Archive”
}
This would indicate that the output should still be available but it is not.
Any help in resolving this would be appreciated.
Thanks
Steve