v2

latestOpenAPI 3.1.0CC-BY-SA 2.02026-07-2617789528.6 KB
Nodes

Create one or several new nodes

Use the provided array of node information to create new nodes

put/nodes

Request body

idstring required

The Rudder node unique identifier in /opt/rudder/etc/uuid.hive

hostnamestring required

The fully qualified name of the node

status'accepted' | 'pending' required

Target status of the node

policyServerIdstring

The policy server ID for that node. By default, "root"

machineType'physical' | 'vm' | 'hyperv' | 'qemu' | 'vbox' | 'vmware' | 'xen'

The kind of machine for the node (use vm for a generic VM)

state'enabled' | 'ignored' | 'empty-policies' | 'initializing' | 'preparing-eol'

Node lifecycle state. Can only be specified when status=accepted. If not specified, enable is used

policyMode'enforce' | 'audit'

The policy mode for the node. Can only be specified when status=accepted. If not specified, the default (global) mode will be used

ipAddressesstring[] required

an array of IPs.

Example request

[
  {
    "id": "378740d3-c4a9-4474-8485-478e7e52db52",
    "hostname": "my.node.hostname.local",
    "os": {
      "version": "9.5",
      "fullName": "Debian GNU/Linux 9 (stretch)"
    },
    "policyServerId": "root",
    "machine": {
      "manufacturer": "corp inc.",
      "serialNumber": "ece12459-2b90-49c9-ab1e-72e38f797421"
    },
    "agentKey": {
      "value": "-----BEGIN CERTIFICATE-----\nMIIFqDCC[...]3tALNn\n-----END CERTIFICATE-----"
    },
    "properties": [
      {
        "name": "datacenter",
        "value": "AMS2"
      }
    ],
    "ipAddresses": [
      "192.168.180.90"
    ],
    "timezone": {
      "name": "CEST",
      "offset": "+0200"
    }
  }
]

Response

Creation information

result'success' | 'error' required

Result of the request

action'createNode' required

The id of the action

Example response

{
  "data": {
    "created": [
      "378740d3-c4a9-4474-8485-478e7e52db52"
    ]
  }
}