Description of the on_result Callback
This callback is called periodically during the analysis’ processing. It retrieves an intermediate result (unavailable for the capture mode). The result content depends on the Web Adapter result_mode configuration parameter.
Safe
When result_mode is safe, the on_result callback contains the state of the analysis only:
{
"state": "processing"
}or
{
"state": "finished"
}Please note: the options listed below are for testing purposes only. If you require more information than what is available in the Safe mode, please follow Security Recommendations.
Status
For the status value, the callback contains the state of the analysis, and for each of the analysis types, the name of the type, state, and resolution.
{
"state": "processing",
"analyses": {
"quality": {
"state": "processing",
"resolution": ""
}
}
}or
{
"state": "finished",
"analyses": {
"quality": {
"state": "finished",
"resolution": "success"
}
}
}Folder
The folder value is almost similar to the status value, with the only difference: the folder_id is added.
{
"state": "processing",
"folder_id": "your_folder_id",
"analyses": {
"quality": {
"state": "processing",
"resolution": ""
}
}
}Full
If result_mode is set to full, you will either receive:
while the analysis is in progress, the response similar to the
statusresponse for processing;once the analysis is finished, the full information on the analysis:
everything that you could see in the
foldermode;timestamps;
metadata;
analyses’, company, analysis group IDs;
thresholds;
media info;
and more.
Last updated
Was this helpful?
