5.6.1. TaskInfo

Description

Detailed information about task states and task settings.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"TaskInfo",
      "params":{
        "project_id":(number),
        "task_ids":' id1 | [id1,id2] | "*" '
      }
    }
  ]
}
  • 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, information request for all active tasks of all running probes in the project.

Reply

{
  "reply":[
    {
      "method":"TaskInfo",
      "result":[
        {
          "task_id":(number),
          "app_id":(number),
          "uri":(string),
          "name":(string),
          "status":(string),
          "start":(string),
          "start_f":(number),
          "service":(string),
          "tags":(string),
          "profiles":{
            "alarm":[(number)],
            "email":[(number)],
            "threshold":[(number)],
            "pagerduty":[(number)],
            "record":[(number)],
            "snmp":[(number)],
            "webhook":[(number)],
            "telegram":[(number)],
            "kpi":[(number)]
          },
          "task_config":{
            ...
          }
          "description": {
            ...
          }
        }
      ]
    }
  ]
}
  • task_id - an integer value, a task identifier;

  • app_id - an integer value, a probe identifier;

  • uri - a string, a path to an analysed stream (a service, a file);

  • name - a string, a stream name (e.g. a channel name);

  • status - a string, a task status:
    Scheduled - start of a task is planned. The state is assigned to tasks set using API. Further, the state changes to a one of the described below depending on the success of a task starting;
    Started - a task is in progress;
    Stopped - a task is stopped;
    Stalled - a task is incorrectly stopped. The server doesn’t receive the analysis task data although the task stop command has not been received. The main reason is usually loss of connection to the server by the probe or the incorrect termination of the probe operation;
    Rejected - start of a task was rejected. Reasons can be found in the task Event journal in the web interface.
  • start - a string, a task creation date and time;

  • start_f - a real number, a task creation date in the format of Unix time with a fractional part (to increase the accuracy);

  • service - a string, a service (channel) identification name used to consolidate service states and errors from different monitoring points. This field binds the project tasks from different probes to be displayed in MosaicView;

  • tags - a string, a list of tags separated by commas. Tags are used to filter displaying on different views;

  • profiles - an object, a list of profile identifiers of the notification system, record settings and service availability:
    • alarm - an array of integer values, an identifier of the Alarm notification triggers profile. The current implementation supports using only one profile of this type;

    • email - an array of integer values, identifiers of the E-mail notification triggers profiles;

    • threshold - an array of integer values, an identifier of a settings profile and thresholds. The current implementation supports using only one profile of this type;

    • pagerduty - an array of integer values, profile identifiers of notification triggers to the PagerDuty system;

    • record - an array of integer values, identifiers of record settings profiles;

    • snmp - an array of integer values, identifiers of the SNMP notification triggers profiles;

    • webhook - an array of integer values, identifiers of the Webhook notification triggers profiles;

    • telegram - an array of integer values, profile identifiers of notification triggers to the Telegram messenger;

    • kpi - an array of integer values, a profile identifier of service availability profile. The current implementation supports using only one profile of this type;

  • task_config - an object, additional information about a task and task settings. The structure is described in more detail in the section Task Configuration;

  • description - an object, a description of relations between a parent task and subtasks. To monitor some services, start of several tasks is required. See more details in the section Hierarchy of Boro System Entities. Contents of the object vary depending on a type of task requested for information as it is presented in examples below.

Example

Request by the cURL utility
#1. Information request for one task
  curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"TaskInfo", "params":{"project_id":23,"task_ids":238733}}]}'

#2. Information request for several tasks
  curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"TaskInfo", "params":{"project_id":23,"task_ids":[234590,234175]}}]}'

#3. Information request for all active tasks of all running probes in the project.
  curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"TaskInfo", "params":{"project_id":23,"task_ids":"*"}}]}'
Part of a reply to a one task information request
 {
   "reply":[
     {
       "method":"TaskInfo",
       "result":[
         {
           "task_id":234590,
           "app_id":703,
           "uri":"http://10.10.30.147:8080/subs.m3u8",
           "name":"Channel1 SportSD HLSv4",
           "status":"Started",
           "start":"2020-02-07 18:07:24 +0700",
           "start_f":1581073644.1312609,
           "service":"Channel1",
           "tags":"OTT ,HD,TV35",
           "profiles":{
             "alarm":[79],
             "threshold":[96],
             "snmp":[263],
             "webhook":[265]
           },
           "task_config":{
             ...
           },
           "description":{
             ...
           }
         }
       ]
     }
   ]
 }

Contents of the description field vary depending on a type of task. Description of the field’s contents for different task types is presented below:

IPTV task

{
  "description":{
    "protocol":"iptv"
  }
}

HLS child task

An HLS child task is Alternative Renditions analysis tabs on a task page in the Boro interface.

{
  "description":{
    "protocol":"hls"
    "parentTaskId":234590
  }
}
  • parentTaskId - an integer value, an HLS parent task identifier;

HLS parent task

An HLS parent task is the Master tab on a task page in the Boro interface.

{
   "description":{
     "protocol":"hls",
     "ottMode":"allRenditionsMaster",
     "ottType":"Live",
     "hasChildTasks":true,
     "group":{
       "children":[
         241560,
         241561,
         241562,
         241563,
         241557,
         241559,
         241558
       ],
       "ottPresentation":{
         "variantStreams":[
           {
             "taskId":241563,
             "uri":"http://10.10.30.53:8080/subs/LQ_video.m3u8",
             "manifestUri":"subs/LQ_video.m3u8",
             "SUBTITLES":"subs",
             "RESOLUTION":"720x576",
             "BANDWIDTH":2000000,
             "CODECS":"avc1.4D001E,mp4a.40.2",
             "AUDIO":"audio-HQ"
           },
           {
             "taskId":241559,
             "uri":"http://10.10.30.53:8080/subs/HQ_video.m3u8",
             "manifestUri":"subs/HQ_video.m3u8",
             "SUBTITLES":"subs",
             "RESOLUTION":"1920x1088",
             "BANDWIDTH":8000000,
             "CODECS":"avc1.4D0028,mp4a.40.2",
             "AUDIO":"audio-HQ"
           }
         ],
         "renditions":[
           {
             "taskId":241560,
             "uri":"http://10.10.30.53:8080/subs/teletext_2.m3u8",
             "manifestUri":"subs/teletext_2.m3u8",
             "NAME":"teletext_2",
             "DEFAULT":"NO",
             "GROUP-ID":"subs",
             "TYPE":"SUBTITLES"
           },
           {
             "taskId":241561,
             "uri":"http://10.10.30.53:8080/subs/teletext_1.m3u8",
             "manifestUri":"subs/teletext_1.m3u8",
             "NAME":"teletext_1",
             "DEFAULT":"NO",
             "GROUP-ID":"subs",
             "TYPE":"SUBTITLES"
           },
           {
             "taskId":241562,
             "uri":"http://10.10.30.53:8080/subs/HQ_audio_3.m3u8",
             "manifestUri":"subs/HQ_audio_3.m3u8",
             "LANGUAGE":"eng",
             "NAME":"HQ_audio_3",
             "GROUP-ID":"audio-HQ",
             "TYPE":"AUDIO"
           },
           {
             "taskId":241557,
             "uri":"http://10.10.30.53:8080/subs/HQ_audio_1.m3u8",
             "manifestUri":"subs/HQ_audio_1.m3u8",
             "LANGUAGE":"nor",
             "NAME":"HQ_audio_1",
             "GROUP-ID":"audio-HQ",
             "TYPE":"AUDIO"
           },
           {
             "taskId":241558,
             "uri":"http://10.10.30.53:8080/subs/HQ_audio_2.m3u8",
             "manifestUri":"subs/HQ_audio_2.m3u8",
             "LANGUAGE":"dan",
             "NAME":"HQ_audio_2",
             "GROUP-ID":"audio-HQ",
             "TYPE":"AUDIO"
           }
         ]
       }
     }
   }
 }

Important

Child task identifiers may change under the following conditions:
1. After the Master playlist update, when the playlist structure has been significantly changed: the description AND the URI of Alternative Rendition or Variant Stream have been modified;
2. If a task is in the Player mode (see the playerMaster description below), when the Variant Stream switches.

Note

Below are described some of the fields received by the probe from the Master playlist. More information is in the HTTP Live Streaming [RFC8216] specification:

  • protocol - a string, a protocol of an analysed stream (service);

  • ottMode - a string, the HLS service analysis mode (more information can be found in the ottAllRenditions field description in the Task Configuration chapter):
    allRenditionsMaster - the Master playlist URI is specified to the analyser. The probe analyses all Alternative Renditions of all Variant Streams. A parent task and subtasks are created for each Alternative Rendition analysis;
    playerMaster - the Master playlist URI is specified to the analyser. The probe is in the Player mode. A parent task and several subtasks are created depending on the analysed Variant Stream structure;
    rendition - the Alternative Rendition or Variant Stream URI is specified to the analyser. A one task is created.
  • ottType - a string, the type of the service and its analysis mode:
    Live - the type is Live, analysing speed is equal to a segment playback speed;
    VOD - the type is Video On Demand, analysing speed is equal to a segment playback speed;
    VODgreedy - the type is Video On Demand. The aggressive download mode. Content is analysed with the maximum possible speed.
  • hasChildTasks - a logical type, true - the requested task is parent and has child tasks;

  • group - an object, a description of relations between a parent task - subtasks and a description of OTT service structure;

  • children - an array of integer values, subtask identifiers;

  • ottPresentation - an object, a detailed description of subtasks:

  • variantStreams - an array of objects, a description of subtasks that are used for Variant Streams analysis:
    • taskId - an integer value, a child task identifier;

    • uri - a string, an absolute path to the playlist with Alternative Renditions parsed by the probe;

    • manifestUri - a string, a path to the Playlist with Alternative Renditions specified in the Master playlist. It may be identical with an absolute path;

    • SUBTITLES - a string, an identifier of a subtitle Renditions group. The specified group should be used when playing this Variant Stream presentation;

    • AUDIO - a string, an identifier of an audio Renditions group. The specified group should be used when playing this Variant Stream presentation;

    • VIDEO - a string, an identifier of a video Renditions group. The specified group should be used when playing this Variant Stream presentation;

    • RESOLUTION - a string, specifies the optimal pixel resolution in which all the video in the Variant Stream should be displayed;

    • BANDWIDTH - a string, the maximum sum number of the peak segment bit rate values. The sum is formed by the combination of Alternative Renditions of a particular Variant Stream;

    • CODECS - a string, a list of formats, where each format specifies a media sample type that is present in one or more Renditions specified by the Variant Stream.

  • renditions - an array of objects, a description of subtasks that are used for Alternative Renditions analysis:
    • taskId - an integer value, a child task identifier;

    • uri - a string, an absolute path to the playlist with Alternative Renditions parsed by the probe;

    • manifestUri - a string, a path to the Playlist with Alternative Renditions specified in the Master playlist. It may be identical with an absolute path;

    • DEFAULT - a string, if the value is “YES”, and there is no information from the user indicating a different choice, the player will play this content Rendition by default. The Standard describes the following possible values: YES, NO;

    • TYPE - a string, a type of the Alternative Rendition. In accordance with the Standard, the following values are possible: AUDIO, VIDEO, SUBTITLES, and CLOSED-CAPTIONS. The object describes the Alternative Rendition analysis task if the type field is present in a subtask description; otherwise, the object describes a Variant Stream analysis task;

    • GROUP-ID - a string, an identifier of the group to which the Alternative Rendition belongs;

    • LANGUAGE - a string, the standard Tag [RFC5646] for identifying the primary language used in the Alternative Rendition in the Master playlist;

    • NAME - a string, a human-readable description of the Alternative Rendition.