4.3.10. TaskReport

Description

The method returns a report for the completed task.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"TaskReport",
      "params":{
        "project_id":(number),
        "task_ids":' id1 | [id1,id2] | "*" '
      }
    }
  ]
}

where:

  • user_id — an integer value, a user identifier;

  • project_id — an integer value, a user project identifier;

  • task_ids — task identifiers, the field can be specified in one of the following formats:

    • id1 — an integer value, a task identifier,

    • [id1,id2] — an array of integer values, task identifiers,

    • "*" — a string, the “asterisk” symbol, request for all running tasks, as well as tasks in the queue.

Reply

{
  "reply":[
    {
      "method":"TaskReport",
      "result":[
        {
          "task_id":(number),
          "app_id":(number),
          "template_id":(number),
          "template_uri":(string),
          "status":(string),
          "uri":(string),
          "name":(string),
          "priority":(string),
          "file_size":(number),
          "container":(string),
          "file_duration":(number),
          "start":(string),
          "start_unix":(number),
          "analysis_duration":(number),
          "task_report":[
            {
              "report_status":(string),
              "report_format":(string),
              "report_url":(string)
            }
          ]
          "task_result":(string),
          "task_page":(string)
        }
      ],
      "errors":[(string)]
    }
  ]
}

where:

  • task_id — an integer value, a user identifier;

  • app_id — an integer value, a probe identifier;

  • template_id — an integer value, a template identifier;

  • template_uri — a string, template web page URL;

  • status — a string, status, indicates the stage of the task. List of statuses:

    • Scheduled — task is created and queued for launch. Next, the load balancer will evenly distribute the tasks from queue among the available project’s probes according to priority, then the status will change to one of the below-mentioned;

    • Explore — task sent to probe for look-ahead analysis;

    • Running — task launched;

    • Completed — task completed;

    • Rejected — task launch rejected. To learn why that happened, see the Dashboard page → Incomplete tasks block. Possible reasons:

      • Media file’s total duration is 0 seconds or probe failed to define duration,

      • Media file not found via the specified URI,

      • Media file fails to follow the test template’s compliance conditions. Inside the test templates’ settings, the Stop if condition not met option is enabled for Container Format, Video Format, or Audio Format tests. It can be disabled there,

      • Media file format not supported;

      • Access to media file validation is temporarily suspended when the license balance fully runs out or its remaining balance is less than the duration of the file submitted for validation. To learn more about the principle of using the license balance, see here.

    • Canceled — task stopped. Possible scenarios:

      • the task was stopped by the user in the web interface or using the TaskStop method. The reason will be indicated in the Dashboard → Incomplete tasks block,

      • The task was stopped by the load balancer because it was replaced by a task with the Immediate priority. For more details on load balancer operation and priority descriptions, see the Dashboard page.

    • Stalled — task stopped incorrectly and placed in the Dashboard → Incomplete tasks block. Server stopped obtaining analysis data, but the stop task command was never received. Normally this has to do with the server losing connection with the probe, or with the probe finishing its work incorrectly. In this case, the task will be restarted 3 times (by default). Automatic task restart scenario can be configured in Project settingsRestart Stalled tasks tab.

  • uri — a string, location of media file that’s being validated;

  • name — a string, media file validation task’s name;

  • priority — a string, task priority: low, normal, high, urgent, immediate;

  • file_size — an integer value, media file size in bytes;

  • container — a string, media container format;

  • file_duration — an integer value, media file duration in seconds;

  • start — a string, task start date and time in the YYYY-MM-DD hh:mm:ss format;

  • start_unix — a real number, task start date and time in the format of Unix time with a fractional part (to increase the accuracy);

  • analysis_duration — an integer value, validation task duration in seconds;

  • report_status — a string, report generation status:

    • InProgress — a string, report file is being generated,

    • Ready — a string, report file is ready.

  • report_format — a string, defines the format of the report file. Available formats: CSV, JSON, PDF;

  • report_url — a string, report file URL;

  • task_result — a string, task result:

    • Passed — a string, all template tests were passed successfully. Media file fully meets the requirements,

    • Warning — a string, the task is completed, but the report contains errors with the Warning severity level,

    • Failed — a string, the task is completed, but the report contains errors with the Error and (or) Fatal severity level.

  • task_page — a string, task web page URL;

  • errors — array of strings, returns a list of errors.

Example

Request by the cURL utility
#1. Request a report for a single task.
curl http://172.16.1.41/ctrl_api/v1/json \
 -H "Content-Type: application/json" \
 --data '{"user_id":1,"methods":[{"method":"TaskReport","params":{"project_id":2,"task_ids":[2213]}}]}'

#2. Request a report for three tasks with task_id 2213, 2222, 2288. The third task has a non-existent value in the task_ids field.
curl http://172.16.1.41/ctrl_api/v1/json \
 -H "Content-Type: application/json" \
 --data '{"user_id":1,"methods":[{"method":"TaskReport","params":{"project_id":2,"task_ids":[2213,2222,2288]}}]}'
Reply to request from example #1
{
  "reply": [
    {
      "method": "TaskReport",
      "result": [
        {
          "task_id": 2213,
          "app_id": 17,
          "template_id": 63,
          "template_uri": "http://172.16.1.41/projects/2/profiles?notif_id=63",
          "status": "Completed",
          "uri": "file:///mnt/VoD_storage/sample1.mp4",
          "name": "",
          "priority": "normal",
          "file_size": 77979254,
          "container": "MP4",
          "file_duration": 150,
          "start": "2026-04-03 16:15:19 +0700",
          "start_unix": 1775207719.2811599,
          "analysis_duration": 54,
          "task_report": [
            {
              "report_status": "Ready",
              "report_format": "JSON",
              "report_url": "http://172.16.1.41/projects/2/uploader_get?file=task_2213_sample1_mp4_json_origin.zip"
            }
          ],
          "task_result": "Failed",
          "task_page": "http://172.16.1.41/projects/2/apps/17/tasks/2213"
        }
      ]
    }
  ]
}
Reply to request from example #2
{
  "reply": [
    {
      "method": "TaskReport",
      "result": [
        {
          "task_id": 2222,
          "app_id": 17,
          "template_id": 63,
          "template_uri": "http://172.16.1.41/projects/2/profiles?notif_id=63",
          "status": "Completed",
          "uri": "file:///mnt/VoD_storage/sample2.mp4",
          "name": "Test2",
          "priority": "normal",
          "file_size": 160057200,
          "container": "MP4",
          "file_duration": 54,
          "start": "2026-04-03 16:15:19 +0700",
          "start_unix": 1775207719.2811599,
          "analysis_duration": 15,
          "task_report": [
            {
              "report_status": "Ready",
              "report_format": "JSON",
              "report_url": "http://172.16.1.41/projects/2/uploader_get?file=task_2222_sample2_mp4_json_origin.zip"
            },
            {
              "report_status": "Ready",
              "report_format": "CSV",
              "report_url": "http://172.16.1.41/projects/2/uploader_get?file=task_2222_sample2_mp4_csv_origin.zip"
            }
          ],
          "task_result": "Failed",
          "task_page": "http://172.16.1.41/projects/2/apps/17/tasks/2222"
        },
        {
          "task_id": 2213,
          "app_id": 17,
          "template_id": 63,
          "template_uri": "http://172.16.1.41/projects/2/profiles?notif_id=63",
          "status": "Completed",
          "uri": "file:///mnt/VoD_storage/sample1.mp4",
          "name": "",
          "priority": "normal",
          "file_size": 77979254,
          "container": "MP4",
          "file_duration": 150,
          "start": "2026-04-03 16:15:19 +0700",
          "start_unix": 1775207719.2811599,
          "analysis_duration": 54,
          "task_report": [
            {
              "report_status": "Ready",
              "report_format": "JSON",
              "report_url": "http://172.16.1.41/projects/2/uploader_get?file=task_2213_sample1_mp4_json_origin.zip"
            }
          ],
          "task_result": "Failed",
          "task_page": "http://172.16.1.41/projects/2/apps/17/tasks/2213"
        },
      ],
      "errors": [
        "Requested task IDs do not exist: [2288]"
      ]
    }
  ]
}