Project

General

Profile

Actions

Bug #22017

closed

Error ir create node API example in docs

Added by Alexis TARUSSIO about 2 years ago. Updated almost 2 years ago.

Status:
Released
Priority:
N/A
Category:
API
Target version:
Severity:
Minor - inconvenience | misleading | easy workaround
UX impact:
User visibility:
Operational - other Techniques | Rudder settings | Plugins
Effort required:
Priority:
0
Name check:
To do
Fix check:
Checked
Regression:
No

Description

Hello,

it's me again :)

I try to create a nodes from the API endpoint and I meet a little error with the requests samples :

https://docs.rudder.io/api/v/16/#tag/Nodes/operation/createNodes

[
  {
    "id": "378740d3-c4a9-4474-8485-478e7e52db52",
    "hostname": "my.node.hostname.local",
    "status": "accepted",
    "os": {
      "type": "linux",
      "name": "debian",
      "version": 9.5,
      "fullName": "Debian GNU/Linux 9 (stretch)",
      "servicePack": "string" 
    },
    "policyServerId": "root",
    "machineType": "vmware",
    "state": "enable",
...

If you use this you'll end up with :


    "action": "createNodes",
    "result": "error",
    "errorDetails": {
        "created": [],
        "failed": [
            {
                "378740d3-c4a9-4474-8485-478e7e52db52": [
                    "[validation] Node 'state' must be one of 'empty-policies, enabled, ignored, initializing, preparing-eol' but 'enable' provided" 
                ]
            }
        ]
    }

Can you edit to change the payload example + the documentation ?

Best Regards,

Alexis TARUSSIO

Actions #1

Updated by Alexis TARUSSIO about 2 years ago

  • Subject changed from [API] Request Sample false to [API] Request Sample / documentation false
Actions #2

Updated by Elaad FURREEDAN about 2 years ago

  • Target version changed from 7.2.2 to 7.1.8
Actions #3

Updated by Elaad FURREEDAN about 2 years ago

  • Status changed from New to In progress
  • Assignee set to Elaad FURREEDAN
Actions #4

Updated by Elaad FURREEDAN about 2 years ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Elaad FURREEDAN to Alexis Mousset
  • Pull Request set to https://github.com/Normation/rudder/pull/4551
Actions #5

Updated by Anonymous about 2 years ago

  • Status changed from Pending technical review to Pending release
Actions #6

Updated by Alexis Mousset about 2 years ago

  • Subject changed from [API] Request Sample / documentation false to Error ir create node API example in docs
  • Fix check changed from To do to Checked
Actions #7

Updated by Vincent MEMBRÉ almost 2 years ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 7.1.8 and 7.2.2 which were released today.

Actions

Also available in: Atom PDF