Get All Root Entities

Returns a list of all child Entities of the root object (object with id=1).

Equivalent to sending the Get Entity Children request with path parameter id set to 1:

GET /node/api/entities/1/children

Request

HTTP Request

GET /node/api/entities

Permissions

entityPermissions

Query parameters

Parameter Type Description

skip-refs

Boolean

If true, response will not include references.

Request body

Request body is empty.

Response

Response contains an array of all children of the root object in the JSON format. See the Link and Object articles for a description of fields returned by this request.

Examples

Request

  • Bash

  • JavaScript

  • NodeJS

  • Python

login=<...>
password=<...>
saymon_hostname=<...>
url=https://$saymon_hostname/node/api/entities

curl -X GET $url -u $login:$password
let login = <...>
let password = <...>
let saymonHostname = <...>
let path = "/node/api/entities";
let auth = "Basic " + btoa(login + ":" + password);

let headers = new Headers();
headers.append("Authorization", auth);

let requestOptions = {
    method: "GET",
    headers: headers
};

fetch(saymonHostname + path, requestOptions)
    .then(response => response.text())
    .then(result => console.log(result))
    .catch(error => console.log("error", error));
const http = require("http");

let login = <...>
let password = <...>
let saymonHostname = <...>
let path = "/node/api/entities";
let auth = "Basic " + Buffer.from(login + ":" + password).toString("base64");

let options = {
    "method": "GET",
    "hostname": saymonHostname,
    "headers": {
        "Authorization": auth
    },
    "path": path
};

let req = http.request(options, function (res) {
    let chunks = [];

    res.on("data", function (chunk) {
        chunks.push(chunk);
    });

    res.on("end", function (chunk) {
        let body = Buffer.concat(chunks);
        console.log(body.toString());
    });

    res.on("error", function (error) {
        console.error(error);
    });
});

req.end();
import requests

login = <...>
password = <...>
saymon_hostname = <...>
url = "https://" + saymon_hostname + "/node/api/entities"

response = requests.request("GET", url, auth=(login, password))
print(response.text)

Response

[
    {
        "id": "659cdf43cec144058ea7f3d0",
        "parent_id": [
            1
        ],
        "name": "SAYMON (192.168.1.48)",
        ...
        "entityType": 1
    },
    {
        "id": "65e5b703a325401c444b455a",
        "source": "659cdf43cec144058ea7f3d0",
        "target": "65c4f993709cea0f92c98ba3",
        "state_id": 1,
        "client_data": "{\"headlinePropIds\":[]}",
        "tags": [],
        "operations": [],
        "owner_id": "659cdf384c1d350254225eca",
        "updated": 1709553411918,
        "target_name": "192.168.1.70",
        "source_name": "SAYMON (192.168.1.48)",
        "name": "SAYMON (192.168.1.48) - 192.168.1.70",
        ...
        "entityType": 2
    }
]