5.5.1. AppList

Description

List of running and inactive probes of a project.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"AppList",
      "params":{
        "project_id":(number),
        "app_status":(string),
      }
    }
  ]
}
  • user_id - an integer value, a user identifier;

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

  • app_status (optional field) - a string, an information request about:
    active - running probes;
    stopped - inactive probes;
    all - default value, all probes.

Reply

{
  "reply":[
    {
      "method":"AppList",
      "result":[
        {
          "app_id":(number),
          "name":(string),
          "alive":(boolean)
        }
      ]
    }
  ]
}
  • app_id - an integer value, a probe identifier;

  • name - a string, a probe name;

  • alive - a logical type, probe status:
    true - a probe is running;
    false - a probe is stopped.

Example

Request by the cURL utility
curl http://172.16.11.111/ctrl_api/v1/json \
   -H "Content-Type: application/json" \
   --data '{"user_id":4,"methods":[{"method":"AppList","params":{"project_id":23}}]}'
Reply
 {
   "reply":[
     {
       "method":"AppList",
       "result":[
         {
           "app_id":537,
           "name":"CenOS pro probe",
           "alive":true
         },
         {
           "app_id":462,
           "name":"Experimental probe",
           "alive":true
         },
         {
           "app_id":461,
           "name":"IPTV edge",
           "alive":false
         }
       ]
     }
   ]
 }