Project

General

Profile

Actions

Bug #25203

closed

The pending nodes API now returns array of arrays of nodes instead of an array of nodes

Added by Félix DALLIDET 4 months ago. Updated 2 months ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Effort required:
Small
Priority:
0
Name check:
To do
Fix check:
To do
Regression:
Yes

Description

See the output:

# ~ curl -k -X POST -H "X-API-Token: *******" -H "Content-Type: application/x-www-form-urlencoded" -d 'status=accepted' 'https://******/rudder/api/latest/nodes/pending/2e139b8f-72c8-49b8-9a35-2c2baffeb47e' | jq ''
{
  "action": "ChangePendingNodeStatus",
  "id": "2e139b8f-72c8-49b8-9a35-2c2baffeb47e",
  "result": "success",
  "data": {
    "nodes": [
      [
        {
          "id": "2e139b8f-72c8-49b8-9a35-2c2baffeb47e",
          "status": "accepted",
          "hostname": "DeployDirectiveAgent1.rudder.local",
          "osName": "Ubuntu",
          "osVersion": "22.04",
          "machineType": "Virtual" 
        }
      ]
    ]
  }
}

A similar calll (troncated from the first level keys of the response) in 8.1 will return something like this:

{
  "nodes": [
    {
      "id": "9df180c9-0cea-4ccc-ba3b-b1931e433e3c",
      "status": "accepted",
      "hostname": "DeployDirectiveAgent1.rudder.local",
      "osName": "Debian",
      "osVersion": "[11]",
      "machineType": "Virtual" 
    }
  ]
}


Related issues 1 (1 open0 closed)

Related to Rudder - Bug #25285: API documentation for pending nodes is missing an endpoint and fieldsPending releaseElaad FURREEDANActions
Actions

Also available in: Atom PDF