Bug #27300
openrudder-server-8.3.2: API "rudder/api/latest/nodes/{id}" dosn't return properties[]
Description
I'm evaluating "node-inventory-received-pending" hook to auto-accept new nodes.
The example "auto-accept-nodes.example" shows the trick on how to query global parameter through the node properties.
But the query (at least, to the root node) returns empty properties set:
# curl -X GET -H @/var/rudder/run/api-token-header -H "Content-Type: application/json" "http://localhost:8080/rudder/api/latest/nodes/root?include=minimal,properties" | jq . { "action": "nodeDetails", "id": "root", "result": "success", "data": { "nodes": [ { "id": "root", "hostname": "rudder83.tld", "status": "accepted", "properties": [] } ] } }
While 3 properties are set for the "root" node, as it's seen in the web interface:

- Also, API "/rudder/api/latest/parameters" returns 3 global parameters.
Files
Updated by François ARMAND 2 days ago
Hello,
There is a difference between the node "own" properties, ie the properties defined on it, and the node "inherited" (or "resolved") properties, which are the properties including both node own ones, and the other inherited from global or group properties, or pending nodes which don't have yet inherited properties (since they are not really in groups/etc).
The API and the node inventory returns only node "own" properties, because it's what is really used in group target resolution or when you want to define/update a node property (what is often what is needed in API).
You have a special dedicated API for the whole, inherited list of properties (ie what you get in the UI): https://docs.rudder.io/api/v/21/#tag/Nodes/operation/nodeInheritedProperties
So for your use case:
- if root node don't have some dedicated properties, the API result is OK
- you won't be able to use global/group properties to auto accept nodes
But nodes can bring their own "inventory" properties, ie things (json) defined on the agent and uploaded along with other inventory data. These ones end up in node own properties, and so they are available for auto-accept scenario of pending nodes.
For more info on that, see: https://docs.rudder.io/reference/8.3/usage/advanced_node_management.html#extend-nodes-inventory
I think it's what the demo hook use, but perhaps things could be clearer.