Node

The node model represents an individual node in a DSE cluster.

Managing Nodes URL

Get a node object by ID

Get a list of nodes

Create a node

Update a node

Delete a node

Managing Nodes

Node

{
    "id": <value>,
    "name": <value>,
    "datacenter-id": <value>,
    "ssh-management-address": <value>,
    "ssh-management-port": <value>,
    "listen-address": <value>,
    "native-transport-address": <value>,
    "broadcast-address": <value>,
    "native-transport-broadcast-address": <value>,
    "config-profile-id": <value>,
    "machine-credential-id": <value>,
    "initial-token": <value>,
    "facts": {"<key>": <value>},
    "seed": <value>,
    "auto-bootstrap": <value>,
    "rack": <value>,
    "job-status": <value>,
    "last-job-id": <value>,
    "comment": <value>
}
Property Description of Values

name

A name for the node.

datacenter-id

The ID of the lifecyclemanager-datacenter to which this node belongs.

ssh-management-address

The IP address of the node for access over SSH. Must be reachable from the OpsCenter server. This field is required, and in very simple network setups may be the only address field required.

ssh-management-port

SSH port on the managed node. Defaults to the value inherited from the lifecyclemanager-datacenter.

listen-address

Goes directly into the listen_address property in cassandra.yaml. Defaults to the ssh-management-address.

native-transport-address

Goes directly into the native_transport_address property (or rpc_address in DSE versions previous to 6.0.0) in cassandra.yaml. Defaults to the ssh-rpc-address.

broadcast-address

Goes directly into the broadcast_address property in cassandra.yaml. Defaults to the listen-address.

native-transport-broadcast-address

Goes directly into the native_transport_broadcast_address property (or broadcast_rpc_address in DSE versions previous to 6.0.0) in cassandra.yaml. Defaults to the native-transport-address.

config-profile-id

The ID of the lifecyclemanager-configuration-profile to use for this node. If set, can override values set in the lifecyclemanager-datacenter profile.

machine-credential-id

The ID of the lifecyclemanager-machine-credential to use for this node. Defaults to the value inherited from the lifecyclemanager-datacenter. You would only use this if you have nodes with different credentials.

initial-token

In non-vnode clusters, this specifies the initial_token value in cassandra.yaml. If not set, LCM auto-calculates initial-tokens at the beginning of the install job.

facts

When a job runs on a node, the first thing it does is post back relevant facts about the target node, which may include the contents of pre-existing config files (like cassandra.yaml). This is used heavily in cluster import jobs.

seed

When set to true, forces this node to be a seed. When set to false, prevents it from being a seed. If left unset, this node is made available for auto-selection. You can leave this unset on all nodes to enable LCM to pick seeds for you.

auto-bootstrap

Similar to seed, can be set explicitly to populate the auto_bootstrap field in cassandra.yaml. If left unset, LCM tries to set it automatically based on the state of the cluster (if the datacenter was previously converged by LCM, it sets it to true).

rack

The rack name for this node.

job-status

The most recent job status for this node. Read-only.

last-job-id

Read-only field indicating the last job run on this node. See Jobs.

comment

A generic field for user comments.

GET /api/v2/lcm/nodes/{id}

Gets a specific node record by ID.

Path arguments: id: A node ID.

Returns a node object.

Example:

 curl http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4

Output:

{
    "auto-bootstrap": null,
    "broadcast-address": null,
    "native-transport-broadcast-address": null,
    "comment": null,
    "config-profile-id": null,
    "created-by": "system",
    "created-on": "2016-06-21T19:07:26.477Z",
    "datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
    "facts": {},
    "href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
    "id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
    "initial-token": null,
    "job-status": null,
    "last-job-id": null,
    "listen-address": null,
    "machine-credential-id": null,
    "modified-by": "system",
    "modified-on": "2016-06-21T19:07:26.477Z",
    "name": "test-node",
    "rack": "rack1",
    "related-resources": {
        "datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
    },
    "native-transport-address": null,
    "seed": null,
    "ssh-management-address": "10.10.10.100",
    "ssh-management-port": null,
    "type": "node"
}

GET /api/v2/lcm/nodes/

Gets a paginated list of all node records. See Paginated Results for an overview of the query string parameters that can be used.

Example:

 curl http://localhost:8888/api/v2/lcm/nodes/

Output:

{
    "count": 4,
    "current": 1,
    "last": 1,
    "next": null,
    "per-page": 50,
    "previous": null,
    "results": [
        {
            "broadcast-address": null,
            "native-transport-broadcast-address": null,
            "config-profile-id": null,
            "created-on": "2016-06-21T19:07:26.477Z",
            "datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
            "href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
            "id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
            "job-status": null,
            "last-job-id": null,
            "listen-address": null,
            "modified-on": "2016-06-21T19:07:26.477Z",
            "name": "test-node",
            "rack": "rack1",
            "related-resources": {
                "datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
            },
            "native-transport-address": null,
            "seed": null,
            "ssh-management-address": "10.10.10.100",
            "ssh-management-port": null,
            "type": "node"
        }
    ],
}

POST /api/v2/lcm/nodes/

Creates a new node record.

Body: A node object (with no ID property).

Returns the newly created node object.

Example:

 curl -X POST \
      -d '{"name": "test-node",
           "datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
           "ssh-management-address": "10.10.10.100"}' \
      http://localhost:8888/api/v2/lcm/nodes/

Output:

    {
        "auto-bootstrap": null,
        "broadcast-address": null,
        "native-transport-broadcast-address": null,
        "comment": null,
        "config-profile-id": null,
        "created-by": "system",
        "created-on": "2016-06-21T19:07:26.477Z",
        "datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
        "facts": {},
        "href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
        "id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
        "initial-token": null,
        "job-status": null,
        "last-job-id": null,
        "listen-address": null,
        "machine-credential-id": null,
        "modified-by": "system",
        "modified-on": "2016-06-21T19:07:26.477Z",
        "name": "test-node",
        "rack": "rack1",
        "related-resources": {
            "datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
        },
        "native-transport-address": null,
        "seed": null,
        "ssh-management-address": "10.10.10.100",
        "ssh-management-port": null,
        "type": "node"
    }

PUT /api/v2/lcm/nodes/{id}

Updates an existing node record by ID.

Path arguments: id: A node ID.

Returns the updated node object.

Example:

 curl -X PUT -d '{"comment": "A new comment."}' http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4

Output:

    {
        "auto-bootstrap": null,
        "broadcast-address": null,
        "native-transport-broadcast-address": null,
        "comment": "A new comment.",
        "config-profile-id": null,
        "created-by": "system",
        "created-on": "2016-06-21T19:07:26.477Z",
        "datacenter-id": "ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a",
        "facts": {},
        "href": "http://localhost:8888/api/v2/lcm/nodes/1166a7cd-f57b-4453-9592-4582764fd1e4",
        "id": "1166a7cd-f57b-4453-9592-4582764fd1e4",
        "initial-token": null,
        "job-status": null,
        "last-job-id": null,
        "listen-address": null,
        "machine-credential-id": null,
        "modified-by": "system",
        "modified-on": "2016-06-21T19:28:11.092Z",
        "name": "test-node",
        "rack": "rack1",
        "related-resources": {
            "datacenter": "http://localhost:8888/api/v2/lcm/datacenters/ea6dbbdf-6ca7-483c-93b1-aff3f6029d5a"
        },
        "native-transport-address": null,
        "seed": null,
        "ssh-management-address": "10.10.10.100",
        "ssh-management-port": null,
        "type": "node"
    }

DELETE /api/v2/lcm/nodes/{id}

Deletes an existing node record by ID. This is subject to foreign key constraint violations.

Path arguments: id: A node ID.

Returns the IDs of the deleted objects.

Example:

 curl -X DELETE http://localhost:8888/api/v2/lcm/nodes/400758df-c723-4709-8327-99283b451969

Output:

 {"deleted": {"node": ["1166a7cd-f57b-4453-9592-4582764fd1e4"]}}

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com