# CstDeviceManagementServiceWebApi.NodeApi

All URIs are relative to *https://devicemanagement.cstkit.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**addNode**](NodeApi.md#addNode) | **POST** /nodes | 
[**deleteNode**](NodeApi.md#deleteNode) | **DELETE** /nodes/{nodeID} | 
[**getNode**](NodeApi.md#getNode) | **GET** /nodes/{nodeID} | 
[**getNodes**](NodeApi.md#getNodes) | **GET** /nodes | 
[**updateNode**](NodeApi.md#updateNode) | **PUT** /nodes/{nodeID} | 


<a name="addNode"></a>
# **addNode**
> Node addNode(node)



Add a node.

### Example
```javascript
var CstDeviceManagementServiceWebApi = require('cst_device_management_service_web_api');
var defaultClient = CstDeviceManagementServiceWebApi.ApiClient.default;

// Configure OAuth2 access token for authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new CstDeviceManagementServiceWebApi.NodeApi();

var node = new CstDeviceManagementServiceWebApi.Node(); // Node | The node to create. All required, non-read-only fields must be present. 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addNode(node, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **node** | [**Node**](Node.md)| The node to create. All required, non-read-only fields must be present.  | 

### Return type

[**Node**](Node.md)

### Authorization

[AccessToken](../README.md#AccessToken)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="deleteNode"></a>
# **deleteNode**
> Node deleteNode(nodeID)



Delete a node.

### Example
```javascript
var CstDeviceManagementServiceWebApi = require('cst_device_management_service_web_api');
var defaultClient = CstDeviceManagementServiceWebApi.ApiClient.default;

// Configure OAuth2 access token for authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new CstDeviceManagementServiceWebApi.NodeApi();

var nodeID = "nodeID_example"; // String | The nodeID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteNode(nodeID, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nodeID** | **String**| The nodeID | 

### Return type

[**Node**](Node.md)

### Authorization

[AccessToken](../README.md#AccessToken)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getNode"></a>
# **getNode**
> Node getNode(nodeID)



Get a node.

### Example
```javascript
var CstDeviceManagementServiceWebApi = require('cst_device_management_service_web_api');
var defaultClient = CstDeviceManagementServiceWebApi.ApiClient.default;

// Configure OAuth2 access token for authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new CstDeviceManagementServiceWebApi.NodeApi();

var nodeID = "nodeID_example"; // String | The nodeID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getNode(nodeID, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nodeID** | **String**| The nodeID | 

### Return type

[**Node**](Node.md)

### Authorization

[AccessToken](../README.md#AccessToken)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="getNodes"></a>
# **getNodes**
> NodePage getNodes(nodeType, opts)



Get a list of nodes.

### Example
```javascript
var CstDeviceManagementServiceWebApi = require('cst_device_management_service_web_api');
var defaultClient = CstDeviceManagementServiceWebApi.ApiClient.default;

// Configure OAuth2 access token for authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new CstDeviceManagementServiceWebApi.NodeApi();

var nodeType = "nodeType_example"; // String | The node type to get. Must be one of 'authentication', 'secure_group', or 'related_domain'. 

var opts = { 
  'pagingToken': "pagingToken_example", // String | The paging token returned by the last page. If not included, the first page  will be returned. 
  'count': 789 // Integer | The number of items to retrieve. Default=100 Min=10 Max=1,000.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getNodes(nodeType, opts, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nodeType** | **String**| The node type to get. Must be one of &#39;authentication&#39;, &#39;secure_group&#39;, or &#39;related_domain&#39;.  | 
 **pagingToken** | **String**| The paging token returned by the last page. If not included, the first page  will be returned.  | [optional] 
 **count** | **Integer**| The number of items to retrieve. Default&#x3D;100 Min&#x3D;10 Max&#x3D;1,000. | [optional] 

### Return type

[**NodePage**](NodePage.md)

### Authorization

[AccessToken](../README.md#AccessToken)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

<a name="updateNode"></a>
# **updateNode**
> Node updateNode(nodeID, node)



Update a node.

### Example
```javascript
var CstDeviceManagementServiceWebApi = require('cst_device_management_service_web_api');
var defaultClient = CstDeviceManagementServiceWebApi.ApiClient.default;

// Configure OAuth2 access token for authorization: AccessToken
var AccessToken = defaultClient.authentications['AccessToken'];
AccessToken.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new CstDeviceManagementServiceWebApi.NodeApi();

var nodeID = "nodeID_example"; // String | The nodeID

var node = new CstDeviceManagementServiceWebApi.Node(); // Node | The node object. Valid values will replace -- not augment -- the values  previously associated with this node. Ommited fields will be treated as null or empty  values. Read-only fields will be ignored if included. 


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateNode(nodeID, node, callback);
```

### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **nodeID** | **String**| The nodeID | 
 **node** | [**Node**](Node.md)| The node object. Valid values will replace -- not augment -- the values  previously associated with this node. Ommited fields will be treated as null or empty  values. Read-only fields will be ignored if included.  | 

### Return type

[**Node**](Node.md)

### Authorization

[AccessToken](../README.md#AccessToken)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json

