« Back to Product

Documentation

IPS_GetConfigurationsFromChildren

 array IPS_GetConfigurationsFromChildren (int $InstanceID) 

Parameters

InstanceID

ID of the instance

Returns

Object or associative array with the properties which the child instances specify for the instance. The key is the name of the property, the value is the required value. If no child instance specifies anything, the result is empty.

Description

Warning

This function is intended for internal use only and may change or be removed at any time without notice.

The function determines the configuration of all child instances of the instance with the ID InstanceID, i.e. all instances which are connected to it as parent instance, via IPS_GetConfigurationForParent and merges them into one object. The management console uses the result to lock the properties specified this way in the configuration form of the instance.

Warning

The function is intended to be called through the JSON-RPC interface, e.g. for the display in the console. It is not available in PHP scripts – there IPS_GetConfigurationForParent can be called for each child instance.

If several child instances specify the same property with different values, the function fails with "Child nodes provide different configurations". If a child instance does not return valid JSON or no JSON object, the function fails with "Invalid JSON for InstanceID ..." or "JSON is missing object for InstanceID ...". If the instance does not exist, the function fails with "Flow for Instance #... does not exist".

Example

// Determine the configuration which the child instances specify for instance 23456 (e.g. a Client Socket)
$rpc = new JSONRPC("http://user:password@127.0.0.1:3777/api/");
print_r($rpc->IPS_GetConfigurationsFromChildren(23456));

/* e.g. returns:
Array
(
    [Port] => 21000
)
*/
Any questions?