5.5.3. AppTasks

Description

List of active probe tasks.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"AppTasks",
      "params":{
        "project_id":(number),
        "app_ids":' id1 | [id1,id2] | "*" '
      }
    }
  ]
}
  • user_id - an integer value, a user identifier;

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

  • app_ids - probe identifiers, the field can be set in one of the following formats:
    id1 - an integer value, a probe identifier;
    [id1,id2] - an array of integer values, probe identifiers;
    "*" - a string, the “asterisk” symbol, information request for all running probes.

Reply

Example of a reply to a request (the information request for one probe)
{
  "reply":[
    {
      "method":"AppTasks",
      "result":[
        {
          "app_id":(number),
          "live_tasks":[
            199498,
            212651
          ],
          "sub_tasks":{
            "212651":[
              227531,
              227532,
              227533
            ]
          }
        }
      ]
    }
  ]
}
  • app_id - an integer value, a probe identifier;

  • live_tasks - an array of integer values, identifiers of running probe tasks;

  • sub_tasks - an array of objects, each object represents relations between a Master task identifier and subtask identifiers.

Note

More detailed information about relations and hierarchy of tasks can be found in the paragraph Hierarchy of Boro System Entities.

Example

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

#2. Information request for several probes
curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"AppTasks","params":{"project_id":23,"app_ids":[702,703]}}]}'

#3. Information request for all running probes
curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"AppTasks","params":{"project_id":23,"app_ids":"*"}}]}'