5.1. General Information

Important

If you monitor the results of Boro server management over API in the web interface, refresh the page after executing a command.

5.1.1. Description

The API is meant for the Boro Solution management and receiving analysis results. To configure API access, follow the steps below:

Important

It is required to specify a Host Name on the Email tab. System cannot apply API settings without this.

  1. Configure API access in the Nginx server.

  2. Enable management of Boro Solution server via API: Log in to a server administrator account (the Superadmin role); For this, go to the server settings tab AdminControl API and enable the checkbox.

    ../_images/AdminApiEnable_en.png
  3. [optionally] Configure user authentication.

5.1.2. Hierarchy of Boro System Entities

Hierarchy

../_images/ProjectProbeTask.tree.png

Project

//TODO//

Probe

//TODO//

Analysis tasks

//TODO//

5.1.3. Message Format Description

The message format is based on JSON RPC. Requests are sent to Boro Server via HTTP POST on the URL http://<SERVER_NAME>/ctrl_api/v1/json.

REQUEST:

Request is a POST message with the content type Content-Type: application/json.

{
  "user_id":(number),
  "methods":[
    {
      "method":(string),
      "id":(number),
      "params":{
        ...
        /DATA/
        ...
      }
    }
  ]
}
  • user_id - an integer value, a user identifier;

  • methods - an array of objects, a list of called methods with parameters. Several methods can be called in one request (including a call of several the same methods using the optional id field for a reply identification);

  • method - a string, a name of the called method;

  • id (optional field) - an integer value, a request identifier. A specified value is returned in a reply to a method call. The field is meant for a reply identification while calling several identical methods;

  • params - an object, parameters of a called method (see description of each method).

REPLY:

Data in the JSON format.

{
  "reply":[
    {
      "method":(string),
      "id":(number),
      "result":[
        ...
        /DATA/
        ...
      ]
    }
  ]
}
  • method - a string, a name of the called method;

  • id (optional field) - an integer value, a request identifier. The value specified in a request is returned in a reply. The field is meant for a reply identification while calling several identical methods;

  • result - an array of objects, data returned by a method (see description of each method).