5.4.1. ProjectsList

Description

List of projects available for the user with the specified user_id value. List also contains additional information, such as a user role, a number of running probes and active tasks, etc.

Request

{
  "user_id":(number),
  "methods":[
    {
      "method":"ProjectsList",
      "params":{
        "type":(string),
        "limit_value":(number),
        "page":(number)
      }
    }
  ]
}
  • user_id - an integer value, a user identifier;

  • type (optional field) - a string, a project list filter. Depending on the given value, the following projects are displayed:
    own - projects that are owned by the user;
    shared - projects with the shared access provided to the user;
    all - default value, all available projects for the user.
  • limit_value (optional field) - an integer value, a maximum number of projects in a reply. It allows splitting the result list into several pages. Default value is 25;

  • page (optional field) - an integer value, allows selecting a result page. Default value is 1.

Reply

{
"reply":[
    {
    "method":"ProjectsList",
    "result":{
        "projects":[
        {
            "id":(number),
            "title":(string),
            "founder":(string),
            "role":(string),
            "live_apps_count":(number),
            "live_channels_count":(number),
            "live_streams_count":(number)
        }
        ],
        "current_page":(number),
        "total_pages":(number),
        "limit_value":(number)
      }
    }
  ]
}
  • id - an integer value, a user identifier;

  • title - a string, a project name;

  • founder - a string, a name or e-mail of a project owner;

  • role - a string, the user role in a project (more details in the Boro User Guide):
    owner - the user is a project owner;
    admin - the user is provided with the shared access with the Administrator rights to a project;
    user - the user is provided with the shared access with the Viewer rights to a project;
    engineer - the user is provided with the shared access with the Engineer rights to a project;
    operator - the user is provided with the shared access with the Operator rights to a project;
    unknown - the role is not defined. The request is performed for the user with the Solution Superuser rights (having the access to all projects).
  • live_apps_count - an integer value, a number of running probes;

  • live_channels_count - an integer value, a number of running probe tasks (channels or OTT services);

  • live_streams_count - an integer value, a number of streams under the license (see terms of the User License Agreement);

  • current_page - an integer value, a displayed result page;

  • total_pages - an integer value, a total number of result pages with limit_value specified;

  • limit_value - an integer value, a maximum number of projects in a reply.

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":"ProjectsList", "params":{"type":"all", "limit_value": 2, "page":1}}]}'
Reply
   {
   "reply":[
       {
       "method":"ProjectsList",
       "result":{
           "projects":[
           {
               "id":2,
               "title":"work",
               "founder":"Mark Twain",
               "role":"owner",
               "live_apps_count":5,
               "live_channels_count":100,
               "live_streams_count":150
           },
           {
               "id":3,
               "title":"myProject",
               "founder":"Julia Jonson",
               "role":"admin",
               "live_apps_count":2,
               "live_channels_count":5,
               "live_streams_count":5
           }
           ],
           "current_page":1,
           "total_pages":11,
           "limit_value":2
         }
       }
     ]
   }