Get Object Children Properties

Returns all Info properties of the specified object and all of its nested children.

This method doesn’t return properties from links and references, as well as properties with any type_id other than 1.

Request

HTTP Request

GET /node/api/objects/:objectId/children/props

Permissions

User has to have access to the object with the ID specified in the request (objectId). User will also need permissions to access each child. This request will not return properties of children, the user doesn’t have access to.

objectPermissions

Path parameters

Parameter Type Description

id

String
required

The ID of the parent object.

Body parameters

Request body is empty.

Response

The response contains a list of all properties found in children of the specified object.

Each record in the returned list contains the following fields:

Field Description

entityId

Object ID

entityName

Object Name

name

Property Name

id

Property ID. Not guaranteed to be unique

Example

Request

  • Bash

  • JavaScript

  • NodeJS

  • Python

login=<...>
password=<...>
saymon_hostname=<...>
object_id=<...>
url=https://$saymon_hostname/node/api/objects/$object_id/children/props

curl -X GET $url -u $login:$password
let login = <...>
let password = <...>
let saymonHostname = <...>
let objectId = <...>
let path = "/node/api/objects/" + objectId + "/children/props";
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 objectId = <...>
let path = "/node/api/objects/" + objectId + "/children/props";
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 = <...>
object_id = <...>
url = "https://" + saymon_hostname + "/node/api/objects/" + object_id + "/children/props"

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

Response

[
    {
      "entityId": "632afd331cfdb9e6cf070fe5",
      "entityName": "Host",
      "name": "address",
      "id": "65cb861e2373011f7354dd83"
    },
    {
      "entityId": "651407b2e7db0f481699d72f",
      "entityName": "Child Object",
      "name": "customProperty",
      "id": "651c337e837a634532e3bd52"
    }
    ...
]