Listen Submission
Listen the submission that has been sent, with the resultId
Listen Submission
This is how you listen the submission, by getting the resultId coming from the Start Submission request.
Authentication
Please be careful while sending the header, its key is "api-token".
Download Sanitized File
To get the sanitized file, there are some steps to do.
First thing is after status key is 2 (Completed) we can access the result key.
In result key, there is an array field: files
Example of Files
"files": [
{
"name": "58b46901099bd149b6a9c186ddd5394e2d98cfafdecd179bc428e89c01303a2b_sanitized.docx",
"id": "336ccc96-286c-4a12-afce-4efe2f8fdba4"
}
],
Array contains the extracted files after the process, which is sanitized file in our CDR case.
The name of the file is just for information or for your use case. The main thing you will use to get the sanitized file is the id field.
Please check the Download Sanitized File part the download the file with the given file id in the result of the submission.
The UUID of the submission
a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6
GET /listen/{submissionId} HTTP/1.1
Host:
Accept: */*
{
"status": "2",
"message": "There is no submission with this id",
"result": "{\"message\": \"The submission is started successfully\", \"resultId\": \"a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6\", \"status\": 3, \"Score\": 0.5}",
"files": "[{\"name\": \"result.json\", \"id\": \"a1b2c3d4-e5f6-g7h8-i9j0-k1l2m3n4o5p6\"}]"
}
Example Response
{
"type": "file",
"name": "sample.docx",
"fileId": "58b46901099bd149b6a9c186ddd5394e2d98cfafdecd179bc428e89c01303a2b",
"resultId": "a3d68330-4155-469c-a393-beaa645015da",
"size": 46516,
"hashes": {
"sha256": "58b46901099bd149b6a9c186ddd5394e2d98cfafdecd179bc428e89c01303a2b",
"sha1": "35d4cdeea9bf51902ca268af911c9d527af3d35e",
"md5": "480f4b4ffb6cca1b872cf55329a8881e"
},
"status": 2,
"level": 0,
"files": [
{
"name": "58b46901099bd149b6a9c186ddd5394e2d98cfafdecd179bc428e89c01303a2b_sanitized.docx",
"id": "336ccc96-286c-4a12-afce-4efe2f8fdba4"
}
],
"message": "Submission is finished",
"result": {
"filename": "58b46901099bd149b6a9c186ddd5394e2d98cfafdecd179bc428e89c01303a2b_sanitized.docx",
"log": {
"description": "File sanitized successfully.",
"removed": [
"Metadata"
],
"sanitized": [
"Image"
],
"processing time": "7.50170 seconds"
}
}
}
Last updated
Was this helpful?