Project

General

Profile

Actions

Bug #7131

closed

The select parameter in the nodes API is not correctly documented

Added by Alexis Mousset about 9 years ago. Updated over 8 years ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
Name check:
Fix check:
Regression:

Description

The api doc for nodes says for the select parameter: "What kid of data we wnat to include. Here we can get policy servers/relay by setting 'nodeAndPolicyServer' Default value: node"

But the default seems to include policy servers anyway:

curl -k -X GET -H "Content-Type: application/json;charset=utf-8" --header "X-API-Token: xedZNGsc6rxWXnHMKDPD13OTuoYPBXUZ" --header "X-API-Version: latest" "https://127.0.0.1:8381/rudder/api/nodes" 
{
    "nodes": [
        {
            "architectureDescription": "x86_64-linux-thread-multi", 
            "hostname": "agent1.rudder.local", 
            "id": "7d74d611-8421-4b7d-9924-3dfeef01f915", 
            "ipAddresses": [
                "10.0.2.15", 
                "127.0.0.1", 
                "192.168.43.3" 
            ], 
            "lastInventoryDate": "2015-08-25 16:04", 
            "machine": {
                "id": "2aa672d7-7d11-e034-aa4b-efe22f1d4e18", 
                "manufacturer": "innotek GmbH", 
                "provider": "vbox", 
                "serialNumber": "0", 
                "type": "Virtual" 
            }, 
            "managementTechnology": [
                {
                    "name": "CFEngine Community" 
                }
            ], 
            "os": {
                "fullName": "CentOS Linux release 7.0.1406 (Core)", 
                "kernelVersion": "3.10.0-123.el7.x86_64", 
                "name": "Centos", 
                "type": "Linux", 
                "version": "7.0.1406" 
            }, 
            "policyServerId": "root", 
            "properties": [], 
            "ram": 238, 
            "status": "accepted" 
        }, 
        {
            "architectureDescription": "x86_64-linux-thread-multi", 
            "hostname": "server.rudder.local", 
            "id": "root", 
            "ipAddresses": [
                "10.0.2.15", 
                "127.0.0.1", 
                "192.168.43.2" 
            ], 
            "lastInventoryDate": "2015-08-19 12:55", 
            "machine": {
                "id": "63a9f0ea-7bb9-8050-796b-649e85481845", 
                "manufacturer": "innotek GmbH", 
                "provider": "vbox", 
                "serialNumber": "0", 
                "type": "Virtual" 
            }, 
            "managementTechnology": [
                {
                    "name": "CFEngine Community" 
                }
            ], 
            "os": {
                "fullName": "CentOS Linux release 7.0.1406 (Core)", 
                "kernelVersion": "3.10.0-123.el7.x86_64", 
                "name": "Centos", 
                "type": "Linux", 
                "version": "7.0.1406" 
            }, 
            "policyServerId": "root", 
            "properties": [
                {
                    "name": "env_type", 
                    "value": "deprovisioned" 
                }, 
                {
                    "name": "utf-8 poetry", 
                    "value": "testéÀ" 
                }
            ], 
            "ram": 1498, 
            "status": "accepted" 
        }
    ]
}
Actions

Also available in: Atom PDF