5.6.3. TaskStop

Description

Stopping tasks.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"TaskStop",
      "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.

Reply

{
  "reply":[
    {
      "method":"TaskStop",
      "result":[
        {
          "task_id":(number),
          "status":"Stop request was sent"
        }
      ]
    }
  ]
}
  • task_id - an integer value, a task identifier.

Example

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

#2. Request to stop several tasks
  curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"TaskStop", "params":{"project_id":23,"task_ids":[241458,241456]}}]}'
Reply to a request to stop several tasks
 {
   "reply":[
     {
       "method":"TaskStop",
       "result":[
         {
           "task_id":241458,
           "status":"Stop request was sent"
         },
         {
           "task_id":241456,
           "status":"Stop request was sent"
         }
       ]
     }
   ]
 }