Genian NAC REST API

Admins

changeAdminPassword

Reset a specific user's password

Resets the password of the administrator specified. The body is form data (<code>application/x-www-form-urlencoded</code>): <code>oldPw</code> (current password) and <code>newPw</code> are required.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}/password?apiKey={Key}" -H "Content-Type: application/x-www-form-urlencoded" -d 'oldPw={Current Password}&amp;newPw={New Password}'</pre>Returns HTTP 200 with an empty body.<br/>Errors: 400 when a field is empty, <code>oldPw</code> is wrong, or the new password breaks the password policy. Do not set <code>isEncrytion=false</code>: the value is then stored as given.


/admins/{adminId}/password

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/admins/{adminId}/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Username (ADM_ID)
        String oldPw = oldPw_example; // String | Old password
        String newPw = newPw_example; // String | New password
        Boolean isEncrytion = true; // Boolean | Password encryption
        try {
            apiInstance.changeAdminPassword(adminId, oldPw, newPw, isEncrytion);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#changeAdminPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Username (ADM_ID)
        String oldPw = oldPw_example; // String | Old password
        String newPw = newPw_example; // String | New password
        Boolean isEncrytion = true; // Boolean | Password encryption
        try {
            apiInstance.changeAdminPassword(adminId, oldPw, newPw, isEncrytion);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#changeAdminPassword");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Username (ADM_ID)
String *oldPw = oldPw_example; // Old password
String *newPw = newPw_example; // New password
Boolean *isEncrytion = true; // Password encryption (optional)

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Reset a specific user's password
[apiInstance changeAdminPasswordWith:adminId
    oldPw:oldPw
    newPw:newPw
    isEncrytion:isEncrytion
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Username (ADM_ID)

var oldPw = oldPw_example; // {String} Old password

var newPw = newPw_example; // {String} New password

var opts = { 
  'isEncrytion': true // {Boolean} Password encryption
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.changeAdminPassword(adminId, oldPw, newPw, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class changeAdminPasswordExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Username (ADM_ID)
            var oldPw = oldPw_example;  // String | Old password
            var newPw = newPw_example;  // String | New password
            var isEncrytion = true;  // Boolean | Password encryption (optional) 

            try
            {
                // Reset a specific user's password
                apiInstance.changeAdminPassword(adminId, oldPw, newPw, isEncrytion);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.changeAdminPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Username (ADM_ID)
$oldPw = oldPw_example; // String | Old password
$newPw = newPw_example; // String | New password
$isEncrytion = true; // Boolean | Password encryption

try {
    $api_instance->changeAdminPassword($adminId, $oldPw, $newPw, $isEncrytion);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->changeAdminPassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Username (ADM_ID)
my $oldPw = oldPw_example; # String | Old password
my $newPw = newPw_example; # String | New password
my $isEncrytion = true; # Boolean | Password encryption

eval { 
    $api_instance->changeAdminPassword(adminId => $adminId, oldPw => $oldPw, newPw => $newPw, isEncrytion => $isEncrytion);
};
if ($@) {
    warn "Exception when calling AdminsApi->changeAdminPassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Username (ADM_ID)
oldPw = oldPw_example # String | Old password
newPw = newPw_example # String | New password
isEncrytion = true # Boolean | Password encryption (optional)

try: 
    # Reset a specific user's password
    api_instance.change_admin_password(adminId, oldPw, newPw, isEncrytion=isEncrytion)
except ApiException as e:
    print("Exception when calling AdminsApi->changeAdminPassword: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Username (ADM_ID)
Required
Form parameters
Name Description
oldPw*
String
Old password
Required
newPw*
String
New password
Required
isEncrytion
Boolean
Password encryption

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createAdmin

Create an administrator

Creates an administrator from an existing user. <code>adminId</code> must be a user ID that already exists (see GET /users); otherwise the API returns 400. The body is an AdminVo (keys as in GET /admins/{adminId}).<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/admins/{User ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"adm_roleid":"{Role ID}","adm_status":0,"adm_mobileauth":0,"adm_comment":"..."}'</pre>Returns HTTP 200 with an empty body. Check the result with GET /admins/{adminId}.<br/>Errors: 400 when the user does not exist or the body is missing; 500 when the insert or the follow-up admin event fails (for example, the user is already an administrator).


/admins/{adminId}

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/admins/{adminId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = user01; // String | Admin Username (ADM_ID)
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.createAdmin(adminId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#createAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = user01; // String | Admin Username (ADM_ID)
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.createAdmin(adminId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#createAdmin");
            e.printStackTrace();
        }
    }
}
String *adminId = user01; // Admin Username (ADM_ID)
AdminVo *body = ; // AdminVo JSON Data

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Create an administrator
[apiInstance createAdminWith:adminId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = user01; // {String} Admin Username (ADM_ID)

var body = ; // {AdminVo} AdminVo JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createAdmin(adminId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createAdminExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = user01;  // String | Admin Username (ADM_ID)
            var body = new AdminVo(); // AdminVo | AdminVo JSON Data

            try
            {
                // Create an administrator
                apiInstance.createAdmin(adminId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.createAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = user01; // String | Admin Username (ADM_ID)
$body = ; // AdminVo | AdminVo JSON Data

try {
    $api_instance->createAdmin($adminId, $body);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->createAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = user01; # String | Admin Username (ADM_ID)
my $body = WWW::SwaggerClient::Object::AdminVo->new(); # AdminVo | AdminVo JSON Data

eval { 
    $api_instance->createAdmin(adminId => $adminId, body => $body);
};
if ($@) {
    warn "Exception when calling AdminsApi->createAdmin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = user01 # String | Admin Username (ADM_ID)
body =  # AdminVo | AdminVo JSON Data

try: 
    # Create an administrator
    api_instance.create_admin(adminId, body)
except ApiException as e:
    print("Exception when calling AdminsApi->createAdmin: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Admin Username (ADM_ID)
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteAdmin

Delete a specific admin

Deletes the administrator specified. The administrator record, its management scope, dashboards and view settings are removed; the user account itself stays.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}?apiKey={Key}"</pre>Returns HTTP 200 with an empty body. Access tokens of the administrator are removed.<br/>Errors: 400 when the administrator does not exist; 500 when the delete fails.


/admins/{adminId}

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/admins/{adminId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Username (ADM_ID)
        try {
            apiInstance.deleteAdmin(adminId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#deleteAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Username (ADM_ID)
        try {
            apiInstance.deleteAdmin(adminId);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#deleteAdmin");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Username (ADM_ID)

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Delete a specific admin
[apiInstance deleteAdminWith:adminId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Username (ADM_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteAdmin(adminId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteAdminExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Username (ADM_ID)

            try
            {
                // Delete a specific admin
                apiInstance.deleteAdmin(adminId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.deleteAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Username (ADM_ID)

try {
    $api_instance->deleteAdmin($adminId);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->deleteAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Username (ADM_ID)

eval { 
    $api_instance->deleteAdmin(adminId => $adminId);
};
if ($@) {
    warn "Exception when calling AdminsApi->deleteAdmin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Username (ADM_ID)

try: 
    # Delete a specific admin
    api_instance.delete_admin(adminId)
except ApiException as e:
    print("Exception when calling AdminsApi->deleteAdmin: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Username (ADM_ID)
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getAdmin

Retrieve a specific administrator's information

Retrieves the information of the administrator specified. <code>adminId</code> is the administrator's user ID (ADM_ID). Secret values (<code>adm_apikey</code>, <code>adm_secretkey</code>) are not returned; <code>adm_hasapikey</code> shows whether an API key exists.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}?apiKey={Key}"</pre>Response<pre>{"adm_id":"admin01","adm_roleid":"superAdmin","adm_status":0,"adm_type":1,"adm_mobileauth":1,"adm_locale":"ko","adm_hasapikey":1,"adm_limitation":0,"adm_created":1717726735000, "adminRestrictionVo":{"nodeManagementScope":{"limit":false,...},...}}</pre><code>adminRestrictionVo</code> is the same object as GET /admins/{adminId}/restriction. An unknown <code>adminId</code> returns 404 <code>{"code":404,"message":"Not Found"}</code>.


/admins/{adminId}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/admins/{adminId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        try {
            AdmDetailDoc result = apiInstance.getAdmin(adminId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        try {
            AdmDetailDoc result = apiInstance.getAdmin(adminId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdmin");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Admin Username (ADM_ID)

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Retrieve a specific administrator's information
[apiInstance getAdminWith:adminId
              completionHandler: ^(AdmDetailDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Admin Username (ADM_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAdmin(adminId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAdminExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Admin Username (ADM_ID)

            try
            {
                // Retrieve a specific administrator's information
                AdmDetailDoc result = apiInstance.getAdmin(adminId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.getAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Admin Username (ADM_ID)

try {
    $result = $api_instance->getAdmin($adminId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->getAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Admin Username (ADM_ID)

eval { 
    my $result = $api_instance->getAdmin(adminId => $adminId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->getAdmin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Admin Username (ADM_ID)

try: 
    # Retrieve a specific administrator's information
    api_response = api_instance.get_admin(adminId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->getAdmin: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Admin Username (ADM_ID)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getAdminRestriction

Retrieve a restriction of management scope

Retrieves the restriction of management scope for the nodes and users of the administrator specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}/restriction?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":null, "data":{"nodeManagementScope":{"limit":false,"limitType":1,"limitList":[],"secondarySensorList":[],"nodeTypeList":[],"includeSensor":false}, "nodeManagementCommand":{"limit":false,"ignorePerm":false,"commandList":[]}, "userManagementScope":{"limit":false,"departmentList":[]}, "auditLogSearchScope":{"limit":false,"logFilterId":null},"fileExport":{"limit":false},...}}</pre><code>data</code> also has <code>nodeManagementView</code>, <code>nodeDetailView</code>, <code>userManagementCommand</code>, <code>dashboardWidget</code> and <code>webUISiteMap</code>. The HTTP status is always 200; an unknown administrator returns <code>{"code":400,"message":"...","data":null}</code>.


/admins/{adminId}/restriction

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/admins/{adminId}/restriction"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        try {
            AdmRestrictionMessageDoc result = apiInstance.getAdminRestriction(adminId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdminRestriction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        try {
            AdmRestrictionMessageDoc result = apiInstance.getAdminRestriction(adminId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#getAdminRestriction");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Admin Username (ADM_ID)

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Retrieve a restriction of management scope
[apiInstance getAdminRestrictionWith:adminId
              completionHandler: ^(AdmRestrictionMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Admin Username (ADM_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAdminRestriction(adminId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAdminRestrictionExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Admin Username (ADM_ID)

            try
            {
                // Retrieve a restriction of management scope
                AdmRestrictionMessageDoc result = apiInstance.getAdminRestriction(adminId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.getAdminRestriction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Admin Username (ADM_ID)

try {
    $result = $api_instance->getAdminRestriction($adminId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->getAdminRestriction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Admin Username (ADM_ID)

eval { 
    my $result = $api_instance->getAdminRestriction(adminId => $adminId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->getAdminRestriction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Admin Username (ADM_ID)

try: 
    # Retrieve a restriction of management scope
    api_response = api_instance.get_admin_restriction(adminId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->getAdminRestriction: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Admin Username (ADM_ID)
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Forbidden

Status: 500 - Internal Server Error


updateAdmin

Update an existing administrator

Updates an existing administrator. The body is an AdminVo with the same keys as GET /admins/{adminId}; <code>adminId</code> in the path overrides <code>adm_id</code> in the body.<br/>The update writes all columns, so fields left out are saved as empty. Get the current object first and send it back with your changes. <code>adm_apikey</code> is not changed by this API. If <code>adminRestrictionVo</code> is sent, it must contain all ten sections.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"adm_roleid":"{Role ID}","adm_status":0,"adm_mobileauth":0,"adm_locale":"en","adm_comment":"..."}'</pre>Returns HTTP 200 with an empty body. Access tokens of the administrator are removed, and other administrators are logged out when their record changes.<br/>Errors: 403 when you change your own <code>adm_roleid</code>; 400 without a body; 500 when saving fails.


/admins/{adminId}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/admins/{adminId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.updateAdmin(adminId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.updateAdmin(adminId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdmin");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Admin Username (ADM_ID)
AdminVo *body = ; // AdminVo JSON Data

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Update an existing administrator
[apiInstance updateAdminWith:adminId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Admin Username (ADM_ID)

var body = ; // {AdminVo} AdminVo JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateAdmin(adminId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateAdminExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Admin Username (ADM_ID)
            var body = new AdminVo(); // AdminVo | AdminVo JSON Data

            try
            {
                // Update an existing administrator
                apiInstance.updateAdmin(adminId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.updateAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Admin Username (ADM_ID)
$body = ; // AdminVo | AdminVo JSON Data

try {
    $api_instance->updateAdmin($adminId, $body);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->updateAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Admin Username (ADM_ID)
my $body = WWW::SwaggerClient::Object::AdminVo->new(); # AdminVo | AdminVo JSON Data

eval { 
    $api_instance->updateAdmin(adminId => $adminId, body => $body);
};
if ($@) {
    warn "Exception when calling AdminsApi->updateAdmin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Admin Username (ADM_ID)
body =  # AdminVo | AdminVo JSON Data

try: 
    # Update an existing administrator
    api_instance.update_admin(adminId, body)
except ApiException as e:
    print("Exception when calling AdminsApi->updateAdmin: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Admin Username (ADM_ID)
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateAdminRestriction

Setting restriction of management scope

Sets the restriction of management scope of the administrator specified. The body is the <code>data</code> object of GET /admins/{adminId}/restriction and must contain all ten sections.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/admins/{Admin ID}/restriction?apiKey={Key}" -H "Content-Type: application/json" -d '{"nodeManagementScope":{"limit":false,"limitType":1,"limitList":[],"secondarySensorList":[],"nodeTypeList":[],"includeSensor":false},"nodeManagementCommand":{"limit":false,"ignorePerm":false,"commandList":[]},"nodeManagementView":{"limit":false,"viewList":[]},"nodeDetailView":{"limit":false,"tabList":[]},"userManagementScope":{"limit":false,"departmentList":[]},"userManagementCommand":{"limit":false,"commandList":[]},"auditLogSearchScope":{"limit":false,"logFilterId":null},"fileExport":{"limit":false},"dashboardWidget":{"limit":false,"widgetList":[]},"webUISiteMap":{"limit":false,"siteMapList":[]}}'</pre>Response<pre>{"code":200,"message":"","parameter":{"adminId":"{Admin ID}","restriction":{...}},"data":null}</pre>The HTTP status is always 200. Check <code>code</code>: 400 for a missing body or unknown administrator, 500 when saving fails (also when a section is missing).


/admins/{adminId}/restriction

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/admins/{adminId}/restriction"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        AdminRestrictionVo body = ; // AdminRestrictionVo | AdminRestrictionVo JSON Data
        try {
            AdmRestrictionUpdateMessageDoc result = apiInstance.updateAdminRestriction(adminId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdminRestriction");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        String adminId = admin01; // String | Admin Username (ADM_ID)
        AdminRestrictionVo body = ; // AdminRestrictionVo | AdminRestrictionVo JSON Data
        try {
            AdmRestrictionUpdateMessageDoc result = apiInstance.updateAdminRestriction(adminId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateAdminRestriction");
            e.printStackTrace();
        }
    }
}
String *adminId = admin01; // Admin Username (ADM_ID)
AdminRestrictionVo *body = ; // AdminRestrictionVo JSON Data

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Setting restriction of management scope
[apiInstance updateAdminRestrictionWith:adminId
    body:body
              completionHandler: ^(AdmRestrictionUpdateMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var adminId = admin01; // {String} Admin Username (ADM_ID)

var body = ; // {AdminRestrictionVo} AdminRestrictionVo JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateAdminRestriction(adminId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateAdminRestrictionExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var adminId = admin01;  // String | Admin Username (ADM_ID)
            var body = new AdminRestrictionVo(); // AdminRestrictionVo | AdminRestrictionVo JSON Data

            try
            {
                // Setting restriction of management scope
                AdmRestrictionUpdateMessageDoc result = apiInstance.updateAdminRestriction(adminId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.updateAdminRestriction: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$adminId = admin01; // String | Admin Username (ADM_ID)
$body = ; // AdminRestrictionVo | AdminRestrictionVo JSON Data

try {
    $result = $api_instance->updateAdminRestriction($adminId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->updateAdminRestriction: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $adminId = admin01; # String | Admin Username (ADM_ID)
my $body = WWW::SwaggerClient::Object::AdminRestrictionVo->new(); # AdminRestrictionVo | AdminRestrictionVo JSON Data

eval { 
    my $result = $api_instance->updateAdminRestriction(adminId => $adminId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling AdminsApi->updateAdminRestriction: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
adminId = admin01 # String | Admin Username (ADM_ID)
body =  # AdminRestrictionVo | AdminRestrictionVo JSON Data

try: 
    # Setting restriction of management scope
    api_response = api_instance.update_admin_restriction(adminId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AdminsApi->updateAdminRestriction: %s\n" % e)

Parameters

Path parameters
Name Description
adminId*
String
Admin Username (ADM_ID)
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 500 - Internal Server Error


updateMyinfoOfAdmin

Edit my information

Modifies the information of the administrator who calls the API. Only <code>adm_mobileauth</code>, <code>adm_email</code>, <code>adm_mobile</code>, <code>adm_countrycode</code>, <code>adm_locale</code> and <code>adm_timezone</code> are applied; fields you leave out keep their stored values. <code>adm_id</code> and <code>adm_roleid</code> must match the caller.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/admins/myinfo?apiKey={Key}" -H "Content-Type: application/json" -d '{"adm_id":"{Admin ID}","adm_roleid":"{Role ID}","adm_locale":"en","adm_timezone":"Asia/Seoul"}'</pre>Returns HTTP 200 with an empty body, also when nothing changed.<br/>Errors: 400 for another <code>adm_id</code>, an invalid e-mail, mobile, country code, locale or timezone, or a 2-step method (<code>adm_mobileauth</code>) without its recipient or SMS/mail service; 403 when <code>adm_roleid</code> differs, or when e-mail/mobile is changed outside your own login session (for example with apiKey); 404 when the administrator is missing.


/admins/myinfo

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/admins/myinfo"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.AdminsApi;

import java.io.File;
import java.util.*;

public class AdminsApiExample {

    public static void main(String[] args) {
        
        AdminsApi apiInstance = new AdminsApi();
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.updateMyinfoOfAdmin(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateMyinfoOfAdmin");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.AdminsApi;

public class AdminsApiExample {

    public static void main(String[] args) {
        AdminsApi apiInstance = new AdminsApi();
        AdminVo body = ; // AdminVo | AdminVo JSON Data
        try {
            apiInstance.updateMyinfoOfAdmin(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling AdminsApi#updateMyinfoOfAdmin");
            e.printStackTrace();
        }
    }
}
AdminVo *body = ; // AdminVo JSON Data

AdminsApi *apiInstance = [[AdminsApi alloc] init];

// Edit my information
[apiInstance updateMyinfoOfAdminWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.AdminsApi()

var body = ; // {AdminVo} AdminVo JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateMyinfoOfAdmin(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMyinfoOfAdminExample
    {
        public void main()
        {
            
            var apiInstance = new AdminsApi();
            var body = new AdminVo(); // AdminVo | AdminVo JSON Data

            try
            {
                // Edit my information
                apiInstance.updateMyinfoOfAdmin(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling AdminsApi.updateMyinfoOfAdmin: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\AdminsApi();
$body = ; // AdminVo | AdminVo JSON Data

try {
    $api_instance->updateMyinfoOfAdmin($body);
} catch (Exception $e) {
    echo 'Exception when calling AdminsApi->updateMyinfoOfAdmin: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::AdminsApi;

my $api_instance = WWW::SwaggerClient::AdminsApi->new();
my $body = WWW::SwaggerClient::Object::AdminVo->new(); # AdminVo | AdminVo JSON Data

eval { 
    $api_instance->updateMyinfoOfAdmin(body => $body);
};
if ($@) {
    warn "Exception when calling AdminsApi->updateMyinfoOfAdmin: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.AdminsApi()
body =  # AdminVo | AdminVo JSON Data

try: 
    # Edit my information
    api_instance.update_myinfo_of_admin(body)
except ApiException as e:
    print("Exception when calling AdminsApi->updateMyinfoOfAdmin: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - Not Found

Status: 500 - Internal Server Error


Applications

createIpApplications

Add a new IP Request

Adds new IP Requests. The body is a list. Required fields depend on <code>appType</code>:<br/>&bull; 1 (new): <code>id</code> (user ID of the IP user) and <code>purposeCode</code> (see <code>GET /applications/ips/purposes</code>). When <code>id</code> is an existing user, the name and department are filled from the user. <code>applicantId</code> defaults to the caller.<br/>&bull; 2 (return), 4 (device change), 6 (user change): <code>ipStr</code> of an IP that has a user.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/applications/ips?apiKey={Key}" -H "Content-Type: application/json" -d '[{"appType":1,"id":"user01","purposeCode":"USERIP_STATIC","ipStr":"192.168.1.2","mac":"00:11:22:33:44:55","reason":"New PC"}]'</pre>Response<pre>{"ipApps":[{"idx":14,"appType":1,"id":"user01","purposeCode":"USERIP_STATIC",...}]}</pre>All requests are saved only when every item is valid; auto-approval rules may apply. Otherwise nothing is saved and the API returns 406 with the same <code>ipApps</code> list; check <code>validObjectForInsert</code> and <code>unValidObjectForInsertReason</code> of each item. For <code>appType</code> 2, 4 and 6, a missing <code>ipStr</code> or an IP without a user fails with 500 instead of 406.


/applications/ips

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/applications/ips"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        array[IpAppVo] body = ; // array[IpAppVo] | IP Request
        try {
            AppIpCreateResultDoc result = apiInstance.createIpApplications(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#createIpApplications");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        array[IpAppVo] body = ; // array[IpAppVo] | IP Request
        try {
            AppIpCreateResultDoc result = apiInstance.createIpApplications(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#createIpApplications");
            e.printStackTrace();
        }
    }
}
array[IpAppVo] *body = ; // IP Request

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Add a new IP Request
[apiInstance createIpApplicationsWith:body
              completionHandler: ^(AppIpCreateResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var body = ; // {array[IpAppVo]} IP Request


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createIpApplications(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createIpApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var body = new array[IpAppVo](); // array[IpAppVo] | IP Request

            try
            {
                // Add a new IP Request
                AppIpCreateResultDoc result = apiInstance.createIpApplications(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.createIpApplications: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$body = ; // array[IpAppVo] | IP Request

try {
    $result = $api_instance->createIpApplications($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->createIpApplications: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $body = [WWW::SwaggerClient::Object::array[IpAppVo]->new()]; # array[IpAppVo] | IP Request

eval { 
    my $result = $api_instance->createIpApplications(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->createIpApplications: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
body =  # array[IpAppVo] | IP Request

try: 
    # Add a new IP Request
    api_response = api_instance.create_ip_applications(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->createIpApplications: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request. Invalid input data or missing required parameters.

Status: 401 - Unauthorized. Authentication required or invalid credentials.

Status: 406 - Not Acceptable. The server cannot produce a response matching the list of acceptable values defined in the request's proactive negotiation headers.

Status: 500 - Internal Server Error. An unexpected error occurred on the server.


getCountOfIps

Retrieve the number of IP Requests

Retrieves the number of IP Requests waiting for approval (new and return requests in the ready state).<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/ips/count?apiKey={Key}"</pre>Response<pre>{"count":3}</pre>Other request types and states are not counted. Use <code>GET /applications/ips?confirmStatus=ready</code> to list them.


/applications/ips/count

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/ips/count"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            CountDoc result = apiInstance.getCountOfIps();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfIps");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            CountDoc result = apiInstance.getCountOfIps();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfIps");
            e.printStackTrace();
        }
    }
}

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve the number of IP Requests
[apiInstance getCountOfIpsWithCompletionHandler: 
              ^(CountDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountOfIps(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountOfIpsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();

            try
            {
                // Retrieve the number of IP Requests
                CountDoc result = apiInstance.getCountOfIps();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getCountOfIps: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();

try {
    $result = $api_instance->getCountOfIps();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getCountOfIps: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();

eval { 
    my $result = $api_instance->getCountOfIps();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getCountOfIps: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()

try: 
    # Retrieve the number of IP Requests
    api_response = api_instance.get_count_of_ips()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getCountOfIps: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getCountOfMediaApplications

Rertrieve the number of the External Device Requests

Retrieves the number of External Device Requests. <code>application=true</code> counts the requests waiting for approval; <code>false</code> or omitted counts the processed requests.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/medias/count?apiKey={Key}&amp;application=true"</pre>Response<pre>{"count":0}</pre>A limited administrator counts only the requests in the assigned scope.


/applications/medias/count

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/medias/count?application="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Boolean application = true; // Boolean | Approval status (true: Submitted, false: Approved)
        try {
            CountDoc result = apiInstance.getCountOfMediaApplications(application);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfMediaApplications");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Boolean application = true; // Boolean | Approval status (true: Submitted, false: Approved)
        try {
            CountDoc result = apiInstance.getCountOfMediaApplications(application);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfMediaApplications");
            e.printStackTrace();
        }
    }
}
Boolean *application = true; // Approval status (true: Submitted, false: Approved)

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Rertrieve the number of the External Device Requests
[apiInstance getCountOfMediaApplicationsWith:application
              completionHandler: ^(CountDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var application = true; // {Boolean} Approval status (true: Submitted, false: Approved)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountOfMediaApplications(application, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountOfMediaApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var application = true;  // Boolean | Approval status (true: Submitted, false: Approved)

            try
            {
                // Rertrieve the number of the External Device Requests
                CountDoc result = apiInstance.getCountOfMediaApplications(application);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getCountOfMediaApplications: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$application = true; // Boolean | Approval status (true: Submitted, false: Approved)

try {
    $result = $api_instance->getCountOfMediaApplications($application);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getCountOfMediaApplications: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $application = true; # Boolean | Approval status (true: Submitted, false: Approved)

eval { 
    my $result = $api_instance->getCountOfMediaApplications(application => $application);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getCountOfMediaApplications: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
application = true # Boolean | Approval status (true: Submitted, false: Approved)

try: 
    # Rertrieve the number of the External Device Requests
    api_response = api_instance.get_count_of_media_applications(application)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getCountOfMediaApplications: %s\n" % e)

Parameters

Query parameters
Name Description
application*
Boolean
Approval status (true: Submitted, false: Approved)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getCountOfUserApplications

Retrieve the number of User Account Requests

Retrieves the number of new User Account Requests waiting for approval.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/users/count?apiKey={Key}"</pre>Response<pre>{"count":0}</pre>Approved and rejected requests are not counted.


/applications/users/count

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/users/count"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            CountDoc result = apiInstance.getCountOfUserApplications();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfUserApplications");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            CountDoc result = apiInstance.getCountOfUserApplications();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getCountOfUserApplications");
            e.printStackTrace();
        }
    }
}

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve the number of User Account Requests
[apiInstance getCountOfUserApplicationsWithCompletionHandler: 
              ^(CountDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountOfUserApplications(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountOfUserApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();

            try
            {
                // Retrieve the number of User Account Requests
                CountDoc result = apiInstance.getCountOfUserApplications();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getCountOfUserApplications: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();

try {
    $result = $api_instance->getCountOfUserApplications();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getCountOfUserApplications: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();

eval { 
    my $result = $api_instance->getCountOfUserApplications();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getCountOfUserApplications: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()

try: 
    # Retrieve the number of User Account Requests
    api_response = api_instance.get_count_of_user_applications()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getCountOfUserApplications: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getIpAppPurposeList

Retrieve purpose list for IP Application

Retrieves the purposes that can be used for IP Requests.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/ips/purposes?apiKey={Key}"</pre>Response<pre>[{"label":"Static IP","value":"USERIP_STATIC","disabled":false},{"label":"Dynamic IP","value":"USERIP_VARIABLE","disabled":false}]</pre>Use <code>value</code> as <code>purposeCode</code> in <code>POST /applications/ips</code> and as the path of <code>GET /applications/ips/sensors/{purpose}</code>. <code>label</code> is in the system language. Returns 404 when no purpose is set.


/applications/ips/purposes

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/ips/purposes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            array[AppSelectItemDoc] result = apiInstance.getIpAppPurposeList();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getIpAppPurposeList");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        try {
            array[AppSelectItemDoc] result = apiInstance.getIpAppPurposeList();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getIpAppPurposeList");
            e.printStackTrace();
        }
    }
}

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve purpose list for IP Application
[apiInstance getIpAppPurposeListWithCompletionHandler: 
              ^(array[AppSelectItemDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getIpAppPurposeList(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIpAppPurposeListExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();

            try
            {
                // Retrieve purpose list for IP Application
                array[AppSelectItemDoc] result = apiInstance.getIpAppPurposeList();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getIpAppPurposeList: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();

try {
    $result = $api_instance->getIpAppPurposeList();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getIpAppPurposeList: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();

eval { 
    my $result = $api_instance->getIpAppPurposeList();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getIpAppPurposeList: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()

try: 
    # Retrieve purpose list for IP Application
    api_response = api_instance.get_ip_app_purpose_list()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getIpAppPurposeList: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getIpApplication

Retrieve a specific IP Request's information

Retrieves the information of the IP Request specified. A limited administrator gets 404 for requests outside the assigned scope.<br/>The request number is read from the <code>idx</code> query parameter, not from the path. The path value is ignored, so send the same number in both places.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/ips/{Request No}?apiKey={Key}&amp;idx={Request No}"</pre>Response<pre>{"idx":2,"appType":1,"confirmStatus":3,"purposeCode":"USERIP_STATIC","ipStr":"192.168.1.2","assignedIpStr":"192.168.1.2","createDate":1754029592000,...}</pre>Without the <code>idx</code> query parameter, the API returns 404. <code>appPasswd</code> is always null.


/applications/ips/{idx}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/ips/{idx}?idx="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer idx = 2; // Integer | IP Request number. Send the same number as in the path
        try {
            AppIpRowDoc result = apiInstance.getIpApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getIpApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer idx = 2; // Integer | IP Request number. Send the same number as in the path
        try {
            AppIpRowDoc result = apiInstance.getIpApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getIpApplication");
            e.printStackTrace();
        }
    }
}
Integer *idx = 2; // IP Request number. Send the same number as in the path

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve a specific IP Request's information
[apiInstance getIpApplicationWith:idx
              completionHandler: ^(AppIpRowDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var idx = 2; // {Integer} IP Request number. Send the same number as in the path


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getIpApplication(idx, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIpApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var idx = 2;  // Integer | IP Request number. Send the same number as in the path

            try
            {
                // Retrieve a specific IP Request's information
                AppIpRowDoc result = apiInstance.getIpApplication(idx);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getIpApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$idx = 2; // Integer | IP Request number. Send the same number as in the path

try {
    $result = $api_instance->getIpApplication($idx);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getIpApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $idx = 2; # Integer | IP Request number. Send the same number as in the path

eval { 
    my $result = $api_instance->getIpApplication(idx => $idx);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getIpApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
idx = 2 # Integer | IP Request number. Send the same number as in the path

try: 
    # Retrieve a specific IP Request's information
    api_response = api_instance.get_ip_application(idx)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getIpApplication: %s\n" % e)

Parameters

Query parameters
Name Description
idx*
Integer (int32)
IP Request number. Send the same number as in the path
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getIpApplications

Retrieve a specific IP Request's information

Retrieves a list of the IP Requests. A limited administrator sees only the requests in the assigned scope.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/ips?apiKey={Key}&amp;page=1&amp;pageSize=30&amp;confirmStatus=ready"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row is an IP Request with camelCase fields such as <code>idx</code>, <code>appType</code>, <code>confirmStatus</code>, <code>applicantId</code>, <code>id</code>, <code>purposeCode</code>, <code>ipStr</code>, <code>mac</code> and <code>createDate</code> (epoch ms). <code>appPasswd</code> is always null.<br/>&bull; <code>confirmStatus</code>: <code>ready</code>, <code>progress</code>, <code>confirm</code>, <code>reject</code> or <code>complete</code> (confirm and reject).<br/>&bull; <code>appType</code>: <code>new</code>, <code>return</code>, <code>newreturn</code>, <code>devchange</code> or <code>userchange</code>.<br/>Use these names, not numbers; <code>confirmStatus=0</code> returns no rows. When nothing matches, the API returns 200 with <code>"result":[]</code>.


/applications/ips

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/ips?page=&pageSize=&sort=&confirmStatus=&appType=&qsearch=&appTypeCode=&applicantUser=&applicantDept=&user=&userDept=&purpose=&os=&isGuestUser=&ip=&mac=&pcName=&confirmAppType=&dateRangeType=&fromDate=&toDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"createDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String confirmStatus = ready; // String | Hierarchical Approval status (ready, complete, confirm, reject, progress)
        String appType = new; // String | Request Type (newreturn, new, return, devchange, userchange)
        String qsearch = user01; // String | Search string
        String appTypeCode = 1; // String | Request type code (1: new, 2: return, 4: device change, 6: user change)
        String applicantUser = user01; // String | Requester
        String applicantDept = Sales; // String | Requester department (applicantDept)
        String user = user01; // String | User
        String userDept = Sales; // String | User department (userDept)
        String purpose = USERIP_STATIC; // String | Purpose
        String os = Windows; // String | OS
        Boolean isGuestUser = false; // Boolean | Guest enabled
        String ip = 192.168.1.2; // String | IP
        String mac = 00:11:22:33:44:55; // String | MAC
        String pcName = PC-01; // String | Hostname
        String confirmAppType = prevapp; // String | Approval Type (prevapp: Submitted, nextapp: Approved)
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppIpPageDoc result = apiInstance.getIpApplications(page, pageSize, sort, confirmStatus, appType, qsearch, appTypeCode, applicantUser, applicantDept, user, userDept, purpose, os, isGuestUser, ip, mac, pcName, confirmAppType, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getIpApplications"); e.printStackTrace(); } } }
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"createDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String confirmStatus = ready; // String | Hierarchical Approval status (ready, complete, confirm, reject, progress)
        String appType = new; // String | Request Type (newreturn, new, return, devchange, userchange)
        String qsearch = user01; // String | Search string
        String appTypeCode = 1; // String | Request type code (1: new, 2: return, 4: device change, 6: user change)
        String applicantUser = user01; // String | Requester
        String applicantDept = Sales; // String | Requester department (applicantDept)
        String user = user01; // String | User
        String userDept = Sales; // String | User department (userDept)
        String purpose = USERIP_STATIC; // String | Purpose
        String os = Windows; // String | OS
        Boolean isGuestUser = false; // Boolean | Guest enabled
        String ip = 192.168.1.2; // String | IP
        String mac = 00:11:22:33:44:55; // String | MAC
        String pcName = PC-01; // String | Hostname
        String confirmAppType = prevapp; // String | Approval Type (prevapp: Submitted, nextapp: Approved)
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppIpPageDoc result = apiInstance.getIpApplications(page, pageSize, sort, confirmStatus, appType, qsearch, appTypeCode, applicantUser, applicantDept, user, userDept, purpose, os, isGuestUser, ip, mac, pcName, confirmAppType, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getIpApplications"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"createDate","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *confirmStatus = ready; // Hierarchical Approval status (ready, complete, confirm, reject, progress) (optional)
String *appType = new; // Request Type (newreturn, new, return, devchange, userchange) (optional)
String *qsearch = user01; // Search string (optional)
String *appTypeCode = 1; // Request type code (1: new, 2: return, 4: device change, 6: user change) (optional)
String *applicantUser = user01; // Requester (optional)
String *applicantDept = Sales; // Requester department (applicantDept) (optional)
String *user = user01; // User (optional)
String *userDept = Sales; // User department (userDept) (optional)
String *purpose = USERIP_STATIC; // Purpose (optional)
String *os = Windows; // OS (optional)
Boolean *isGuestUser = false; // Guest enabled (optional)
String *ip = 192.168.1.2; // IP (optional)
String *mac = 00:11:22:33:44:55; // MAC (optional)
String *pcName = PC-01; // Hostname (optional)
String *confirmAppType = prevapp; // Approval Type (prevapp: Submitted, nextapp: Approved) (optional)
String *dateRangeType = createDate; // Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) (optional) String *fromDate = 2026-11-01; // Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) String *toDate = 2026-11-10 10:00:00; // End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init]; // Retrieve a specific IP Request's information [apiInstance getIpApplicationsWith:page pageSize:pageSize sort:sort confirmStatus:confirmStatus appType:appType qsearch:qsearch appTypeCode:appTypeCode applicantUser:applicantUser applicantDept:applicantDept user:user userDept:userDept purpose:purpose os:os isGuestUser:isGuestUser ip:ip mac:mac pcName:pcName confirmAppType:confirmAppType dateRangeType:dateRangeType fromDate:fromDate toDate:toDate completionHandler: ^(AppIpPageDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"createDate","dir":"desc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'confirmStatus': ready, // {String} Hierarchical Approval status (ready, complete, confirm, reject, progress)
  'appType': new, // {String} Request Type (newreturn, new, return, devchange, userchange)
  'qsearch': user01, // {String} Search string
  'appTypeCode': 1, // {String} Request type code (1: new, 2: return, 4: device change, 6: user change)
  'applicantUser': user01, // {String} Requester
  'applicantDept': Sales, // {String} Requester department (applicantDept)
  'user': user01, // {String} User
  'userDept': Sales, // {String} User department (userDept)
  'purpose': USERIP_STATIC, // {String} Purpose
  'os': Windows, // {String} OS
  'isGuestUser': false, // {Boolean} Guest enabled
  'ip': 192.168.1.2, // {String} IP
  'mac': 00:11:22:33:44:55, // {String} MAC
  'pcName': PC-01, // {String} Hostname
  'confirmAppType': prevapp, // {String} Approval Type (prevapp: Submitted, nextapp: Approved)
  'dateRangeType': createDate, // {String} Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) 'fromDate': 2026-11-01, // {String} Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) 'toDate': 2026-11-10 10:00:00 // {String} End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getIpApplications(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIpApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"createDate","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var confirmStatus = ready;  // String | Hierarchical Approval status (ready, complete, confirm, reject, progress) (optional) 
            var appType = new;  // String | Request Type (newreturn, new, return, devchange, userchange) (optional) 
            var qsearch = user01;  // String | Search string (optional) 
            var appTypeCode = 1;  // String | Request type code (1: new, 2: return, 4: device change, 6: user change) (optional) 
            var applicantUser = user01;  // String | Requester (optional) 
            var applicantDept = Sales;  // String | Requester department (applicantDept) (optional) 
            var user = user01;  // String | User (optional) 
            var userDept = Sales;  // String | User department (userDept) (optional) 
            var purpose = USERIP_STATIC;  // String | Purpose (optional) 
            var os = Windows;  // String | OS (optional) 
            var isGuestUser = false;  // Boolean | Guest enabled (optional) 
            var ip = 192.168.1.2;  // String | IP (optional) 
            var mac = 00:11:22:33:44:55;  // String | MAC (optional) 
            var pcName = PC-01;  // String | Hostname (optional) 
            var confirmAppType = prevapp;  // String | Approval Type (prevapp: Submitted, nextapp: Approved) (optional) 
            var dateRangeType = createDate;  // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) (optional) var fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) var toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try { // Retrieve a specific IP Request's information AppIpPageDoc result = apiInstance.getIpApplications(page, pageSize, sort, confirmStatus, appType, qsearch, appTypeCode, applicantUser, applicantDept, user, userDept, purpose, os, isGuestUser, ip, mac, pcName, confirmAppType, dateRangeType, fromDate, toDate); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling ApplicationsApi.getIpApplications: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"createDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$confirmStatus = ready; // String | Hierarchical Approval status (ready, complete, confirm, reject, progress)
$appType = new; // String | Request Type (newreturn, new, return, devchange, userchange)
$qsearch = user01; // String | Search string
$appTypeCode = 1; // String | Request type code (1: new, 2: return, 4: device change, 6: user change)
$applicantUser = user01; // String | Requester
$applicantDept = Sales; // String | Requester department (applicantDept)
$user = user01; // String | User
$userDept = Sales; // String | User department (userDept)
$purpose = USERIP_STATIC; // String | Purpose
$os = Windows; // String | OS
$isGuestUser = false; // Boolean | Guest enabled
$ip = 192.168.1.2; // String | IP
$mac = 00:11:22:33:44:55; // String | MAC
$pcName = PC-01; // String | Hostname
$confirmAppType = prevapp; // String | Approval Type (prevapp: Submitted, nextapp: Approved)
$dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) $fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) $toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { $result = $api_instance->getIpApplications($page, $pageSize, $sort, $confirmStatus, $appType, $qsearch, $appTypeCode, $applicantUser, $applicantDept, $user, $userDept, $purpose, $os, $isGuestUser, $ip, $mac, $pcName, $confirmAppType, $dateRangeType, $fromDate, $toDate); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicationsApi->getIpApplications: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"createDate","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $confirmStatus = ready; # String | Hierarchical Approval status (ready, complete, confirm, reject, progress)
my $appType = new; # String | Request Type (newreturn, new, return, devchange, userchange)
my $qsearch = user01; # String | Search string
my $appTypeCode = 1; # String | Request type code (1: new, 2: return, 4: device change, 6: user change)
my $applicantUser = user01; # String | Requester
my $applicantDept = Sales; # String | Requester department (applicantDept)
my $user = user01; # String | User
my $userDept = Sales; # String | User department (userDept)
my $purpose = USERIP_STATIC; # String | Purpose
my $os = Windows; # String | OS
my $isGuestUser = false; # Boolean | Guest enabled
my $ip = 192.168.1.2; # String | IP
my $mac = 00:11:22:33:44:55; # String | MAC
my $pcName = PC-01; # String | Hostname
my $confirmAppType = prevapp; # String | Approval Type (prevapp: Submitted, nextapp: Approved)
my $dateRangeType = createDate; # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) my $fromDate = 2026-11-01; # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) my $toDate = 2026-11-10 10:00:00; # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) eval { my $result = $api_instance->getIpApplications(page => $page, pageSize => $pageSize, sort => $sort, confirmStatus => $confirmStatus, appType => $appType, qsearch => $qsearch, appTypeCode => $appTypeCode, applicantUser => $applicantUser, applicantDept => $applicantDept, user => $user, userDept => $userDept, purpose => $purpose, os => $os, isGuestUser => $isGuestUser, ip => $ip, mac => $mac, pcName => $pcName, confirmAppType => $confirmAppType, dateRangeType => $dateRangeType, fromDate => $fromDate, toDate => $toDate); print Dumper($result); }; if ($@) { warn "Exception when calling ApplicationsApi->getIpApplications: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"createDate","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
confirmStatus = ready # String | Hierarchical Approval status (ready, complete, confirm, reject, progress) (optional)
appType = new # String | Request Type (newreturn, new, return, devchange, userchange) (optional)
qsearch = user01 # String | Search string (optional)
appTypeCode = 1 # String | Request type code (1: new, 2: return, 4: device change, 6: user change) (optional)
applicantUser = user01 # String | Requester (optional)
applicantDept = Sales # String | Requester department (applicantDept) (optional)
user = user01 # String | User (optional)
userDept = Sales # String | User department (userDept) (optional)
purpose = USERIP_STATIC # String | Purpose (optional)
os = Windows # String | OS (optional)
isGuestUser = false # Boolean | Guest enabled (optional)
ip = 192.168.1.2 # String | IP (optional)
mac = 00:11:22:33:44:55 # String | MAC (optional)
pcName = PC-01 # String | Hostname (optional)
confirmAppType = prevapp # String | Approval Type (prevapp: Submitted, nextapp: Approved) (optional)
dateRangeType = createDate # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date) (optional) fromDate = 2026-11-01 # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) toDate = 2026-11-10 10:00:00 # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try: # Retrieve a specific IP Request's information api_response = api_instance.get_ip_applications(page, pageSize, sort=sort, confirmStatus=confirmStatus, appType=appType, qsearch=qsearch, appTypeCode=appTypeCode, applicantUser=applicantUser, applicantDept=applicantDept, user=user, userDept=userDept, purpose=purpose, os=os, isGuestUser=isGuestUser, ip=ip, mac=mac, pcName=pcName, confirmAppType=confirmAppType, dateRangeType=dateRangeType, fromDate=fromDate, toDate=toDate) pprint(api_response) except ApiException as e: print("Exception when calling ApplicationsApi->getIpApplications: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
confirmStatus
String
Hierarchical Approval status (ready, complete, confirm, reject, progress)
appType
String
Request Type (newreturn, new, return, devchange, userchange)
qsearch
String
Search string
appTypeCode
String
Request type code (1: new, 2: return, 4: device change, 6: user change)
applicantUser
String
Requester
applicantDept
String
Requester department (applicantDept)
user
String
User
userDept
String
User department (userDept)
purpose
String
Purpose
os
String
OS
isGuestUser
Boolean
Guest enabled
ip
String
IP
mac
String
MAC
pcName
String
Hostname
confirmAppType
String
Approval Type (prevapp: Submitted, nextapp: Approved)
dateRangeType
String
Period search Type. <b>Please enter the fromDate and toDate when searching for a period.</b><br /> (createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use, ipUseStartDate: Start date of use, ipUsePeriodDate: End date of use, expiredDate: Expiry date)
fromDate
String
Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)
toDate
String
End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getMediaApplication

Retrieve a specific External Device Request's information

Retrieves the information of the External Device Request specified, with the requested devices.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/medias/{Request No}?apiKey={Key}"</pre>Response<pre>{"ApplicationID":1,"UserID":"user01","State":0,"Period":7,"Scope":1,"Reason":"...","CreateDate":1778733376000,"useMediaList":[...]}</pre>Returns 404 when the request does not exist. A non-numeric request number returns 200 with an HTML error page instead of JSON.


/applications/medias/{idx}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/medias/{idx}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer idx = 1; // Integer | External Device Request idx
        try {
            AppMediaDoc result = apiInstance.getMediaApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getMediaApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer idx = 1; // Integer | External Device Request idx
        try {
            AppMediaDoc result = apiInstance.getMediaApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getMediaApplication");
            e.printStackTrace();
        }
    }
}
Integer *idx = 1; // External Device Request idx

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve a specific External Device Request's information
[apiInstance getMediaApplicationWith:idx
              completionHandler: ^(AppMediaDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var idx = 1; // {Integer} External Device Request idx


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMediaApplication(idx, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMediaApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var idx = 1;  // Integer | External Device Request idx

            try
            {
                // Retrieve a specific External Device Request's information
                AppMediaDoc result = apiInstance.getMediaApplication(idx);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getMediaApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$idx = 1; // Integer | External Device Request idx

try {
    $result = $api_instance->getMediaApplication($idx);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getMediaApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $idx = 1; # Integer | External Device Request idx

eval { 
    my $result = $api_instance->getMediaApplication(idx => $idx);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getMediaApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
idx = 1 # Integer | External Device Request idx

try: 
    # Retrieve a specific External Device Request's information
    api_response = api_instance.get_media_application(idx)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getMediaApplication: %s\n" % e)

Parameters

Path parameters
Name Description
idx*
Integer (int32)
External Device Request idx
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getMediaApplications

List External Device Requests

Retrieves a list of the External Device Requests. <code>application=true</code> lists the requests waiting for approval; <code>false</code> or omitted lists the processed requests.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/medias?apiKey={Key}&amp;page=1&amp;pageSize=30&amp;application=true"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row has <code>ApplicationID</code>, <code>UserID</code>, <code>UserName</code>, <code>Period</code>, <code>Scope</code>, <code>State</code>, <code>CreateDate</code>, <code>ExpireDate</code>, <code>IpStr</code> and <code>Reason</code>.<br/><code>qsearch</code> matches the department, user name, user ID, approver, IP and request number. When nothing matches, the API returns 200 with <code>"result":[]</code>.


/applications/medias

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/medias?page=&pageSize=&sort=&application=&qsearch=&dateRangeType=&fromDate=&toDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        Boolean application = true; // Boolean | Approval status (true: Submitted, false: Approved)
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = user01; // String | Search string
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppMediaPageDoc result = apiInstance.getMediaApplications(page, pageSize, application, sort, qsearch, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getMediaApplications"); e.printStackTrace(); } } }
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        Boolean application = true; // Boolean | Approval status (true: Submitted, false: Approved)
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = user01; // String | Search string
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppMediaPageDoc result = apiInstance.getMediaApplications(page, pageSize, application, sort, qsearch, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getMediaApplications"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
Boolean *application = true; // Approval status (true: Submitted, false: Approved)
String *sort = {"field":"CreateDate","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *qsearch = user01; // Search string (optional)
String *dateRangeType = createDate; // Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) (optional) String *fromDate = 2026-11-01; // Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) String *toDate = 2026-11-10 10:00:00; // End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init]; // List External Device Requests [apiInstance getMediaApplicationsWith:page pageSize:pageSize application:application sort:sort qsearch:qsearch dateRangeType:dateRangeType fromDate:fromDate toDate:toDate completionHandler: ^(AppMediaPageDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var application = true; // {Boolean} Approval status (true: Submitted, false: Approved)

var opts = { 
  'sort': {"field":"CreateDate","dir":"desc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'qsearch': user01, // {String} Search string
  'dateRangeType': createDate, // {String} Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) 'fromDate': 2026-11-01, // {String} Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) 'toDate': 2026-11-10 10:00:00 // {String} End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getMediaApplications(page, pageSize, application, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMediaApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var application = true;  // Boolean | Approval status (true: Submitted, false: Approved)
            var sort = {"field":"CreateDate","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var qsearch = user01;  // String | Search string (optional) 
            var dateRangeType = createDate;  // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) (optional) var fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) var toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try { // List External Device Requests AppMediaPageDoc result = apiInstance.getMediaApplications(page, pageSize, application, sort, qsearch, dateRangeType, fromDate, toDate); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling ApplicationsApi.getMediaApplications: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$application = true; // Boolean | Approval status (true: Submitted, false: Approved)
$sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$qsearch = user01; // String | Search string
$dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) $fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) $toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { $result = $api_instance->getMediaApplications($page, $pageSize, $application, $sort, $qsearch, $dateRangeType, $fromDate, $toDate); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicationsApi->getMediaApplications: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $application = true; # Boolean | Approval status (true: Submitted, false: Approved)
my $sort = {"field":"CreateDate","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $qsearch = user01; # String | Search string
my $dateRangeType = createDate; # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) my $fromDate = 2026-11-01; # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) my $toDate = 2026-11-10 10:00:00; # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) eval { my $result = $api_instance->getMediaApplications(page => $page, pageSize => $pageSize, application => $application, sort => $sort, qsearch => $qsearch, dateRangeType => $dateRangeType, fromDate => $fromDate, toDate => $toDate); print Dumper($result); }; if ($@) { warn "Exception when calling ApplicationsApi->getMediaApplications: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
application = true # Boolean | Approval status (true: Submitted, false: Approved)
sort = {"field":"CreateDate","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
qsearch = user01 # String | Search string (optional)
dateRangeType = createDate # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date) (optional) fromDate = 2026-11-01 # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) toDate = 2026-11-10 10:00:00 # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try: # List External Device Requests api_response = api_instance.get_media_applications(page, pageSize, application, sort=sort, qsearch=qsearch, dateRangeType=dateRangeType, fromDate=fromDate, toDate=toDate) pprint(api_response) except ApiException as e: print("Exception when calling ApplicationsApi->getMediaApplications: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
application*
Boolean
Approval status (true: Submitted, false: Approved)
Required
qsearch
String
Search string
dateRangeType
String
Period search Type. <b>Please enter the fromDate and toDate when searching for a period.</b><br /> (createDate: Registration date, confirmDate: Approval date, expiredDate: Expiry date. With both dates, expiredDate compares toDate with the approval date)
fromDate
String
Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)
toDate
String
End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getSensorsForPurpose

Retrieve sensor list for purpose

Retrieves the sensors that can be selected for the IP Request purpose specified. Use a <code>value</code> from <code>GET /applications/ips/purposes</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/ips/sensors/USERIP_STATIC?apiKey={Key}"</pre>Response<pre>[{"label":"&lt;Select&gt;","value":""},{"label":"S-192.168.1.1","value":"{Sensor Node ID}"}]</pre>The first item is an empty selection entry. <code>value</code> is the sensor node ID.<br/>&bull; 400 with no message: the purpose does not exist.<br/>&bull; 404: no sensor. The purpose code is case-sensitive here, so a code in different case returns 404.


/applications/ips/sensors/{purpose}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/ips/sensors/{purpose}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        String purpose = USERIP_STATIC; // String | Purpose code
        try {
            array[AppSelectItemDoc] result = apiInstance.getSensorsForPurpose(purpose);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getSensorsForPurpose");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        String purpose = USERIP_STATIC; // String | Purpose code
        try {
            array[AppSelectItemDoc] result = apiInstance.getSensorsForPurpose(purpose);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getSensorsForPurpose");
            e.printStackTrace();
        }
    }
}
String *purpose = USERIP_STATIC; // Purpose code

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve sensor list for purpose
[apiInstance getSensorsForPurposeWith:purpose
              completionHandler: ^(array[AppSelectItemDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var purpose = USERIP_STATIC; // {String} Purpose code


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSensorsForPurpose(purpose, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSensorsForPurposeExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var purpose = USERIP_STATIC;  // String | Purpose code

            try
            {
                // Retrieve sensor list for purpose
                array[AppSelectItemDoc] result = apiInstance.getSensorsForPurpose(purpose);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getSensorsForPurpose: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$purpose = USERIP_STATIC; // String | Purpose code

try {
    $result = $api_instance->getSensorsForPurpose($purpose);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getSensorsForPurpose: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $purpose = USERIP_STATIC; # String | Purpose code

eval { 
    my $result = $api_instance->getSensorsForPurpose(purpose => $purpose);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getSensorsForPurpose: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
purpose = USERIP_STATIC # String | Purpose code

try: 
    # Retrieve sensor list for purpose
    api_response = api_instance.get_sensors_for_purpose(purpose)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getSensorsForPurpose: %s\n" % e)

Parameters

Path parameters
Name Description
purpose*
String
Purpose code
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found


getUserApplication

Retrieve a specific User Account Request's information

Retrieves the information of the User Account Request specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/users/{Request No}?apiKey={Key}"</pre>Response<pre>{"Idx":2,"AppType":1,"ConfirmStatus":1,"ApplicantUserId":"user01","USER_ID":"user01","USER_NAME":"User 01","PurposeCode":"USER","CreateDate":1778733376000,...}</pre>Returns 404 when the request does not exist. A non-numeric request number returns 200 with an HTML error page instead of JSON.


/applications/users/{idx}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/users/{idx}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Long idx = 1; // Long | User Account Request idx
        try {
            AppUserRowDoc result = apiInstance.getUserApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getUserApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Long idx = 1; // Long | User Account Request idx
        try {
            AppUserRowDoc result = apiInstance.getUserApplication(idx);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#getUserApplication");
            e.printStackTrace();
        }
    }
}
Long *idx = 1; // User Account Request idx

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Retrieve a specific User Account Request's information
[apiInstance getUserApplicationWith:idx
              completionHandler: ^(AppUserRowDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var idx = 1; // {Long} User Account Request idx


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserApplication(idx, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var idx = 1;  // Long | User Account Request idx

            try
            {
                // Retrieve a specific User Account Request's information
                AppUserRowDoc result = apiInstance.getUserApplication(idx);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.getUserApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$idx = 1; // Long | User Account Request idx

try {
    $result = $api_instance->getUserApplication($idx);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->getUserApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $idx = 1; # Long | User Account Request idx

eval { 
    my $result = $api_instance->getUserApplication(idx => $idx);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->getUserApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
idx = 1 # Long | User Account Request idx

try: 
    # Retrieve a specific User Account Request's information
    api_response = api_instance.get_user_application(idx)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApplicationsApi->getUserApplication: %s\n" % e)

Parameters

Path parameters
Name Description
idx*
Long (int64)
User Account Request idx
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getUserApplications

List User Account Requests

Retrieves a list of the User Account Requests. A limited administrator sees only the requests in the assigned departments.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/applications/users?apiKey={Key}&amp;page=1&amp;pageSize=30&amp;confirmStatus=ready"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row has <code>Idx</code>, <code>AppType</code>, <code>ConfirmStatus</code>, <code>CreateDate</code>, <code>ConfirmDate</code> (epoch ms), <code>ApplicantUserId</code>, <code>PurposeCode</code> and the requested account in upper-case <code>USER_*</code> fields (<code>USER_ID</code>, <code>USER_NAME</code>, <code>USER_DEPT</code>, ...).<br/>&bull; <code>confirmStatus</code>: <code>ready</code>, <code>confirm</code>, <code>reject</code> or <code>complete</code> (confirm and reject).<br/>When nothing matches, the API returns 200 with <code>"result":[]</code>.


/applications/users

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/applications/users?page=&pageSize=&sort=&confirmStatus=&appType=&qsearch=&dateRangeType=&fromDate=&toDate="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String confirmStatus = ready; // String | Hierarchical Approval status
        String appType = new; // String | Request Type (new)
        String qsearch = user01; // String | Search string
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppUserPageDoc result = apiInstance.getUserApplications(page, pageSize, sort, confirmStatus, appType, qsearch, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getUserApplications"); e.printStackTrace(); } } }
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String confirmStatus = ready; // String | Hierarchical Approval status
        String appType = new; // String | Request Type (new)
        String qsearch = user01; // String | Search string
        String dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) String fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) String toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { AppUserPageDoc result = apiInstance.getUserApplications(page, pageSize, sort, confirmStatus, appType, qsearch, dateRangeType, fromDate, toDate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ApplicationsApi#getUserApplications"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"CreateDate","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *confirmStatus = ready; // Hierarchical Approval status (optional)
String *appType = new; // Request Type (new) (optional)
String *qsearch = user01; // Search string (optional)
String *dateRangeType = createDate; // Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) (optional) String *fromDate = 2026-11-01; // Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) String *toDate = 2026-11-10 10:00:00; // End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init]; // List User Account Requests [apiInstance getUserApplicationsWith:page pageSize:pageSize sort:sort confirmStatus:confirmStatus appType:appType qsearch:qsearch dateRangeType:dateRangeType fromDate:fromDate toDate:toDate completionHandler: ^(AppUserPageDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"CreateDate","dir":"desc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'confirmStatus': ready, // {String} Hierarchical Approval status
  'appType': new, // {String} Request Type (new)
  'qsearch': user01, // {String} Search string
  'dateRangeType': createDate, // {String} Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) 'fromDate': 2026-11-01, // {String} Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) 'toDate': 2026-11-10 10:00:00 // {String} End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getUserApplications(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserApplicationsExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"CreateDate","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var confirmStatus = ready;  // String | Hierarchical Approval status (optional) 
            var appType = new;  // String | Request Type (new) (optional) 
            var qsearch = user01;  // String | Search string (optional) 
            var dateRangeType = createDate;  // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) (optional) var fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) var toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try { // List User Account Requests AppUserPageDoc result = apiInstance.getUserApplications(page, pageSize, sort, confirmStatus, appType, qsearch, dateRangeType, fromDate, toDate); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling ApplicationsApi.getUserApplications: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$confirmStatus = ready; // String | Hierarchical Approval status
$appType = new; // String | Request Type (new)
$qsearch = user01; // String | Search string
$dateRangeType = createDate; // String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) $fromDate = 2026-11-01; // String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) $toDate = 2026-11-10 10:00:00; // String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) try { $result = $api_instance->getUserApplications($page, $pageSize, $sort, $confirmStatus, $appType, $qsearch, $dateRangeType, $fromDate, $toDate); print_r($result); } catch (Exception $e) { echo 'Exception when calling ApplicationsApi->getUserApplications: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"CreateDate","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $confirmStatus = ready; # String | Hierarchical Approval status
my $appType = new; # String | Request Type (new)
my $qsearch = user01; # String | Search string
my $dateRangeType = createDate; # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) my $fromDate = 2026-11-01; # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) my $toDate = 2026-11-10 10:00:00; # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) eval { my $result = $api_instance->getUserApplications(page => $page, pageSize => $pageSize, sort => $sort, confirmStatus => $confirmStatus, appType => $appType, qsearch => $qsearch, dateRangeType => $dateRangeType, fromDate => $fromDate, toDate => $toDate); print Dumper($result); }; if ($@) { warn "Exception when calling ApplicationsApi->getUserApplications: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"CreateDate","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
confirmStatus = ready # String | Hierarchical Approval status (optional)
appType = new # String | Request Type (new) (optional)
qsearch = user01 # String | Search string (optional)
dateRangeType = createDate # String | Period search Type. Please enter the fromDate and toDate when searching for a period.
(createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use) (optional) fromDate = 2026-11-01 # String | Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) toDate = 2026-11-10 10:00:00 # String | End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss) (optional) try: # List User Account Requests api_response = api_instance.get_user_applications(page, pageSize, sort=sort, confirmStatus=confirmStatus, appType=appType, qsearch=qsearch, dateRangeType=dateRangeType, fromDate=fromDate, toDate=toDate) pprint(api_response) except ApiException as e: print("Exception when calling ApplicationsApi->getUserApplications: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
confirmStatus
String
Hierarchical Approval status
appType
String
Request Type (new)
qsearch
String
Search string
dateRangeType
String
Period search Type. <b>Please enter the fromDate and toDate when searching for a period.</b><br /> (createDate: Registration date, confirmDate: Approval date, userPeriodDate: Period of use)
fromDate
String
Start Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)
toDate
String
End Date (Format: yyyy-MM-dd or yyyy-MM-dd HH:mm:ss)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


updateIpApplication

Update an existing IP Request

Approves or rejects the IP Request specified. Send <code>cmd</code> as a form field: <code>approve</code> or <code>reject</code>. Approving assigns the IP and applies the request in the same way as the console.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/applications/ips/{Request No}?apiKey={Key}" -d "cmd=approve"</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 404: the request does not exist.<br/>&bull; 500: the approval failed; <code>message</code> has the reasons.<br/>Any other <code>cmd</code> value returns 204 with no change.


/applications/ips/{idx}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/applications/ips/{idx}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        Long idx = 2; // Long | IP Request / Return idx
        String cmd = approve; // String | IP Request Approval (approve: Accept, reject: Reject)
        try {
            apiInstance.updateIpApplication(idx, cmd);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateIpApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        Long idx = 2; // Long | IP Request / Return idx
        String cmd = approve; // String | IP Request Approval (approve: Accept, reject: Reject)
        try {
            apiInstance.updateIpApplication(idx, cmd);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateIpApplication");
            e.printStackTrace();
        }
    }
}
Long *idx = 2; // IP Request / Return idx
String *cmd = approve; // IP Request Approval (approve: Accept, reject: Reject)

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Update an existing IP Request
[apiInstance updateIpApplicationWith:idx
    cmd:cmd
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var idx = 2; // {Long} IP Request / Return idx

var cmd = approve; // {String} IP Request Approval (approve: Accept, reject: Reject)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateIpApplication(idx, cmd, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateIpApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var idx = 2;  // Long | IP Request / Return idx
            var cmd = approve;  // String | IP Request Approval (approve: Accept, reject: Reject)

            try
            {
                // Update an existing IP Request
                apiInstance.updateIpApplication(idx, cmd);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.updateIpApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$idx = 2; // Long | IP Request / Return idx
$cmd = approve; // String | IP Request Approval (approve: Accept, reject: Reject)

try {
    $api_instance->updateIpApplication($idx, $cmd);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->updateIpApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $idx = 2; # Long | IP Request / Return idx
my $cmd = approve; # String | IP Request Approval (approve: Accept, reject: Reject)

eval { 
    $api_instance->updateIpApplication(idx => $idx, cmd => $cmd);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->updateIpApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
idx = 2 # Long | IP Request / Return idx
cmd = approve # String | IP Request Approval (approve: Accept, reject: Reject)

try: 
    # Update an existing IP Request
    api_instance.update_ip_application(idx, cmd)
except ApiException as e:
    print("Exception when calling ApplicationsApi->updateIpApplication: %s\n" % e)

Parameters

Path parameters
Name Description
idx*
Long (int64)
IP Request / Return idx
Required
Form parameters
Name Description
cmd*
String
IP Request Approval (approve: Accept, reject: Reject)
Enum: approve, reject
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not found

Status: 500 - Internal Server Error


updateMediaApplication

Update an existing External Device Request

Processes the External Device Request specified. Send form fields <code>cmd</code> (<code>approve</code>, <code>deny</code> or <code>expire</code>) and <code>reason</code>. <code>reason</code> is required for <code>deny</code> and <code>expire</code>. The result is sent to the Agent.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/applications/medias/{Request No}?apiKey={Key}" -d "cmd=deny&amp;reason=Not allowed"</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 404: unknown <code>cmd</code>, or <code>reason</code> missing for deny/expire.<br/>&bull; 500: update failed, including a request that does not exist.


/applications/medias/{idx}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/applications/medias/{idx}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        String cmd = deny; // String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
        Long idx = 1; // Long | External Device Request idx
        String reason = Not allowed; // String | Approval Comments (for deny, expire only)
        try {
            apiInstance.updateMediaApplication(cmd, idx, reason);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateMediaApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        String cmd = deny; // String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
        Long idx = 1; // Long | External Device Request idx
        String reason = Not allowed; // String | Approval Comments (for deny, expire only)
        try {
            apiInstance.updateMediaApplication(cmd, idx, reason);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateMediaApplication");
            e.printStackTrace();
        }
    }
}
String *cmd = deny; // Request Approval (approve: Accept, deny: Reject, expire: Disable)
Long *idx = 1; // External Device Request idx
String *reason = Not allowed; // Approval Comments (for deny, expire only) (optional)

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Update an existing External Device Request
[apiInstance updateMediaApplicationWith:cmd
    idx:idx
    reason:reason
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var cmd = deny; // {String} Request Approval (approve: Accept, deny: Reject, expire: Disable)

var idx = 1; // {Long} External Device Request idx

var opts = { 
  'reason': Not allowed // {String} Approval Comments (for deny, expire only)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateMediaApplication(cmd, idx, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMediaApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var cmd = deny;  // String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
            var idx = 1;  // Long | External Device Request idx
            var reason = Not allowed;  // String | Approval Comments (for deny, expire only) (optional) 

            try
            {
                // Update an existing External Device Request
                apiInstance.updateMediaApplication(cmd, idx, reason);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.updateMediaApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$cmd = deny; // String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
$idx = 1; // Long | External Device Request idx
$reason = Not allowed; // String | Approval Comments (for deny, expire only)

try {
    $api_instance->updateMediaApplication($cmd, $idx, $reason);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->updateMediaApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $cmd = deny; # String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
my $idx = 1; # Long | External Device Request idx
my $reason = Not allowed; # String | Approval Comments (for deny, expire only)

eval { 
    $api_instance->updateMediaApplication(cmd => $cmd, idx => $idx, reason => $reason);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->updateMediaApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
cmd = deny # String | Request Approval (approve: Accept, deny: Reject, expire: Disable)
idx = 1 # Long | External Device Request idx
reason = Not allowed # String | Approval Comments (for deny, expire only) (optional)

try: 
    # Update an existing External Device Request
    api_instance.update_media_application(cmd, idx, reason=reason)
except ApiException as e:
    print("Exception when calling ApplicationsApi->updateMediaApplication: %s\n" % e)

Parameters

Path parameters
Name Description
idx*
Long (int64)
External Device Request idx
Required
Form parameters
Name Description
cmd*
String
Request Approval (approve: Accept, deny: Reject, expire: Disable)
Enum: approve, deny, expire
Required
reason
String
Approval Comments (for deny, expire only)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Data Not Found

Status: 500 - Internal Server Error


updateUserApplication

Update an existing User Account Request

Approves or rejects the User Account Request specified. Send <code>cmd</code> as a form field: <code>approve</code> or <code>reject</code>. Approving creates the user account.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/applications/users/{Request No}?apiKey={Key}" -d "cmd=approve"</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 404: the request does not exist.<br/>&bull; 500 <code>Invalid UsePeriodDate</code>: the account period of the request has already ended.<br/>&bull; 500 with another message: approval failed.<br/>Any other <code>cmd</code> value returns 204 with no change.


/applications/users/{idx}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/applications/users/{idx}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApplicationsApi;

import java.io.File;
import java.util.*;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        
        ApplicationsApi apiInstance = new ApplicationsApi();
        String cmd = approve; // String | User Account Request Approval(approve: Accept, reject: Reject)
        Long idx = 1; // Long | User Account Request idx
        try {
            apiInstance.updateUserApplication(cmd, idx);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateUserApplication");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApplicationsApi;

public class ApplicationsApiExample {

    public static void main(String[] args) {
        ApplicationsApi apiInstance = new ApplicationsApi();
        String cmd = approve; // String | User Account Request Approval(approve: Accept, reject: Reject)
        Long idx = 1; // Long | User Account Request idx
        try {
            apiInstance.updateUserApplication(cmd, idx);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApplicationsApi#updateUserApplication");
            e.printStackTrace();
        }
    }
}
String *cmd = approve; // User Account Request Approval(approve: Accept, reject: Reject)
Long *idx = 1; // User Account Request idx

ApplicationsApi *apiInstance = [[ApplicationsApi alloc] init];

// Update an existing User Account Request
[apiInstance updateUserApplicationWith:cmd
    idx:idx
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApplicationsApi()

var cmd = approve; // {String} User Account Request Approval(approve: Accept, reject: Reject)

var idx = 1; // {Long} User Account Request idx


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateUserApplication(cmd, idx, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateUserApplicationExample
    {
        public void main()
        {
            
            var apiInstance = new ApplicationsApi();
            var cmd = approve;  // String | User Account Request Approval(approve: Accept, reject: Reject)
            var idx = 1;  // Long | User Account Request idx

            try
            {
                // Update an existing User Account Request
                apiInstance.updateUserApplication(cmd, idx);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApplicationsApi.updateUserApplication: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApplicationsApi();
$cmd = approve; // String | User Account Request Approval(approve: Accept, reject: Reject)
$idx = 1; // Long | User Account Request idx

try {
    $api_instance->updateUserApplication($cmd, $idx);
} catch (Exception $e) {
    echo 'Exception when calling ApplicationsApi->updateUserApplication: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApplicationsApi;

my $api_instance = WWW::SwaggerClient::ApplicationsApi->new();
my $cmd = approve; # String | User Account Request Approval(approve: Accept, reject: Reject)
my $idx = 1; # Long | User Account Request idx

eval { 
    $api_instance->updateUserApplication(cmd => $cmd, idx => $idx);
};
if ($@) {
    warn "Exception when calling ApplicationsApi->updateUserApplication: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApplicationsApi()
cmd = approve # String | User Account Request Approval(approve: Accept, reject: Reject)
idx = 1 # Long | User Account Request idx

try: 
    # Update an existing User Account Request
    api_instance.update_user_application(cmd, idx)
except ApiException as e:
    print("Exception when calling ApplicationsApi->updateUserApplication: %s\n" % e)

Parameters

Path parameters
Name Description
idx*
Long (int64)
User Account Request idx
Required
Form parameters
Name Description
cmd*
String
User Account Request Approval(approve: Accept, reject: Reject)
Enum: approve, reject
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Aps

getAPs

List WLANs

Retrieves a list of the WLANs (detected access points). Only the WLANs in the views the caller can access are returned.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/aps?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row has the AP view columns such as <code>AP_MAC</code>, <code>AP_TAG</code>, <code>AccessNodeCnt</code> and <code>AccessTotalCnt</code>. Set <code>allColumns=true</code> to return every AP column instead of the columns set in the caller's WLAN view. MAC parameters (<code>apnodemac</code>, <code>macId</code>) accept any MAC format.<br/>When no WLAN matches, the API returns 200 with <code>"result":[]</code>.


/aps

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/aps?page=&pageSize=&sort=&qsearch=&objGroupId=&devid=&apnodemac=&wsubjId=&status=&secproto=&secauth=&protocol=&channel=&channelnumber=&signal=&addTime=&tag=&macId=&ssid=&dupDetect=&allColumns="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ApsApi;

import java.io.File;
import java.util.*;

public class ApsApiExample {

    public static void main(String[] args) {
        
        ApsApi apiInstance = new ApsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"SSID","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = CORP; // String | Search string
        String objGroupId = OG001; // String | Object group ID. Returns the WLANs detected by the Nodes in the object group
        String devid = 7a3c9e10-5b2d-1040-8007-001122334472; // String | WLAN Device ID
        String apnodemac = 00:11:22:33:44:66; // String | MAC
        String wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473; // String | WLAN Group
        String status = internal; // String | WLAN status
        String secproto = 4; // String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
        String secauth = 1; // String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
        String protocol = 14; // String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
        String channel = bg; // String | Frequency
        String channelnumber = 6; // String | Channel
        String signal = -60; // String | Signal strength
        String addTime = TODAY; // String | Registered
        String tag = TAG_A; // String | Tag
        String macId = 00:11:22:33:44:55; // String | MAC
        String ssid = CORP-WLAN; // String | SSID
        Boolean dupDetect = false; // Boolean | Duplicated WLANs
        Boolean allColumns = false; // Boolean | Viewing all columns
        try {
            ApPageDoc result = apiInstance.getAPs(page, pageSize, sort, qsearch, objGroupId, devid, apnodemac, wsubjId, status, secproto, secauth, protocol, channel, channelnumber, signal, addTime, tag, macId, ssid, dupDetect, allColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApsApi#getAPs");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ApsApi;

public class ApsApiExample {

    public static void main(String[] args) {
        ApsApi apiInstance = new ApsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"SSID","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = CORP; // String | Search string
        String objGroupId = OG001; // String | Object group ID. Returns the WLANs detected by the Nodes in the object group
        String devid = 7a3c9e10-5b2d-1040-8007-001122334472; // String | WLAN Device ID
        String apnodemac = 00:11:22:33:44:66; // String | MAC
        String wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473; // String | WLAN Group
        String status = internal; // String | WLAN status
        String secproto = 4; // String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
        String secauth = 1; // String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
        String protocol = 14; // String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
        String channel = bg; // String | Frequency
        String channelnumber = 6; // String | Channel
        String signal = -60; // String | Signal strength
        String addTime = TODAY; // String | Registered
        String tag = TAG_A; // String | Tag
        String macId = 00:11:22:33:44:55; // String | MAC
        String ssid = CORP-WLAN; // String | SSID
        Boolean dupDetect = false; // Boolean | Duplicated WLANs
        Boolean allColumns = false; // Boolean | Viewing all columns
        try {
            ApPageDoc result = apiInstance.getAPs(page, pageSize, sort, qsearch, objGroupId, devid, apnodemac, wsubjId, status, secproto, secauth, protocol, channel, channelnumber, signal, addTime, tag, macId, ssid, dupDetect, allColumns);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ApsApi#getAPs");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"SSID","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *qsearch = CORP; // Search string (optional)
String *objGroupId = OG001; // Object group ID. Returns the WLANs detected by the Nodes in the object group (optional)
String *devid = 7a3c9e10-5b2d-1040-8007-001122334472; // WLAN Device ID (optional)
String *apnodemac = 00:11:22:33:44:66; // MAC (optional)
String *wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473; // WLAN Group (optional)
String *status = internal; // WLAN status (optional)
String *secproto = 4; // Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs (optional)
String *secauth = 1; // Security Settings - Authentication Methods (1: PSK, 2: 802.1X) (optional)
String *protocol = 14; // Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N) (optional)
String *channel = bg; // Frequency (optional)
String *channelnumber = 6; // Channel (optional)
String *signal = -60; // Signal strength (optional)
String *addTime = TODAY; // Registered (optional)
String *tag = TAG_A; // Tag (optional)
String *macId = 00:11:22:33:44:55; // MAC (optional)
String *ssid = CORP-WLAN; // SSID (optional)
Boolean *dupDetect = false; // Duplicated WLANs (optional) (default to false)
Boolean *allColumns = false; // Viewing all columns (optional)

ApsApi *apiInstance = [[ApsApi alloc] init];

// List WLANs
[apiInstance getAPsWith:page
    pageSize:pageSize
    sort:sort
    qsearch:qsearch
    objGroupId:objGroupId
    devid:devid
    apnodemac:apnodemac
    wsubjId:wsubjId
    status:status
    secproto:secproto
    secauth:secauth
    protocol:protocol
    channel:channel
    channelnumber:channelnumber
    signal:signal
    addTime:addTime
    tag:tag
    macId:macId
    ssid:ssid
    dupDetect:dupDetect
    allColumns:allColumns
              completionHandler: ^(ApPageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ApsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"SSID","dir":"asc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'qsearch': CORP, // {String} Search string
  'objGroupId': OG001, // {String} Object group ID. Returns the WLANs detected by the Nodes in the object group
  'devid': 7a3c9e10-5b2d-1040-8007-001122334472, // {String} WLAN Device ID
  'apnodemac': 00:11:22:33:44:66, // {String} MAC
  'wsubjId': 7a3c9e10-5b2d-1040-8007-001122334473, // {String} WLAN Group
  'status': internal, // {String} WLAN status
  'secproto': 4, // {String} Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
  'secauth': 1, // {String} Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
  'protocol': 14, // {String} Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
  'channel': bg, // {String} Frequency
  'channelnumber': 6, // {String} Channel
  'signal': -60, // {String} Signal strength
  'addTime': TODAY, // {String} Registered
  'tag': TAG_A, // {String} Tag
  'macId': 00:11:22:33:44:55, // {String} MAC
  'ssid': CORP-WLAN, // {String} SSID
  'dupDetect': false, // {Boolean} Duplicated WLANs
  'allColumns': false // {Boolean} Viewing all columns
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getAPs(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getAPsExample
    {
        public void main()
        {
            
            var apiInstance = new ApsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"SSID","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var qsearch = CORP;  // String | Search string (optional) 
            var objGroupId = OG001;  // String | Object group ID. Returns the WLANs detected by the Nodes in the object group (optional) 
            var devid = 7a3c9e10-5b2d-1040-8007-001122334472;  // String | WLAN Device ID (optional) 
            var apnodemac = 00:11:22:33:44:66;  // String | MAC (optional) 
            var wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473;  // String | WLAN Group (optional) 
            var status = internal;  // String | WLAN status (optional) 
            var secproto = 4;  // String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs (optional) 
            var secauth = 1;  // String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X) (optional) 
            var protocol = 14;  // String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N) (optional) 
            var channel = bg;  // String | Frequency (optional) 
            var channelnumber = 6;  // String | Channel (optional) 
            var signal = -60;  // String | Signal strength (optional) 
            var addTime = TODAY;  // String | Registered (optional) 
            var tag = TAG_A;  // String | Tag (optional) 
            var macId = 00:11:22:33:44:55;  // String | MAC (optional) 
            var ssid = CORP-WLAN;  // String | SSID (optional) 
            var dupDetect = false;  // Boolean | Duplicated WLANs (optional)  (default to false)
            var allColumns = false;  // Boolean | Viewing all columns (optional) 

            try
            {
                // List WLANs
                ApPageDoc result = apiInstance.getAPs(page, pageSize, sort, qsearch, objGroupId, devid, apnodemac, wsubjId, status, secproto, secauth, protocol, channel, channelnumber, signal, addTime, tag, macId, ssid, dupDetect, allColumns);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ApsApi.getAPs: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ApsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"SSID","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$qsearch = CORP; // String | Search string
$objGroupId = OG001; // String | Object group ID. Returns the WLANs detected by the Nodes in the object group
$devid = 7a3c9e10-5b2d-1040-8007-001122334472; // String | WLAN Device ID
$apnodemac = 00:11:22:33:44:66; // String | MAC
$wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473; // String | WLAN Group
$status = internal; // String | WLAN status
$secproto = 4; // String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
$secauth = 1; // String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
$protocol = 14; // String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
$channel = bg; // String | Frequency
$channelnumber = 6; // String | Channel
$signal = -60; // String | Signal strength
$addTime = TODAY; // String | Registered
$tag = TAG_A; // String | Tag
$macId = 00:11:22:33:44:55; // String | MAC
$ssid = CORP-WLAN; // String | SSID
$dupDetect = false; // Boolean | Duplicated WLANs
$allColumns = false; // Boolean | Viewing all columns

try {
    $result = $api_instance->getAPs($page, $pageSize, $sort, $qsearch, $objGroupId, $devid, $apnodemac, $wsubjId, $status, $secproto, $secauth, $protocol, $channel, $channelnumber, $signal, $addTime, $tag, $macId, $ssid, $dupDetect, $allColumns);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ApsApi->getAPs: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ApsApi;

my $api_instance = WWW::SwaggerClient::ApsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"SSID","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $qsearch = CORP; # String | Search string
my $objGroupId = OG001; # String | Object group ID. Returns the WLANs detected by the Nodes in the object group
my $devid = 7a3c9e10-5b2d-1040-8007-001122334472; # String | WLAN Device ID
my $apnodemac = 00:11:22:33:44:66; # String | MAC
my $wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473; # String | WLAN Group
my $status = internal; # String | WLAN status
my $secproto = 4; # String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
my $secauth = 1; # String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
my $protocol = 14; # String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
my $channel = bg; # String | Frequency
my $channelnumber = 6; # String | Channel
my $signal = -60; # String | Signal strength
my $addTime = TODAY; # String | Registered
my $tag = TAG_A; # String | Tag
my $macId = 00:11:22:33:44:55; # String | MAC
my $ssid = CORP-WLAN; # String | SSID
my $dupDetect = false; # Boolean | Duplicated WLANs
my $allColumns = false; # Boolean | Viewing all columns

eval { 
    my $result = $api_instance->getAPs(page => $page, pageSize => $pageSize, sort => $sort, qsearch => $qsearch, objGroupId => $objGroupId, devid => $devid, apnodemac => $apnodemac, wsubjId => $wsubjId, status => $status, secproto => $secproto, secauth => $secauth, protocol => $protocol, channel => $channel, channelnumber => $channelnumber, signal => $signal, addTime => $addTime, tag => $tag, macId => $macId, ssid => $ssid, dupDetect => $dupDetect, allColumns => $allColumns);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ApsApi->getAPs: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ApsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"SSID","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
qsearch = CORP # String | Search string (optional)
objGroupId = OG001 # String | Object group ID. Returns the WLANs detected by the Nodes in the object group (optional)
devid = 7a3c9e10-5b2d-1040-8007-001122334472 # String | WLAN Device ID (optional)
apnodemac = 00:11:22:33:44:66 # String | MAC (optional)
wsubjId = 7a3c9e10-5b2d-1040-8007-001122334473 # String | WLAN Group (optional)
status = internal # String | WLAN status (optional)
secproto = 4 # String | Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs (optional)
secauth = 1 # String | Security Settings - Authentication Methods (1: PSK, 2: 802.1X) (optional)
protocol = 14 # String | Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N) (optional)
channel = bg # String | Frequency (optional)
channelnumber = 6 # String | Channel (optional)
signal = -60 # String | Signal strength (optional)
addTime = TODAY # String | Registered (optional)
tag = TAG_A # String | Tag (optional)
macId = 00:11:22:33:44:55 # String | MAC (optional)
ssid = CORP-WLAN # String | SSID (optional)
dupDetect = false # Boolean | Duplicated WLANs (optional) (default to false)
allColumns = false # Boolean | Viewing all columns (optional)

try: 
    # List WLANs
    api_response = api_instance.get_aps(page, pageSize, sort=sort, qsearch=qsearch, objGroupId=objGroupId, devid=devid, apnodemac=apnodemac, wsubjId=wsubjId, status=status, secproto=secproto, secauth=secauth, protocol=protocol, channel=channel, channelnumber=channelnumber, signal=signal, addTime=addTime, tag=tag, macId=macId, ssid=ssid, dupDetect=dupDetect, allColumns=allColumns)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ApsApi->getAPs: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
qsearch
String
Search string
objGroupId
String
Object group ID. Returns the WLANs detected by the Nodes in the object group
devid
String
WLAN Device ID
apnodemac
String
MAC
wsubjId
String
WLAN Group
status
String
WLAN status
secproto
String
Security Settings - Protocol (1:OPEN, 2:WEP, 3:WPA, 4:WPA2, 5:WPAs
secauth
String
Security Settings - Authentication Methods (1: PSK, 2: 802.1X)
protocol
String
Protocol (1: A, 2: B ,4: G, 6: B/G, 9: A/N, 12: G/N, 14: B/G/N, 16: AC, 24: AC/N)
channel
String
Frequency
channelnumber
String
Channel
signal
String
Signal strength
addTime
String
Registered
tag
String
Tag
macId
String
MAC
ssid
String
SSID
dupDetect
Boolean
Duplicated WLANs
allColumns
Boolean
Viewing all columns

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Cves

getCvePlatformInfo

Platform Search with CVE

Retrieves the platforms affected by the CVE specified (platforms linked to the CVE's GPDB IDs).<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/cves/CVE-2021-44228/platformInfo?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"result":[{"PlatformName":"Windows 10","Manufacturer":"Microsoft","OS":"Windows"}],"total":1,"page":1,"pageSize":30}</pre>Returns an empty <code>result</code> (HTTP 200) when the CVE is unknown or has no platform mapping. Default order is Manufacturer, OS, PlatformName.


/cves/{cveId}/platformInfo

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/cves/{cveId}/platformInfo?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CvesApi;

import java.io.File;
import java.util.*;

public class CvesApiExample {

    public static void main(String[] args) {
        
        CvesApi apiInstance = new CvesApi();
        String cveId = CVE-2021-44228; // String | CVE ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"PlatformName","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            CvePlatformListDoc result = apiInstance.getCvePlatformInfo(cveId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CvesApi#getCvePlatformInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CvesApi;

public class CvesApiExample {

    public static void main(String[] args) {
        CvesApi apiInstance = new CvesApi();
        String cveId = CVE-2021-44228; // String | CVE ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"PlatformName","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            CvePlatformListDoc result = apiInstance.getCvePlatformInfo(cveId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CvesApi#getCvePlatformInfo");
            e.printStackTrace();
        }
    }
}
String *cveId = CVE-2021-44228; // CVE ID
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"PlatformName","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

CvesApi *apiInstance = [[CvesApi alloc] init];

// Platform Search with CVE
[apiInstance getCvePlatformInfoWith:cveId
    page:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(CvePlatformListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.CvesApi()

var cveId = CVE-2021-44228; // {String} CVE ID

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"PlatformName","dir":"asc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCvePlatformInfo(cveId, page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCvePlatformInfoExample
    {
        public void main()
        {
            
            var apiInstance = new CvesApi();
            var cveId = CVE-2021-44228;  // String | CVE ID
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"PlatformName","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // Platform Search with CVE
                CvePlatformListDoc result = apiInstance.getCvePlatformInfo(cveId, page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CvesApi.getCvePlatformInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CvesApi();
$cveId = CVE-2021-44228; // String | CVE ID
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"PlatformName","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getCvePlatformInfo($cveId, $page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CvesApi->getCvePlatformInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CvesApi;

my $api_instance = WWW::SwaggerClient::CvesApi->new();
my $cveId = CVE-2021-44228; # String | CVE ID
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"PlatformName","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getCvePlatformInfo(cveId => $cveId, page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CvesApi->getCvePlatformInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CvesApi()
cveId = CVE-2021-44228 # String | CVE ID
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"PlatformName","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # Platform Search with CVE
    api_response = api_instance.get_cve_platform_info(cveId, page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CvesApi->getCvePlatformInfo: %s\n" % e)

Parameters

Path parameters
Name Description
cveId*
String
CVE ID
Required
Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node ID Not Found


getCves

Retrieve a specific Node's CVE(s)

Retrieves the list of CVEs that are mapped to platforms detected by the system (from the CVE Elasticsearch index). It is not limited to one Node.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/cves?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"result":[{"id":"CVE-2021-44228","cve":{...},"nacMappingData":{"GPDB_IDS":[...],"PLATFORM_IDS":[...]},"CNT":1}],"total":1,"page":1,"pageSize":30}</pre>Returns <code>{"result":[],"total":0}</code> when no CVE data exists. <code>qsearch</code> and <code>mode</code> do not change the result in the current code. The default order is the publish date, newest first. Use the CVE ID with GET /cves/{cveId}/platformInfo.


/cves

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/cves?page=&pageSize=&qsearch=&mode=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.CvesApi;

import java.io.File;
import java.util.*;

public class CvesApiExample {

    public static void main(String[] args) {
        
        CvesApi apiInstance = new CvesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String qsearch = CVE-2021-44228; // String | Search string
        String mode = nodeStatus; // String | List mode
        String sort = {"field":"CNT","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            CveListDoc result = apiInstance.getCves(page, pageSize, qsearch, mode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CvesApi#getCves");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.CvesApi;

public class CvesApiExample {

    public static void main(String[] args) {
        CvesApi apiInstance = new CvesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String qsearch = CVE-2021-44228; // String | Search string
        String mode = nodeStatus; // String | List mode
        String sort = {"field":"CNT","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            CveListDoc result = apiInstance.getCves(page, pageSize, qsearch, mode, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling CvesApi#getCves");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *qsearch = CVE-2021-44228; // Search string (optional)
String *mode = nodeStatus; // List mode (optional)
String *sort = {"field":"CNT","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

CvesApi *apiInstance = [[CvesApi alloc] init];

// Retrieve a specific Node's CVE(s)
[apiInstance getCvesWith:page
    pageSize:pageSize
    qsearch:qsearch
    mode:mode
    sort:sort
              completionHandler: ^(CveListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.CvesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'qsearch': CVE-2021-44228, // {String} Search string
  'mode': nodeStatus, // {String} List mode
  'sort': {"field":"CNT","dir":"desc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCves(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCvesExample
    {
        public void main()
        {
            
            var apiInstance = new CvesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var qsearch = CVE-2021-44228;  // String | Search string (optional) 
            var mode = nodeStatus;  // String | List mode (optional) 
            var sort = {"field":"CNT","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // Retrieve a specific Node's CVE(s)
                CveListDoc result = apiInstance.getCves(page, pageSize, qsearch, mode, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling CvesApi.getCves: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\CvesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$qsearch = CVE-2021-44228; // String | Search string
$mode = nodeStatus; // String | List mode
$sort = {"field":"CNT","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getCves($page, $pageSize, $qsearch, $mode, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling CvesApi->getCves: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::CvesApi;

my $api_instance = WWW::SwaggerClient::CvesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $qsearch = CVE-2021-44228; # String | Search string
my $mode = nodeStatus; # String | List mode
my $sort = {"field":"CNT","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getCves(page => $page, pageSize => $pageSize, qsearch => $qsearch, mode => $mode, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling CvesApi->getCves: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.CvesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
qsearch = CVE-2021-44228 # String | Search string (optional)
mode = nodeStatus # String | List mode (optional)
sort = {"field":"CNT","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # Retrieve a specific Node's CVE(s)
    api_response = api_instance.get_cves(page, pageSize, qsearch=qsearch, mode=mode, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling CvesApi->getCves: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
qsearch
String
Search string
mode
String
List mode
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node ID Not Found


Devices

createNodeTagsOfDevice

Assign a tag

Assigns tags to all Nodes of the device specified. Specify each tag by <code>name</code> or <code>id</code>.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/devices/{Device ID}/node/tags?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"}]'</pre>Response<pre>{"success":[{"code":200,"parameter":{"nodeId":"{Node ID}","tag":{"name":"TAG_A"}}}],"fail":[]}</pre>Returns HTTP 200 even when nothing is assigned. Always check <code>fail</code>:<br/>&bull; code 404: the device has no Node.<br/>&bull; code 400: the tag does not exist, or the Node is a sensor or center Node.


/devices/{devId}/node/tags

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/devices/{devId}/node/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DevicesApi;

import java.io.File;
import java.util.*;

public class DevicesApiExample {

    public static void main(String[] args) {
        
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        try {
            DevNodeTagResultDoc result = apiInstance.createNodeTagsOfDevice(devId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#createNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DevicesApi;

public class DevicesApiExample {

    public static void main(String[] args) {
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        try {
            DevNodeTagResultDoc result = apiInstance.createNodeTagsOfDevice(devId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#createNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
String *devId = 7a3c9e10-5b2d-1040-8007-001122334472; // Device ID
array[TagVo] *body = ; // Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

DevicesApi *apiInstance = [[DevicesApi alloc] init];

// Assign a tag
[apiInstance createNodeTagsOfDeviceWith:devId
    body:body
              completionHandler: ^(DevNodeTagResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.DevicesApi()

var devId = 7a3c9e10-5b2d-1040-8007-001122334472; // {String} Device ID

var body = ; // {array[TagVo]} Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNodeTagsOfDevice(devId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNodeTagsOfDeviceExample
    {
        public void main()
        {
            
            var apiInstance = new DevicesApi();
            var devId = 7a3c9e10-5b2d-1040-8007-001122334472;  // String | Device ID
            var body = new array[TagVo](); // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

            try
            {
                // Assign a tag
                DevNodeTagResultDoc result = apiInstance.createNodeTagsOfDevice(devId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DevicesApi.createNodeTagsOfDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DevicesApi();
$devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
$body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

try {
    $result = $api_instance->createNodeTagsOfDevice($devId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->createNodeTagsOfDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DevicesApi;

my $api_instance = WWW::SwaggerClient::DevicesApi->new();
my $devId = 7a3c9e10-5b2d-1040-8007-001122334472; # String | Device ID
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

eval { 
    my $result = $api_instance->createNodeTagsOfDevice(devId => $devId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DevicesApi->createNodeTagsOfDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DevicesApi()
devId = 7a3c9e10-5b2d-1040-8007-001122334472 # String | Device ID
body =  # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

try: 
    # Assign a tag
    api_response = api_instance.create_node_tags_of_device(devId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DevicesApi->createNodeTagsOfDevice: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteNodeTagsOfDevice

Remove the tag(s)

Removes tags from all Nodes of the device specified. The body is a list of tag IDs (<code>NP_IDX</code>), not tag names.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/devices/{Device ID}/node/tags?apiKey={Key}" -H "Content-Type: application/json" -d '["2","3"]'</pre>Response<pre>[[{"Type":"node","IDX":1,"Name":"TRUSTED","nodeId":"{Node ID}"}]]</pre>The response has the remaining tags of each Node. Field names differ from <code>GET /devices/{devId}/node/tags</code>.<br/>&bull; 400: a value is not a valid tag ID.<br/>&bull; 500: the device has no Node, or the body is empty.


/devices/{devId}/node/tags

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/devices/{devId}/node/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DevicesApi;

import java.io.File;
import java.util.*;

public class DevicesApiExample {

    public static void main(String[] args) {
        
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        array[String] body = ; // array[String] | Tag List
        try {
            apiInstance.deleteNodeTagsOfDevice(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#deleteNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DevicesApi;

public class DevicesApiExample {

    public static void main(String[] args) {
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        array[String] body = ; // array[String] | Tag List
        try {
            apiInstance.deleteNodeTagsOfDevice(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#deleteNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
String *devId = 7a3c9e10-5b2d-1040-8007-001122334472; // Device ID
array[String] *body = ; // Tag List

DevicesApi *apiInstance = [[DevicesApi alloc] init];

// Remove the tag(s)
[apiInstance deleteNodeTagsOfDeviceWith:devId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.DevicesApi()

var devId = 7a3c9e10-5b2d-1040-8007-001122334472; // {String} Device ID

var body = ; // {array[String]} Tag List


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteNodeTagsOfDevice(devId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNodeTagsOfDeviceExample
    {
        public void main()
        {
            
            var apiInstance = new DevicesApi();
            var devId = 7a3c9e10-5b2d-1040-8007-001122334472;  // String | Device ID
            var body = new array[String](); // array[String] | Tag List

            try
            {
                // Remove the tag(s)
                apiInstance.deleteNodeTagsOfDevice(devId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DevicesApi.deleteNodeTagsOfDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DevicesApi();
$devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
$body = ; // array[String] | Tag List

try {
    $api_instance->deleteNodeTagsOfDevice($devId, $body);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->deleteNodeTagsOfDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DevicesApi;

my $api_instance = WWW::SwaggerClient::DevicesApi->new();
my $devId = 7a3c9e10-5b2d-1040-8007-001122334472; # String | Device ID
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Tag List

eval { 
    $api_instance->deleteNodeTagsOfDevice(devId => $devId, body => $body);
};
if ($@) {
    warn "Exception when calling DevicesApi->deleteNodeTagsOfDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DevicesApi()
devId = 7a3c9e10-5b2d-1040-8007-001122334472 # String | Device ID
body =  # array[String] | Tag List

try: 
    # Remove the tag(s)
    api_instance.delete_node_tags_of_device(devId, body)
except ApiException as e:
    print("Exception when calling DevicesApi->deleteNodeTagsOfDevice: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getNodeTagsOfDevice

Retrieve a specific device's Node tag(s)

Retrieves the tags assigned to the Nodes of the device specified. The response has one list per Node.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/devices/{Device ID}/node/tags?apiKey={Key}"</pre>Response<pre>[[{"type":"node","id":"2","name":"GUEST","targetId":"{Node ID}","startDate":null,"expireDate":null}],[]]</pre>A Node with no tag gives an empty list, so an existing device without tags returns 200 such as <code>[[],[]]</code>. Returns 404 only when the device has no Node.


/devices/{devId}/node/tags

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/devices/{devId}/node/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DevicesApi;

import java.io.File;
import java.util.*;

public class DevicesApiExample {

    public static void main(String[] args) {
        
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        try {
            apiInstance.getNodeTagsOfDevice(devId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#getNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DevicesApi;

public class DevicesApiExample {

    public static void main(String[] args) {
        DevicesApi apiInstance = new DevicesApi();
        String devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID
        try {
            apiInstance.getNodeTagsOfDevice(devId);
        } catch (ApiException e) {
            System.err.println("Exception when calling DevicesApi#getNodeTagsOfDevice");
            e.printStackTrace();
        }
    }
}
String *devId = 7a3c9e10-5b2d-1040-8007-001122334472; // Device ID

DevicesApi *apiInstance = [[DevicesApi alloc] init];

// Retrieve a specific device's Node tag(s)
[apiInstance getNodeTagsOfDeviceWith:devId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.DevicesApi()

var devId = 7a3c9e10-5b2d-1040-8007-001122334472; // {String} Device ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.getNodeTagsOfDevice(devId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeTagsOfDeviceExample
    {
        public void main()
        {
            
            var apiInstance = new DevicesApi();
            var devId = 7a3c9e10-5b2d-1040-8007-001122334472;  // String | Device ID

            try
            {
                // Retrieve a specific device's Node tag(s)
                apiInstance.getNodeTagsOfDevice(devId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DevicesApi.getNodeTagsOfDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\DevicesApi();
$devId = 7a3c9e10-5b2d-1040-8007-001122334472; // String | Device ID

try {
    $api_instance->getNodeTagsOfDevice($devId);
} catch (Exception $e) {
    echo 'Exception when calling DevicesApi->getNodeTagsOfDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DevicesApi;

my $api_instance = WWW::SwaggerClient::DevicesApi->new();
my $devId = 7a3c9e10-5b2d-1040-8007-001122334472; # String | Device ID

eval { 
    $api_instance->getNodeTagsOfDevice(devId => $devId);
};
if ($@) {
    warn "Exception when calling DevicesApi->getNodeTagsOfDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DevicesApi()
devId = 7a3c9e10-5b2d-1040-8007-001122334472 # String | Device ID

try: 
    # Retrieve a specific device's Node tag(s)
    api_instance.get_node_tags_of_device(devId)
except ApiException as e:
    print("Exception when calling DevicesApi->getNodeTagsOfDevice: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Device ID Not Found


Groups

getFavoriteApGroups

List Widget WLAN Groups

Retrieves the WLAN Groups shown in the caller's WLAN Group and WLAN connected-user widgets on the dashboard, with connection counts.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/groups/ap/favorite?apiKey={Key}"</pre>Response<pre>[{"WSUBJ_ID":"{WLAN Group ID}","WSUBJ_NAME":"WLAN Group A","AccessNodeCnt":3,"AccessTotalCnt":5,"NodeCnt":2}]</pre>Returns 404 when no such widget with groups is set for the caller (API key owner).


/groups/ap/favorite

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/groups/ap/favorite"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {

    public static void main(String[] args) {
        
        GroupsApi apiInstance = new GroupsApi();
        try {
            array[GrpApGroupDoc] result = apiInstance.getFavoriteApGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getFavoriteApGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GroupsApi;

public class GroupsApiExample {

    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        try {
            array[GrpApGroupDoc] result = apiInstance.getFavoriteApGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getFavoriteApGroups");
            e.printStackTrace();
        }
    }
}

GroupsApi *apiInstance = [[GroupsApi alloc] init];

// List Widget WLAN Groups
[apiInstance getFavoriteApGroupsWithCompletionHandler: 
              ^(array[GrpApGroupDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.GroupsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFavoriteApGroups(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFavoriteApGroupsExample
    {
        public void main()
        {
            
            var apiInstance = new GroupsApi();

            try
            {
                // List Widget WLAN Groups
                array[GrpApGroupDoc] result = apiInstance.getFavoriteApGroups();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GroupsApi.getFavoriteApGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GroupsApi();

try {
    $result = $api_instance->getFavoriteApGroups();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->getFavoriteApGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GroupsApi;

my $api_instance = WWW::SwaggerClient::GroupsApi->new();

eval { 
    my $result = $api_instance->getFavoriteApGroups();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->getFavoriteApGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GroupsApi()

try: 
    # List Widget WLAN Groups
    api_response = api_instance.get_favorite_ap_groups()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->getFavoriteApGroups: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - WLAN Group Not Found


getFavoriteNodeGroupsOfGroups

List Widget Node Groups

Retrieves the Node Groups shown in the caller's Node Group widgets on the dashboard, with the Node count of each group.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/groups/node/favorite?apiKey={Key}"</pre>Response<pre>[{"SUBJ_ID":"{Node Group ID}","SUBJ_NAME":"Group A","SUBJ_TYPE":1,"NODECNT":12}]</pre>Returns 404 when no Node Group widget with groups is set for the caller (API key owner).


/groups/node/favorite

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/groups/node/favorite"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.GroupsApi;

import java.io.File;
import java.util.*;

public class GroupsApiExample {

    public static void main(String[] args) {
        
        GroupsApi apiInstance = new GroupsApi();
        try {
            array[GrpNodeGroupDoc] result = apiInstance.getFavoriteNodeGroupsOfGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getFavoriteNodeGroupsOfGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.GroupsApi;

public class GroupsApiExample {

    public static void main(String[] args) {
        GroupsApi apiInstance = new GroupsApi();
        try {
            array[GrpNodeGroupDoc] result = apiInstance.getFavoriteNodeGroupsOfGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling GroupsApi#getFavoriteNodeGroupsOfGroups");
            e.printStackTrace();
        }
    }
}

GroupsApi *apiInstance = [[GroupsApi alloc] init];

// List Widget Node Groups
[apiInstance getFavoriteNodeGroupsOfGroupsWithCompletionHandler: 
              ^(array[GrpNodeGroupDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.GroupsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFavoriteNodeGroupsOfGroups(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFavoriteNodeGroupsOfGroupsExample
    {
        public void main()
        {
            
            var apiInstance = new GroupsApi();

            try
            {
                // List Widget Node Groups
                array[GrpNodeGroupDoc] result = apiInstance.getFavoriteNodeGroupsOfGroups();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling GroupsApi.getFavoriteNodeGroupsOfGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\GroupsApi();

try {
    $result = $api_instance->getFavoriteNodeGroupsOfGroups();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling GroupsApi->getFavoriteNodeGroupsOfGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::GroupsApi;

my $api_instance = WWW::SwaggerClient::GroupsApi->new();

eval { 
    my $result = $api_instance->getFavoriteNodeGroupsOfGroups();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling GroupsApi->getFavoriteNodeGroupsOfGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.GroupsApi()

try: 
    # List Widget Node Groups
    api_response = api_instance.get_favorite_node_groups_of_groups()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling GroupsApi->getFavoriteNodeGroupsOfGroups: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node Group Not Found


Ip

getIPCustomFields

Get custom fields of ip

Retrieves the custom fields of the IP policy of the IP address specified. <code>snid</code> (sensor Node ID) is used only when IP policies are managed per sensor.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/ip/customfields?apiKey={Key}&amp;ip=192.168.1.2&amp;snid={Sensor Node ID}"</pre>Response<pre>{"code":200,"message":"","parameter":"192.168.1.2","data":[{"CONF_KEY":"macip_custom01","CONF_DISP":"Asset No","CONF_VALUE":"A-001"}]}</pre><code>data</code> lists the visible custom fields: <code>CONF_KEY</code> (macip_custom01 to 20), <code>CONF_DISP</code> and <code>CONF_VALUE</code> (the current value). It is empty when no custom field is configured. Always HTTP 200; when the policy or the field template is not found, the body has <code>code</code> 404.


/ip/customfields

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/ip/customfields?ip=&snid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.IpApi;

import java.io.File;
import java.util.*;

public class IpApiExample {

    public static void main(String[] args) {
        
        IpApi apiInstance = new IpApi();
        String ip = 192.168.1.2; // String | ip
        String snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid
        try {
            IpCustomFieldsMessageDoc result = apiInstance.getIPCustomFields(ip, snid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#getIPCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.IpApi;

public class IpApiExample {

    public static void main(String[] args) {
        IpApi apiInstance = new IpApi();
        String ip = 192.168.1.2; // String | ip
        String snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid
        try {
            IpCustomFieldsMessageDoc result = apiInstance.getIPCustomFields(ip, snid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#getIPCustomFields");
            e.printStackTrace();
        }
    }
}
String *ip = 192.168.1.2; // ip
String *snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // sensor nid

IpApi *apiInstance = [[IpApi alloc] init];

// Get custom fields of ip
[apiInstance getIPCustomFieldsWith:ip
    snid:snid
              completionHandler: ^(IpCustomFieldsMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.IpApi()

var ip = 192.168.1.2; // {String} ip

var snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} sensor nid


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getIPCustomFields(ip, snid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getIPCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new IpApi();
            var ip = 192.168.1.2;  // String | ip
            var snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | sensor nid

            try
            {
                // Get custom fields of ip
                IpCustomFieldsMessageDoc result = apiInstance.getIPCustomFields(ip, snid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling IpApi.getIPCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\IpApi();
$ip = 192.168.1.2; // String | ip
$snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid

try {
    $result = $api_instance->getIPCustomFields($ip, $snid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IpApi->getIPCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::IpApi;

my $api_instance = WWW::SwaggerClient::IpApi->new();
my $ip = 192.168.1.2; # String | ip
my $snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | sensor nid

eval { 
    my $result = $api_instance->getIPCustomFields(ip => $ip, snid => $snid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IpApi->getIPCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.IpApi()
ip = 192.168.1.2 # String | ip
snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | sensor nid

try: 
    # Get custom fields of ip
    api_response = api_instance.get_ip_custom_fields(ip, snid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IpApi->getIPCustomFields: %s\n" % e)

Parameters

Query parameters
Name Description
ip*
String
ip
Required
snid*
String
sensor nid
Required

Responses

Status: 200 - Success


updateIPCustomFields

Update custom fields of ip

Updates the custom fields of an IP policy. The row is selected by <code>trustIPString</code> and <code>trustMAC</code> (and <code>sensorNID</code> when set), as stored in the IP policy.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/ip/customfields?apiKey={Key}" -H "Content-Type: application/json" -d '{"trustIPString":"192.168.1.2","trustMAC":"","sensorNID":"{Sensor Node ID}","macip_custom01":"A-001"}'</pre>Response<pre>{"code":200,"message":"","parameter":{"trustIPString":"192.168.1.2",...},"data":null}</pre>The update writes all 20 fields <code>macip_custom01</code> to <code>macip_custom20</code>; fields left out are cleared, so send all current values. Always HTTP 200; check <code>code</code> in the body (500 when nothing is updated).


/ip/customfields

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/ip/customfields"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.IpApi;

import java.io.File;
import java.util.*;

public class IpApiExample {

    public static void main(String[] args) {
        
        IpApi apiInstance = new IpApi();
        IPM_TrustMACIPVo body = ; // IPM_TrustMACIPVo | ip custom fields
        try {
            IpCustomFieldsUpdateDoc result = apiInstance.updateIPCustomFields(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#updateIPCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.IpApi;

public class IpApiExample {

    public static void main(String[] args) {
        IpApi apiInstance = new IpApi();
        IPM_TrustMACIPVo body = ; // IPM_TrustMACIPVo | ip custom fields
        try {
            IpCustomFieldsUpdateDoc result = apiInstance.updateIPCustomFields(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#updateIPCustomFields");
            e.printStackTrace();
        }
    }
}
IPM_TrustMACIPVo *body = ; // ip custom fields

IpApi *apiInstance = [[IpApi alloc] init];

// Update custom fields of ip
[apiInstance updateIPCustomFieldsWith:body
              completionHandler: ^(IpCustomFieldsUpdateDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.IpApi()

var body = ; // {IPM_TrustMACIPVo} ip custom fields


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateIPCustomFields(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateIPCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new IpApi();
            var body = new IPM_TrustMACIPVo(); // IPM_TrustMACIPVo | ip custom fields

            try
            {
                // Update custom fields of ip
                IpCustomFieldsUpdateDoc result = apiInstance.updateIPCustomFields(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling IpApi.updateIPCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\IpApi();
$body = ; // IPM_TrustMACIPVo | ip custom fields

try {
    $result = $api_instance->updateIPCustomFields($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IpApi->updateIPCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::IpApi;

my $api_instance = WWW::SwaggerClient::IpApi->new();
my $body = WWW::SwaggerClient::Object::IPM_TrustMACIPVo->new(); # IPM_TrustMACIPVo | ip custom fields

eval { 
    my $result = $api_instance->updateIPCustomFields(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IpApi->updateIPCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.IpApi()
body =  # IPM_TrustMACIPVo | ip custom fields

try: 
    # Update custom fields of ip
    api_response = api_instance.update_ip_custom_fields(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IpApi->updateIPCustomFields: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success


updateIpPolicies

Configure IP Policy

Sets the IP policy of one or more IP addresses. The body is an array; each element has <code>cmd</code>, <code>targetIP</code> and, for ipprotect, <code>specifyMACs</code>. <code>extraLogInfo</code> is added to the audit log.<br/>&bull; ipdeny: Deny IP<br/>&bull; ipallow: Allow IP - Disable Conflict Prevention<br/>&bull; ipprotect: Allow IP - Enable Conflict Prevention (Allow Specified MAC(s))<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/ip/policies?apiKey={Key}" -H "Content-Type: application/json" -d '[{"cmd":"ipprotect","targetIP":"192.168.1.2","specifyMACs":["00:11:22:33:44:55"]}]'</pre>Response<pre>{"success":[{"code":200,"message":"","parameter":{"cmd":"ipprotect","targetIP":"192.168.1.2",...},"data":null}],"fail":[]}</pre>Always HTTP 200; check <code>fail</code> (code 400 for an invalid IP or no MAC, 500 when saving fails). An unknown <code>cmd</code> is treated as ipdeny.


/ip/policies

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/ip/policies"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.IpApi;

import java.io.File;
import java.util.*;

public class IpApiExample {

    public static void main(String[] args) {
        
        IpApi apiInstance = new IpApi();
        array[IP Policy Value Object] body = ; // array[IP Policy Value Object] | Policy Data
        try {
            IpPolicyResultDoc result = apiInstance.updateIpPolicies(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#updateIpPolicies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.IpApi;

public class IpApiExample {

    public static void main(String[] args) {
        IpApi apiInstance = new IpApi();
        array[IP Policy Value Object] body = ; // array[IP Policy Value Object] | Policy Data
        try {
            IpPolicyResultDoc result = apiInstance.updateIpPolicies(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling IpApi#updateIpPolicies");
            e.printStackTrace();
        }
    }
}
array[IP Policy Value Object] *body = ; // Policy Data

IpApi *apiInstance = [[IpApi alloc] init];

// Configure IP Policy
[apiInstance updateIpPoliciesWith:body
              completionHandler: ^(IpPolicyResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.IpApi()

var body = ; // {array[IP Policy Value Object]} Policy Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateIpPolicies(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateIpPoliciesExample
    {
        public void main()
        {
            
            var apiInstance = new IpApi();
            var body = new array[IP Policy Value Object](); // array[IP Policy Value Object] | Policy Data

            try
            {
                // Configure IP Policy
                IpPolicyResultDoc result = apiInstance.updateIpPolicies(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling IpApi.updateIpPolicies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\IpApi();
$body = ; // array[IP Policy Value Object] | Policy Data

try {
    $result = $api_instance->updateIpPolicies($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling IpApi->updateIpPolicies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::IpApi;

my $api_instance = WWW::SwaggerClient::IpApi->new();
my $body = [WWW::SwaggerClient::Object::array[IP Policy Value Object]->new()]; # array[IP Policy Value Object] | Policy Data

eval { 
    my $result = $api_instance->updateIpPolicies(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling IpApi->updateIpPolicies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.IpApi()
body =  # array[IP Policy Value Object] | Policy Data

try: 
    # Configure IP Policy
    api_response = api_instance.update_ip_policies(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling IpApi->updateIpPolicies: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 500 - Internal Server Error


Logs

createLogfilter

Create a new log filter

Creates a Log Filter. The body is a LogFilterVo (same keys as <code>parameter</code> of GET /logs/filters/{id}); <code>logFilterID</code> is assigned by the server. Names do not have to be unique.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/logs/filters?apiKey={Key}" -H "Content-Type: application/json" -d '{"name":"FILTER_A","description":"Sample","condDesc":"ADMIN","mode":0,"treeDisplay":0,"pageUrlMode":0}'</pre>Response<pre>{"code":200,"message":"","parameter":{"logFilterID":517,"name":"FILTER_A","description":"Sample","condDesc":"ADMIN",...},"data":null}</pre>The new ID is <code>parameter.logFilterID</code>. Check <code>code</code> in the body: a save failure is HTTP 200 with <code>code</code> 500. 400 is returned for a missing body or a <code>pageUrlMode</code>/<code>pageUrl</code> that is not allowed. SNMP secrets in the echo are masked as ******.


/logs/filters

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/logs/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        LogFilterVo body = ; // LogFilterVo | Log filter
        try {
            LogFilterMessageDoc result = apiInstance.createLogfilter(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#createLogfilter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        LogFilterVo body = ; // LogFilterVo | Log filter
        try {
            LogFilterMessageDoc result = apiInstance.createLogfilter(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#createLogfilter");
            e.printStackTrace();
        }
    }
}
LogFilterVo *body = ; // Log filter

LogsApi *apiInstance = [[LogsApi alloc] init];

// Create a new log filter
[apiInstance createLogfilterWith:body
              completionHandler: ^(LogFilterMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var body = ; // {LogFilterVo} Log filter


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createLogfilter(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createLogfilterExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var body = new LogFilterVo(); // LogFilterVo | Log filter

            try
            {
                // Create a new log filter
                LogFilterMessageDoc result = apiInstance.createLogfilter(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.createLogfilter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$body = ; // LogFilterVo | Log filter

try {
    $result = $api_instance->createLogfilter($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogsApi->createLogfilter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $body = WWW::SwaggerClient::Object::LogFilterVo->new(); # LogFilterVo | Log filter

eval { 
    my $result = $api_instance->createLogfilter(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogsApi->createLogfilter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
body =  # LogFilterVo | Log filter

try: 
    # Create a new log filter
    api_response = api_instance.create_logfilter(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->createLogfilter: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


deleteLogfilters

Delete a specific log filter.

Deletes the Log Filters specified. Send <code>ids</code> as a form parameter (comma-separated Log Filter IDs); JSON or a query parameter returns 415.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/logs/filters?apiKey={Key}" -H "Content-Type: application/x-www-form-urlencoded" -d "ids=517"</pre>Response<pre>{"code":200,"message":"","parameter":"517","data":null}</pre>Delete one ID per call and check the result with GET /logs/filters/{id} (404 when deleted). On the current build a successful delete can return an HTML error page with HTTP 200, and with several IDs only the first one is deleted. An ID that does not exist returns 200. Missing <code>ids</code> returns 400; a non-numeric ID returns 500.


/logs/filters

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/logs/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        String ids = 517; // String | Log Filter ID (Use a comma to separate entries.)
        try {
            LogFilterDeleteDoc result = apiInstance.deleteLogfilters(ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#deleteLogfilters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        String ids = 517; // String | Log Filter ID (Use a comma to separate entries.)
        try {
            LogFilterDeleteDoc result = apiInstance.deleteLogfilters(ids);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#deleteLogfilters");
            e.printStackTrace();
        }
    }
}
String *ids = 517; // Log Filter ID (Use a comma to separate entries.)

LogsApi *apiInstance = [[LogsApi alloc] init];

// Delete a specific log filter.
[apiInstance deleteLogfiltersWith:ids
              completionHandler: ^(LogFilterDeleteDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var ids = 517; // {String} Log Filter ID (Use a comma to separate entries.)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteLogfilters(ids, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteLogfiltersExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var ids = 517;  // String | Log Filter ID (Use a comma to separate entries.)

            try
            {
                // Delete a specific log filter.
                LogFilterDeleteDoc result = apiInstance.deleteLogfilters(ids);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.deleteLogfilters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$ids = 517; // String | Log Filter ID (Use a comma to separate entries.)

try {
    $result = $api_instance->deleteLogfilters($ids);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogsApi->deleteLogfilters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $ids = 517; # String | Log Filter ID (Use a comma to separate entries.)

eval { 
    my $result = $api_instance->deleteLogfilters(ids => $ids);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogsApi->deleteLogfilters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
ids = 517 # String | Log Filter ID (Use a comma to separate entries.)

try: 
    # Delete a specific log filter.
    api_response = api_instance.delete_logfilters(ids)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->deleteLogfilters: %s\n" % e)

Parameters

Form parameters
Name Description
ids*
String
Log Filter ID (Use a comma to separate entries.)
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request - Invalid parameters

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getInfoStatus

Information about Elasticsearch indexes

Retrieves the status of the Elasticsearch log indexes (the _cat/indices output for the log index prefix, with sizes in bytes). <code>h</code> selects columns and <code>s</code> sorts, both comma-separated Elasticsearch column names.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/logs/statusInfo?apiKey={Key}&amp;h=health,status,index,docs.count,store.size&amp;s=index"</pre>Response<pre>{"code":200,"message":"","parameter":null,"data":"[{\"health\":\"green\",\"status\":\"open\",\"index\":\"nac-node-2026-11\",\"docs.count\":\"88594\",\"store.size\":\"12103277\"}]"}</pre><code>data</code> is a JSON array encoded as a string; parse it again. All values are strings. An unknown column name is not an error; each row is returned as <code>{}</code>.


/logs/statusInfo

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/logs/statusInfo?h=&s="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        String h = health,status,index,docs.count,store.size; // String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
        String s = index:desc; // String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)
        try {
            LogJsonMessageDoc result = apiInstance.getInfoStatus(h, s);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#getInfoStatus");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        String h = health,status,index,docs.count,store.size; // String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
        String s = index:desc; // String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)
        try {
            LogJsonMessageDoc result = apiInstance.getInfoStatus(h, s);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#getInfoStatus");
            e.printStackTrace();
        }
    }
}
String *h = health,status,index,docs.count,store.size; // (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size) (optional)
String *s = index:desc; // (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc) (optional)

LogsApi *apiInstance = [[LogsApi alloc] init];

// Information about Elasticsearch indexes
[apiInstance getInfoStatusWith:h
    s:s
              completionHandler: ^(LogJsonMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var opts = { 
  'h': health,status,index,docs.count,store.size, // {String} (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
  's': index:desc // {String} (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getInfoStatus(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getInfoStatusExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var h = health,status,index,docs.count,store.size;  // String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size) (optional) 
            var s = index:desc;  // String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc) (optional) 

            try
            {
                // Information about Elasticsearch indexes
                LogJsonMessageDoc result = apiInstance.getInfoStatus(h, s);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.getInfoStatus: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$h = health,status,index,docs.count,store.size; // String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
$s = index:desc; // String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)

try {
    $result = $api_instance->getInfoStatus($h, $s);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogsApi->getInfoStatus: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $h = health,status,index,docs.count,store.size; # String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
my $s = index:desc; # String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)

eval { 
    my $result = $api_instance->getInfoStatus(h => $h, s => $s);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogsApi->getInfoStatus: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
h = health,status,index,docs.count,store.size # String | (Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size) (optional)
s = index:desc # String | (Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc) (optional)

try: 
    # Information about Elasticsearch indexes
    api_response = api_instance.get_info_status(h=h, s=s)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->getInfoStatus: %s\n" % e)

Parameters

Query parameters
Name Description
h
String
(Optional) Comma-separated list of column names to display. (e.g., health,status,index,uuid,pri,rep,docs.count,docs.deleted,store.size,pri.store.size)
s
String
(Optional) Comma-separated list of column names or column aliases used to sort the response. (e.g., index:desc)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getLogfilter

Get a log filter object

Retrieves the Log Filter specified. Get the ID from <code>LogFilterID</code> of GET /logs/filters.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/logs/filters/{Log Filter ID}?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":{"logFilterID":34,"name":"Administrator Activity","type":1,"condDesc":"ADMIN","mode":0,"treeDisplay":1,"description":"Administrator Activity Log.","sysLogMode":0,"snmpMode":0,"snmpCommunityValue":"******","pageUrlMode":0,"tagIdxList":[]},"data":null}</pre>The filter is in <code>parameter</code>. SNMP secrets (<code>snmpCommunity</code>, <code>snmpAuthPassword</code>, <code>snmpPrivPassword</code>) are returned as ****** when set; <code>isEncrypted</code> is kept only for compatibility. An unknown ID returns 404; a non-numeric ID returns 500.


/logs/filters/{id}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/logs/filters/{id}?isEncrypted="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        String id = 34; // String | Log Filter ID
        Boolean isEncrypted = false; // Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)
        try {
            LogFilterMessageDoc result = apiInstance.getLogfilter(id, isEncrypted);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#getLogfilter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        String id = 34; // String | Log Filter ID
        Boolean isEncrypted = false; // Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)
        try {
            LogFilterMessageDoc result = apiInstance.getLogfilter(id, isEncrypted);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#getLogfilter");
            e.printStackTrace();
        }
    }
}
String *id = 34; // Log Filter ID
Boolean *isEncrypted = false; // (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false) (optional)

LogsApi *apiInstance = [[LogsApi alloc] init];

// Get a log filter object
[apiInstance getLogfilterWith:id
    isEncrypted:isEncrypted
              completionHandler: ^(LogFilterMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var id = 34; // {String} Log Filter ID

var opts = { 
  'isEncrypted': false // {Boolean} (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getLogfilter(id, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLogfilterExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var id = 34;  // String | Log Filter ID
            var isEncrypted = false;  // Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false) (optional) 

            try
            {
                // Get a log filter object
                LogFilterMessageDoc result = apiInstance.getLogfilter(id, isEncrypted);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.getLogfilter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$id = 34; // String | Log Filter ID
$isEncrypted = false; // Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)

try {
    $result = $api_instance->getLogfilter($id, $isEncrypted);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogsApi->getLogfilter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $id = 34; # String | Log Filter ID
my $isEncrypted = false; # Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)

eval { 
    my $result = $api_instance->getLogfilter(id => $id, isEncrypted => $isEncrypted);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogsApi->getLogfilter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
id = 34 # String | Log Filter ID
isEncrypted = false # Boolean | (Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false) (optional)

try: 
    # Get a log filter object
    api_response = api_instance.get_logfilter(id, isEncrypted=isEncrypted)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->getLogfilter: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Log Filter ID
Required
Query parameters
Name Description
isEncrypted
Boolean
(Optional, compatibility) Legacy flag for Bo-layer encryption. REST responses always mask SNMP secrets as ****** regardless of this value. (Default: false)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getLogfilters

List Log Filters

Retrieves a list of the Log Filters. <code>name</code> and <code>description</code> are partial matches. <code>ids</code> is a comma-separated list of Log Filter IDs; a non-numeric ID returns 400.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/logs/filters?apiKey={Key}&amp;page=1&amp;pageSize=30&amp;name=Admin"</pre>Response<pre>{"result":[{"LogFilterID":34,"Name":"Administrator Activity","Description":"Administrator Activity Log.","Mode":0,"TreeDisplay":1,"IsStatic":0,"SysLogMode":0,"SnmpMode":0,"PageUrlMode":0}],"total":1,"page":1,"pageSize":30}</pre>Use <code>LogFilterID</code> as the ID in the other Log Filter APIs. An ID that does not exist is not an error; it returns an empty <code>result</code>. <code>view=monitor</code> currently returns an HTML error page.


/logs/filters

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/logs/filters?page=&pageSize=&sort=&view=&ids=&name=&description=&isTreeDisplay=&isStatic="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"Name","dir":"asc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String view = general; // String | View (monitor, general)
        String ids = 34; // String | Log Filter ID
Note: Use a comma to separate entries. String name = Admin; // String | Name String description = Administrator; // String | Description Boolean isTreeDisplay = true; // Boolean | Tree & Log Monitor Configured String isStatic = 0; // String | Is Static try { LogFilterListDoc result = apiInstance.getLogfilters(page, pageSize, sort, view, ids, name, description, isTreeDisplay, isStatic); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#getLogfilters"); e.printStackTrace(); } } }
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"Name","dir":"asc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String view = general; // String | View (monitor, general)
        String ids = 34; // String | Log Filter ID
Note: Use a comma to separate entries. String name = Admin; // String | Name String description = Administrator; // String | Description Boolean isTreeDisplay = true; // Boolean | Tree & Log Monitor Configured String isStatic = 0; // String | Is Static try { LogFilterListDoc result = apiInstance.getLogfilters(page, pageSize, sort, view, ids, name, description, isTreeDisplay, isStatic); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#getLogfilters"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"Name","dir":"asc"}; // Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *view = general; // View (monitor, general) (optional)
String *ids = 34; // Log Filter ID
Note: Use a comma to separate entries. (optional) String *name = Admin; // Name (optional) String *description = Administrator; // Description (optional) Boolean *isTreeDisplay = true; // Tree & Log Monitor Configured (optional) String *isStatic = 0; // Is Static (optional) LogsApi *apiInstance = [[LogsApi alloc] init]; // List Log Filters [apiInstance getLogfiltersWith:page pageSize:pageSize sort:sort view:view ids:ids name:name description:description isTreeDisplay:isTreeDisplay isStatic:isStatic completionHandler: ^(LogFilterListDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"Name","dir":"asc"}, // {String} Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'view': general, // {String} View (monitor, general)
  'ids': 34, // {String} Log Filter ID
Note: Use a comma to separate entries. 'name': Admin, // {String} Name 'description': Administrator, // {String} Description 'isTreeDisplay': true, // {Boolean} Tree & Log Monitor Configured 'isStatic': 0 // {String} Is Static }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getLogfilters(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLogfiltersExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"Name","dir":"asc"};  // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var view = general;  // String | View (monitor, general) (optional) 
            var ids = 34;  // String | Log Filter ID
Note: Use a comma to separate entries. (optional) var name = Admin; // String | Name (optional) var description = Administrator; // String | Description (optional) var isTreeDisplay = true; // Boolean | Tree & Log Monitor Configured (optional) var isStatic = 0; // String | Is Static (optional) try { // List Log Filters LogFilterListDoc result = apiInstance.getLogfilters(page, pageSize, sort, view, ids, name, description, isTreeDisplay, isStatic); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling LogsApi.getLogfilters: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"Name","dir":"asc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$view = general; // String | View (monitor, general)
$ids = 34; // String | Log Filter ID
Note: Use a comma to separate entries. $name = Admin; // String | Name $description = Administrator; // String | Description $isTreeDisplay = true; // Boolean | Tree & Log Monitor Configured $isStatic = 0; // String | Is Static try { $result = $api_instance->getLogfilters($page, $pageSize, $sort, $view, $ids, $name, $description, $isTreeDisplay, $isStatic); print_r($result); } catch (Exception $e) { echo 'Exception when calling LogsApi->getLogfilters: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"Name","dir":"asc"}; # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $view = general; # String | View (monitor, general)
my $ids = 34; # String | Log Filter ID
Note: Use a comma to separate entries. my $name = Admin; # String | Name my $description = Administrator; # String | Description my $isTreeDisplay = true; # Boolean | Tree & Log Monitor Configured my $isStatic = 0; # String | Is Static eval { my $result = $api_instance->getLogfilters(page => $page, pageSize => $pageSize, sort => $sort, view => $view, ids => $ids, name => $name, description => $description, isTreeDisplay => $isTreeDisplay, isStatic => $isStatic); print Dumper($result); }; if ($@) { warn "Exception when calling LogsApi->getLogfilters: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"Name","dir":"asc"} # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
view = general # String | View (monitor, general) (optional)
ids = 34 # String | Log Filter ID
Note: Use a comma to separate entries. (optional) name = Admin # String | Name (optional) description = Administrator # String | Description (optional) isTreeDisplay = true # Boolean | Tree & Log Monitor Configured (optional) isStatic = 0 # String | Is Static (optional) try: # List Log Filters api_response = api_instance.get_logfilters(page, pageSize, sort=sort, view=view, ids=ids, name=name, description=description, isTreeDisplay=isTreeDisplay, isStatic=isStatic) pprint(api_response) except ApiException as e: print("Exception when calling LogsApi->getLogfilters: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
view
String
View (monitor, general)
ids
String
Log Filter ID<br/>Note: Use a comma to separate entries.
name
String
Name
description
String
Description
isTreeDisplay
Boolean
Tree & Log Monitor Configured
isStatic
String
Is Static

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getLogs

List Logs

Retrieves a list of the logs. <code>logschema</code> is required. Without it, the API returns an HTML error page instead of JSON.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/logs?apiKey={Key}&amp;logschema=auditlog&amp;periodType=today&amp;ip=192.168.1.2&amp;page=1&amp;pageSize=30"</pre>Each row in <code>result</code> has <code>LOG_TIME</code> (epoch milliseconds), <code>LOG_IPSTR</code>, <code>LOG_MAC</code>, <code>LOG_TYPESTR</code> and <code>LOG_MSG</code>.


/logs

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/logs?page=&pageSize=&sort=&logschema=&auditlogTypes=&periodType=&startdate=&enddate=&fromtime=&totime=&logfilterid=&ip=&mac=&userid=&username=&description=&loglevel=&logid=&sensorname=&extrainfo=&deptname=&qsearch=&ssid=&nasmac=&nasip=&nasporttype=&nasport=&radiuspolicy=&searchType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String logschema = auditlog; // String | Log Schema
        String sort = {"field":"LOG_TIME","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        array[String] auditlogTypes = node; // array[String] | Auditlog Type (Used when Type is selected as auditlog)
        String periodType = custom; // String | Period
        String startdate = 2026-11-10 00:00:00; // String | Start Date + Time (yyyy-MM-dd HH:mm:ss)
        String enddate = 2026-11-10 23:59:59; // String | End Date + Time (yyyy-MM-dd HH:mm:ss)
        String fromtime = 09:00; // String | From Time (HH:mm)
        String totime = 18:00; // String | To Time (HH:mm)
        String logfilterid = 34; // String | Log Filter ID
        String ip = 192.168.1.2; // String | IP
        String mac = 00:11:22:33:44:55; // String | MAC
        String userid = user01; // String | Username
        String username = Test User; // String | Full Name
        String description = login; // String | Description
        String loglevel = 0,1; // String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. String logid = 116; // String | Log ID
Note: Use a comma to separate entries. String sensorname = sensor01; // String | Node Name of Policy Server String extrainfo = remark; // String | Remarks String deptname = Sales; // String | Department String qsearch = 192.168.1.2; // String | Qsearch String ssid = CORP-WLAN; // String | SSID (only radius log) String nasmac = 00:11:22:33:44:66; // String | NAS MAC (only radius log) String nasip = 192.168.1.1; // String | NAS IP (only radius log) String nasporttype = Wireless-802.11; // String | NAS Port Type
Note: Use a comma to separate entries. String nasport = 1; // String | NAS Port String radiuspolicy = RADIUS_POLICY_A; // String | RADIUS POLICY String searchType = USER_VIEW; // String | Search Type try { LogListDoc result = apiInstance.getLogs(page, pageSize, logschema, sort, auditlogTypes, periodType, startdate, enddate, fromtime, totime, logfilterid, ip, mac, userid, username, description, loglevel, logid, sensorname, extrainfo, deptname, qsearch, ssid, nasmac, nasip, nasporttype, nasport, radiuspolicy, searchType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#getLogs"); e.printStackTrace(); } } }
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String logschema = auditlog; // String | Log Schema
        String sort = {"field":"LOG_TIME","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        array[String] auditlogTypes = node; // array[String] | Auditlog Type (Used when Type is selected as auditlog)
        String periodType = custom; // String | Period
        String startdate = 2026-11-10 00:00:00; // String | Start Date + Time (yyyy-MM-dd HH:mm:ss)
        String enddate = 2026-11-10 23:59:59; // String | End Date + Time (yyyy-MM-dd HH:mm:ss)
        String fromtime = 09:00; // String | From Time (HH:mm)
        String totime = 18:00; // String | To Time (HH:mm)
        String logfilterid = 34; // String | Log Filter ID
        String ip = 192.168.1.2; // String | IP
        String mac = 00:11:22:33:44:55; // String | MAC
        String userid = user01; // String | Username
        String username = Test User; // String | Full Name
        String description = login; // String | Description
        String loglevel = 0,1; // String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. String logid = 116; // String | Log ID
Note: Use a comma to separate entries. String sensorname = sensor01; // String | Node Name of Policy Server String extrainfo = remark; // String | Remarks String deptname = Sales; // String | Department String qsearch = 192.168.1.2; // String | Qsearch String ssid = CORP-WLAN; // String | SSID (only radius log) String nasmac = 00:11:22:33:44:66; // String | NAS MAC (only radius log) String nasip = 192.168.1.1; // String | NAS IP (only radius log) String nasporttype = Wireless-802.11; // String | NAS Port Type
Note: Use a comma to separate entries. String nasport = 1; // String | NAS Port String radiuspolicy = RADIUS_POLICY_A; // String | RADIUS POLICY String searchType = USER_VIEW; // String | Search Type try { LogListDoc result = apiInstance.getLogs(page, pageSize, logschema, sort, auditlogTypes, periodType, startdate, enddate, fromtime, totime, logfilterid, ip, mac, userid, username, description, loglevel, logid, sensorname, extrainfo, deptname, qsearch, ssid, nasmac, nasip, nasporttype, nasport, radiuspolicy, searchType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling LogsApi#getLogs"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *logschema = auditlog; // Log Schema (default to auditlog)
String *sort = {"field":"LOG_TIME","dir":"desc"}; // Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
array[String] *auditlogTypes = node; // Auditlog Type (Used when Type is selected as auditlog) (optional)
String *periodType = custom; // Period (optional) (default to custom)
String *startdate = 2026-11-10 00:00:00; // Start Date + Time (yyyy-MM-dd HH:mm:ss) (optional)
String *enddate = 2026-11-10 23:59:59; // End Date + Time (yyyy-MM-dd HH:mm:ss) (optional)
String *fromtime = 09:00; // From Time (HH:mm) (optional)
String *totime = 18:00; // To Time (HH:mm) (optional)
String *logfilterid = 34; // Log Filter ID (optional)
String *ip = 192.168.1.2; // IP (optional)
String *mac = 00:11:22:33:44:55; // MAC (optional)
String *userid = user01; // Username (optional)
String *username = Test User; // Full Name (optional)
String *description = login; // Description (optional)
String *loglevel = 0,1; // Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. (optional) String *logid = 116; // Log ID
Note: Use a comma to separate entries. (optional) String *sensorname = sensor01; // Node Name of Policy Server (optional) String *extrainfo = remark; // Remarks (optional) String *deptname = Sales; // Department (optional) String *qsearch = 192.168.1.2; // Qsearch (optional) String *ssid = CORP-WLAN; // SSID (only radius log) (optional) String *nasmac = 00:11:22:33:44:66; // NAS MAC (only radius log) (optional) String *nasip = 192.168.1.1; // NAS IP (only radius log) (optional) String *nasporttype = Wireless-802.11; // NAS Port Type
Note: Use a comma to separate entries. (optional) String *nasport = 1; // NAS Port (optional) String *radiuspolicy = RADIUS_POLICY_A; // RADIUS POLICY (optional) String *searchType = USER_VIEW; // Search Type (optional) (default to USER_VIEW) LogsApi *apiInstance = [[LogsApi alloc] init]; // List Logs [apiInstance getLogsWith:page pageSize:pageSize logschema:logschema sort:sort auditlogTypes:auditlogTypes periodType:periodType startdate:startdate enddate:enddate fromtime:fromtime totime:totime logfilterid:logfilterid ip:ip mac:mac userid:userid username:username description:description loglevel:loglevel logid:logid sensorname:sensorname extrainfo:extrainfo deptname:deptname qsearch:qsearch ssid:ssid nasmac:nasmac nasip:nasip nasporttype:nasporttype nasport:nasport radiuspolicy:radiuspolicy searchType:searchType completionHandler: ^(LogListDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var logschema = auditlog; // {String} Log Schema

var opts = { 
  'sort': {"field":"LOG_TIME","dir":"desc"}, // {String} Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'auditlogTypes': node, // {array[String]} Auditlog Type (Used when Type is selected as auditlog)
  'periodType': custom, // {String} Period
  'startdate': 2026-11-10 00:00:00, // {String} Start Date + Time (yyyy-MM-dd HH:mm:ss)
  'enddate': 2026-11-10 23:59:59, // {String} End Date + Time (yyyy-MM-dd HH:mm:ss)
  'fromtime': 09:00, // {String} From Time (HH:mm)
  'totime': 18:00, // {String} To Time (HH:mm)
  'logfilterid': 34, // {String} Log Filter ID
  'ip': 192.168.1.2, // {String} IP
  'mac': 00:11:22:33:44:55, // {String} MAC
  'userid': user01, // {String} Username
  'username': Test User, // {String} Full Name
  'description': login, // {String} Description
  'loglevel': 0,1, // {String} Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. 'logid': 116, // {String} Log ID
Note: Use a comma to separate entries. 'sensorname': sensor01, // {String} Node Name of Policy Server 'extrainfo': remark, // {String} Remarks 'deptname': Sales, // {String} Department 'qsearch': 192.168.1.2, // {String} Qsearch 'ssid': CORP-WLAN, // {String} SSID (only radius log) 'nasmac': 00:11:22:33:44:66, // {String} NAS MAC (only radius log) 'nasip': 192.168.1.1, // {String} NAS IP (only radius log) 'nasporttype': Wireless-802.11, // {String} NAS Port Type
Note: Use a comma to separate entries. 'nasport': 1, // {String} NAS Port 'radiuspolicy': RADIUS_POLICY_A, // {String} RADIUS POLICY 'searchType': USER_VIEW // {String} Search Type }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getLogs(page, pageSize, logschema, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getLogsExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var logschema = auditlog;  // String | Log Schema (default to auditlog)
            var sort = {"field":"LOG_TIME","dir":"desc"};  // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var auditlogTypes = new array[String](); // array[String] | Auditlog Type (Used when Type is selected as auditlog) (optional) 
            var periodType = custom;  // String | Period (optional)  (default to custom)
            var startdate = 2026-11-10 00:00:00;  // String | Start Date + Time (yyyy-MM-dd HH:mm:ss) (optional) 
            var enddate = 2026-11-10 23:59:59;  // String | End Date + Time (yyyy-MM-dd HH:mm:ss) (optional) 
            var fromtime = 09:00;  // String | From Time (HH:mm) (optional) 
            var totime = 18:00;  // String | To Time (HH:mm) (optional) 
            var logfilterid = 34;  // String | Log Filter ID (optional) 
            var ip = 192.168.1.2;  // String | IP (optional) 
            var mac = 00:11:22:33:44:55;  // String | MAC (optional) 
            var userid = user01;  // String | Username (optional) 
            var username = Test User;  // String | Full Name (optional) 
            var description = login;  // String | Description (optional) 
            var loglevel = 0,1;  // String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. (optional) var logid = 116; // String | Log ID
Note: Use a comma to separate entries. (optional) var sensorname = sensor01; // String | Node Name of Policy Server (optional) var extrainfo = remark; // String | Remarks (optional) var deptname = Sales; // String | Department (optional) var qsearch = 192.168.1.2; // String | Qsearch (optional) var ssid = CORP-WLAN; // String | SSID (only radius log) (optional) var nasmac = 00:11:22:33:44:66; // String | NAS MAC (only radius log) (optional) var nasip = 192.168.1.1; // String | NAS IP (only radius log) (optional) var nasporttype = Wireless-802.11; // String | NAS Port Type
Note: Use a comma to separate entries. (optional) var nasport = 1; // String | NAS Port (optional) var radiuspolicy = RADIUS_POLICY_A; // String | RADIUS POLICY (optional) var searchType = USER_VIEW; // String | Search Type (optional) (default to USER_VIEW) try { // List Logs LogListDoc result = apiInstance.getLogs(page, pageSize, logschema, sort, auditlogTypes, periodType, startdate, enddate, fromtime, totime, logfilterid, ip, mac, userid, username, description, loglevel, logid, sensorname, extrainfo, deptname, qsearch, ssid, nasmac, nasip, nasporttype, nasport, radiuspolicy, searchType); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling LogsApi.getLogs: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$logschema = auditlog; // String | Log Schema
$sort = {"field":"LOG_TIME","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$auditlogTypes = node; // array[String] | Auditlog Type (Used when Type is selected as auditlog)
$periodType = custom; // String | Period
$startdate = 2026-11-10 00:00:00; // String | Start Date + Time (yyyy-MM-dd HH:mm:ss)
$enddate = 2026-11-10 23:59:59; // String | End Date + Time (yyyy-MM-dd HH:mm:ss)
$fromtime = 09:00; // String | From Time (HH:mm)
$totime = 18:00; // String | To Time (HH:mm)
$logfilterid = 34; // String | Log Filter ID
$ip = 192.168.1.2; // String | IP
$mac = 00:11:22:33:44:55; // String | MAC
$userid = user01; // String | Username
$username = Test User; // String | Full Name
$description = login; // String | Description
$loglevel = 0,1; // String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. $logid = 116; // String | Log ID
Note: Use a comma to separate entries. $sensorname = sensor01; // String | Node Name of Policy Server $extrainfo = remark; // String | Remarks $deptname = Sales; // String | Department $qsearch = 192.168.1.2; // String | Qsearch $ssid = CORP-WLAN; // String | SSID (only radius log) $nasmac = 00:11:22:33:44:66; // String | NAS MAC (only radius log) $nasip = 192.168.1.1; // String | NAS IP (only radius log) $nasporttype = Wireless-802.11; // String | NAS Port Type
Note: Use a comma to separate entries. $nasport = 1; // String | NAS Port $radiuspolicy = RADIUS_POLICY_A; // String | RADIUS POLICY $searchType = USER_VIEW; // String | Search Type try { $result = $api_instance->getLogs($page, $pageSize, $logschema, $sort, $auditlogTypes, $periodType, $startdate, $enddate, $fromtime, $totime, $logfilterid, $ip, $mac, $userid, $username, $description, $loglevel, $logid, $sensorname, $extrainfo, $deptname, $qsearch, $ssid, $nasmac, $nasip, $nasporttype, $nasport, $radiuspolicy, $searchType); print_r($result); } catch (Exception $e) { echo 'Exception when calling LogsApi->getLogs: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $logschema = auditlog; # String | Log Schema
my $sort = {"field":"LOG_TIME","dir":"desc"}; # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $auditlogTypes = [node]; # array[String] | Auditlog Type (Used when Type is selected as auditlog)
my $periodType = custom; # String | Period
my $startdate = 2026-11-10 00:00:00; # String | Start Date + Time (yyyy-MM-dd HH:mm:ss)
my $enddate = 2026-11-10 23:59:59; # String | End Date + Time (yyyy-MM-dd HH:mm:ss)
my $fromtime = 09:00; # String | From Time (HH:mm)
my $totime = 18:00; # String | To Time (HH:mm)
my $logfilterid = 34; # String | Log Filter ID
my $ip = 192.168.1.2; # String | IP
my $mac = 00:11:22:33:44:55; # String | MAC
my $userid = user01; # String | Username
my $username = Test User; # String | Full Name
my $description = login; # String | Description
my $loglevel = 0,1; # String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. my $logid = 116; # String | Log ID
Note: Use a comma to separate entries. my $sensorname = sensor01; # String | Node Name of Policy Server my $extrainfo = remark; # String | Remarks my $deptname = Sales; # String | Department my $qsearch = 192.168.1.2; # String | Qsearch my $ssid = CORP-WLAN; # String | SSID (only radius log) my $nasmac = 00:11:22:33:44:66; # String | NAS MAC (only radius log) my $nasip = 192.168.1.1; # String | NAS IP (only radius log) my $nasporttype = Wireless-802.11; # String | NAS Port Type
Note: Use a comma to separate entries. my $nasport = 1; # String | NAS Port my $radiuspolicy = RADIUS_POLICY_A; # String | RADIUS POLICY my $searchType = USER_VIEW; # String | Search Type eval { my $result = $api_instance->getLogs(page => $page, pageSize => $pageSize, logschema => $logschema, sort => $sort, auditlogTypes => $auditlogTypes, periodType => $periodType, startdate => $startdate, enddate => $enddate, fromtime => $fromtime, totime => $totime, logfilterid => $logfilterid, ip => $ip, mac => $mac, userid => $userid, username => $username, description => $description, loglevel => $loglevel, logid => $logid, sensorname => $sensorname, extrainfo => $extrainfo, deptname => $deptname, qsearch => $qsearch, ssid => $ssid, nasmac => $nasmac, nasip => $nasip, nasporttype => $nasporttype, nasport => $nasport, radiuspolicy => $radiuspolicy, searchType => $searchType); print Dumper($result); }; if ($@) { warn "Exception when calling LogsApi->getLogs: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
logschema = auditlog # String | Log Schema (default to auditlog)
sort = {"field":"LOG_TIME","dir":"desc"} # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
auditlogTypes = node # array[String] | Auditlog Type (Used when Type is selected as auditlog) (optional)
periodType = custom # String | Period (optional) (default to custom)
startdate = 2026-11-10 00:00:00 # String | Start Date + Time (yyyy-MM-dd HH:mm:ss) (optional)
enddate = 2026-11-10 23:59:59 # String | End Date + Time (yyyy-MM-dd HH:mm:ss) (optional)
fromtime = 09:00 # String | From Time (HH:mm) (optional)
totime = 18:00 # String | To Time (HH:mm) (optional)
logfilterid = 34 # String | Log Filter ID (optional)
ip = 192.168.1.2 # String | IP (optional)
mac = 00:11:22:33:44:55 # String | MAC (optional)
userid = user01 # String | Username (optional)
username = Test User # String | Full Name (optional)
description = login # String | Description (optional)
loglevel = 0,1 # String | Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)
Note: Use a comma to separate entries. (optional) logid = 116 # String | Log ID
Note: Use a comma to separate entries. (optional) sensorname = sensor01 # String | Node Name of Policy Server (optional) extrainfo = remark # String | Remarks (optional) deptname = Sales # String | Department (optional) qsearch = 192.168.1.2 # String | Qsearch (optional) ssid = CORP-WLAN # String | SSID (only radius log) (optional) nasmac = 00:11:22:33:44:66 # String | NAS MAC (only radius log) (optional) nasip = 192.168.1.1 # String | NAS IP (only radius log) (optional) nasporttype = Wireless-802.11 # String | NAS Port Type
Note: Use a comma to separate entries. (optional) nasport = 1 # String | NAS Port (optional) radiuspolicy = RADIUS_POLICY_A # String | RADIUS POLICY (optional) searchType = USER_VIEW # String | Search Type (optional) (default to USER_VIEW) try: # List Logs api_response = api_instance.get_logs(page, pageSize, logschema, sort=sort, auditlogTypes=auditlogTypes, periodType=periodType, startdate=startdate, enddate=enddate, fromtime=fromtime, totime=totime, logfilterid=logfilterid, ip=ip, mac=mac, userid=userid, username=username, description=description, loglevel=loglevel, logid=logid, sensorname=sensorname, extrainfo=extrainfo, deptname=deptname, qsearch=qsearch, ssid=ssid, nasmac=nasmac, nasip=nasip, nasporttype=nasporttype, nasport=nasport, radiuspolicy=radiuspolicy, searchType=searchType) pprint(api_response) except ApiException as e: print("Exception when calling LogsApi->getLogs: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
logschema*
String
Log Schema
Required
auditlogTypes
array[String]
Auditlog Type (Used when Type is selected as auditlog)
periodType
String
Period
startdate
String
Start Date + Time (yyyy-MM-dd HH:mm:ss)
enddate
String
End Date + Time (yyyy-MM-dd HH:mm:ss)
fromtime
String
From Time (HH:mm)
totime
String
To Time (HH:mm)
logfilterid
String
Log Filter ID
ip
String
IP
mac
String
MAC
userid
String
Username
username
String
Full Name
description
String
Description
loglevel
String
Log Level (0: Error, 1: Warning, 2: Information, 3: Anomaly)<br/>Note: Use a comma to separate entries.
logid
String
Log ID<br/>Note: Use a comma to separate entries.
sensorname
String
Node Name of Policy Server
extrainfo
String
Remarks
deptname
String
Department
qsearch
String
Qsearch
ssid
String
SSID (only radius log)
nasmac
String
NAS MAC (only radius log)
nasip
String
NAS IP (only radius log)
nasporttype
String
NAS Port Type<br/>Note: Use a comma to separate entries.
nasport
String
NAS Port
radiuspolicy
String
RADIUS POLICY
searchType
String
Search Type

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found


updateLogfilter

Update an existing log filter

Updates an existing Log Filter. Put the ID in <code>logFilterID</code> of the body.<br/>The update replaces the whole filter: fields left out are saved as empty. Get the filter with GET /logs/filters/{id}, change the fields and send the whole object back. Send <code>snmp*Value</code> as ****** to keep the stored SNMP secrets.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/logs/filters?apiKey={Key}" -H "Content-Type: application/json" -d '{"logFilterID":517,"name":"FILTER_A","description":"Changed","condDesc":"ADMIN","mode":0,"treeDisplay":0,"pageUrlMode":0}'</pre>Response<pre>{"code":200,"message":"","parameter":{"logFilterID":517,"name":"FILTER_A","description":"Changed",...},"data":null}</pre>Check <code>code</code> in the body; for example a body without <code>logFilterID</code> returns HTTP 200 with <code>code</code> 500. An invalid <code>pageUrlMode</code> returns 400.


/logs/filters

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/logs/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.LogsApi;

import java.io.File;
import java.util.*;

public class LogsApiExample {

    public static void main(String[] args) {
        
        LogsApi apiInstance = new LogsApi();
        LogFilterVo body = ; // LogFilterVo | Log Filter
        try {
            LogFilterMessageDoc result = apiInstance.updateLogfilter(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#updateLogfilter");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.LogsApi;

public class LogsApiExample {

    public static void main(String[] args) {
        LogsApi apiInstance = new LogsApi();
        LogFilterVo body = ; // LogFilterVo | Log Filter
        try {
            LogFilterMessageDoc result = apiInstance.updateLogfilter(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling LogsApi#updateLogfilter");
            e.printStackTrace();
        }
    }
}
LogFilterVo *body = ; // Log Filter

LogsApi *apiInstance = [[LogsApi alloc] init];

// Update an existing log filter
[apiInstance updateLogfilterWith:body
              completionHandler: ^(LogFilterMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.LogsApi()

var body = ; // {LogFilterVo} Log Filter


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateLogfilter(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateLogfilterExample
    {
        public void main()
        {
            
            var apiInstance = new LogsApi();
            var body = new LogFilterVo(); // LogFilterVo | Log Filter

            try
            {
                // Update an existing log filter
                LogFilterMessageDoc result = apiInstance.updateLogfilter(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling LogsApi.updateLogfilter: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\LogsApi();
$body = ; // LogFilterVo | Log Filter

try {
    $result = $api_instance->updateLogfilter($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling LogsApi->updateLogfilter: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::LogsApi;

my $api_instance = WWW::SwaggerClient::LogsApi->new();
my $body = WWW::SwaggerClient::Object::LogFilterVo->new(); # LogFilterVo | Log Filter

eval { 
    my $result = $api_instance->updateLogfilter(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling LogsApi->updateLogfilter: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.LogsApi()
body =  # LogFilterVo | Log Filter

try: 
    # Update an existing log filter
    api_response = api_instance.update_logfilter(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling LogsApi->updateLogfilter: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Mac

getMACCustomFields

Get custom fields of mac

Retrieves the custom fields of the MAC policy of the MAC address specified. <code>snid</code> is accepted but not used for the MAC lookup.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/mac/customfields?apiKey={Key}&amp;mac=00:11:22:33:44:55&amp;snid={Sensor Node ID}"</pre>Response<pre>{"code":200,"message":"","parameter":"00:11:22:33:44:55","data":[{"CONF_KEY":"macip_custom01","CONF_DISP":"Asset No","CONF_VALUE":"A-001"}]}</pre><code>data</code> lists the visible custom fields: <code>CONF_KEY</code> (macip_custom01 to 20), <code>CONF_DISP</code> and <code>CONF_VALUE</code> (the current value). It is empty when no custom field is configured. Always HTTP 200; when the policy or the field template is not found, the body has <code>code</code> 404.


/mac/customfields

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/mac/customfields?mac=&snid="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MacApi;

import java.io.File;
import java.util.*;

public class MacApiExample {

    public static void main(String[] args) {
        
        MacApi apiInstance = new MacApi();
        String mac = 00:11:22:33:44:55; // String | mac
        String snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid
        try {
            MacCustomFieldsMessageDoc result = apiInstance.getMACCustomFields(mac, snid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#getMACCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MacApi;

public class MacApiExample {

    public static void main(String[] args) {
        MacApi apiInstance = new MacApi();
        String mac = 00:11:22:33:44:55; // String | mac
        String snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid
        try {
            MacCustomFieldsMessageDoc result = apiInstance.getMACCustomFields(mac, snid);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#getMACCustomFields");
            e.printStackTrace();
        }
    }
}
String *mac = 00:11:22:33:44:55; // mac
String *snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // sensor nid

MacApi *apiInstance = [[MacApi alloc] init];

// Get custom fields of mac
[apiInstance getMACCustomFieldsWith:mac
    snid:snid
              completionHandler: ^(MacCustomFieldsMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.MacApi()

var mac = 00:11:22:33:44:55; // {String} mac

var snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} sensor nid


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMACCustomFields(mac, snid, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMACCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new MacApi();
            var mac = 00:11:22:33:44:55;  // String | mac
            var snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | sensor nid

            try
            {
                // Get custom fields of mac
                MacCustomFieldsMessageDoc result = apiInstance.getMACCustomFields(mac, snid);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MacApi.getMACCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MacApi();
$mac = 00:11:22:33:44:55; // String | mac
$snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | sensor nid

try {
    $result = $api_instance->getMACCustomFields($mac, $snid);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MacApi->getMACCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MacApi;

my $api_instance = WWW::SwaggerClient::MacApi->new();
my $mac = 00:11:22:33:44:55; # String | mac
my $snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | sensor nid

eval { 
    my $result = $api_instance->getMACCustomFields(mac => $mac, snid => $snid);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MacApi->getMACCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MacApi()
mac = 00:11:22:33:44:55 # String | mac
snid = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | sensor nid

try: 
    # Get custom fields of mac
    api_response = api_instance.get_mac_custom_fields(mac, snid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MacApi->getMACCustomFields: %s\n" % e)

Parameters

Query parameters
Name Description
mac*
String
mac
Required
snid*
String
sensor nid
Required

Responses

Status: 200 - Success


updateMACCustomFields

Update custom fields of mac

Updates the custom fields of a MAC policy. The row is selected by <code>trustMAC</code> and <code>trustIPString</code> (and <code>sensorNID</code> when set), as stored in the MAC policy.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/mac/customfields?apiKey={Key}" -H "Content-Type: application/json" -d '{"trustMAC":"00:11:22:33:44:55","trustIPString":"","macip_custom01":"A-001"}'</pre>Response<pre>{"code":200,"message":"","parameter":{"trustMAC":"00:11:22:33:44:55",...},"data":null}</pre>The update writes all 20 fields <code>macip_custom01</code> to <code>macip_custom20</code>; fields left out are cleared, so send all current values. Always HTTP 200; check <code>code</code> in the body (500 when nothing is updated).


/mac/customfields

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/mac/customfields"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MacApi;

import java.io.File;
import java.util.*;

public class MacApiExample {

    public static void main(String[] args) {
        
        MacApi apiInstance = new MacApi();
        IPM_TrustMACIPVo body = ; // IPM_TrustMACIPVo | mac custom fields
        try {
            MacCustomFieldsUpdateDoc result = apiInstance.updateMACCustomFields(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#updateMACCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MacApi;

public class MacApiExample {

    public static void main(String[] args) {
        MacApi apiInstance = new MacApi();
        IPM_TrustMACIPVo body = ; // IPM_TrustMACIPVo | mac custom fields
        try {
            MacCustomFieldsUpdateDoc result = apiInstance.updateMACCustomFields(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#updateMACCustomFields");
            e.printStackTrace();
        }
    }
}
IPM_TrustMACIPVo *body = ; // mac custom fields

MacApi *apiInstance = [[MacApi alloc] init];

// Update custom fields of mac
[apiInstance updateMACCustomFieldsWith:body
              completionHandler: ^(MacCustomFieldsUpdateDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.MacApi()

var body = ; // {IPM_TrustMACIPVo} mac custom fields


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateMACCustomFields(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMACCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new MacApi();
            var body = new IPM_TrustMACIPVo(); // IPM_TrustMACIPVo | mac custom fields

            try
            {
                // Update custom fields of mac
                MacCustomFieldsUpdateDoc result = apiInstance.updateMACCustomFields(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MacApi.updateMACCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MacApi();
$body = ; // IPM_TrustMACIPVo | mac custom fields

try {
    $result = $api_instance->updateMACCustomFields($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MacApi->updateMACCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MacApi;

my $api_instance = WWW::SwaggerClient::MacApi->new();
my $body = WWW::SwaggerClient::Object::IPM_TrustMACIPVo->new(); # IPM_TrustMACIPVo | mac custom fields

eval { 
    my $result = $api_instance->updateMACCustomFields(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MacApi->updateMACCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MacApi()
body =  # IPM_TrustMACIPVo | mac custom fields

try: 
    # Update custom fields of mac
    api_response = api_instance.update_mac_custom_fields(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MacApi->updateMACCustomFields: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success


updateMACPolicy

Configure MAC Policy

Sets the MAC policy of one or more MAC addresses. The body is an array; each element has <code>cmd</code>, <code>targetMAC</code> and, for the change prevention commands, <code>specifyIPs</code>. <code>ipmMAC.beginTime</code> and <code>ipmMAC.expireTime</code> set the period.<br/>&bull; macdeny: Deny MAC<br/>&bull; macallow: Allow MAC - Disable Change Prevention<br/>&bull; appointblockipchange: Allow MAC - Enable Change Prevention (Allow Specified IP(s) - Specified IP(s) Network)<br/>&bull; blockipchange: Allow MAC - Enable Change Prevention (Allow Specified IP(s) - All Networks)<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/mac/policies?apiKey={Key}" -H "Content-Type: application/json" -d '[{"cmd":"blockipchange","targetMAC":"00:11:22:33:44:55","specifyIPs":["192.168.1.2"]}]'</pre>Response<pre>{"success":[{"code":200,...}],"fail":[]}</pre>Always HTTP 200; check <code>fail</code> (400 invalid MAC, 404 no node with the MAC, 500 save failure). An unknown <code>cmd</code> is treated as macdeny.


/mac/policies

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/mac/policies"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.MacApi;

import java.io.File;
import java.util.*;

public class MacApiExample {

    public static void main(String[] args) {
        
        MacApi apiInstance = new MacApi();
        array[MAC Policy Value Object] body = ; // array[MAC Policy Value Object] | Policy Data
        try {
            MacPolicyResultDoc result = apiInstance.updateMACPolicy(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#updateMACPolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.MacApi;

public class MacApiExample {

    public static void main(String[] args) {
        MacApi apiInstance = new MacApi();
        array[MAC Policy Value Object] body = ; // array[MAC Policy Value Object] | Policy Data
        try {
            MacPolicyResultDoc result = apiInstance.updateMACPolicy(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling MacApi#updateMACPolicy");
            e.printStackTrace();
        }
    }
}
array[MAC Policy Value Object] *body = ; // Policy Data

MacApi *apiInstance = [[MacApi alloc] init];

// Configure MAC Policy
[apiInstance updateMACPolicyWith:body
              completionHandler: ^(MacPolicyResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.MacApi()

var body = ; // {array[MAC Policy Value Object]} Policy Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateMACPolicy(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMACPolicyExample
    {
        public void main()
        {
            
            var apiInstance = new MacApi();
            var body = new array[MAC Policy Value Object](); // array[MAC Policy Value Object] | Policy Data

            try
            {
                // Configure MAC Policy
                MacPolicyResultDoc result = apiInstance.updateMACPolicy(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling MacApi.updateMACPolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\MacApi();
$body = ; // array[MAC Policy Value Object] | Policy Data

try {
    $result = $api_instance->updateMACPolicy($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling MacApi->updateMACPolicy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::MacApi;

my $api_instance = WWW::SwaggerClient::MacApi->new();
my $body = [WWW::SwaggerClient::Object::array[MAC Policy Value Object]->new()]; # array[MAC Policy Value Object] | Policy Data

eval { 
    my $result = $api_instance->updateMACPolicy(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling MacApi->updateMACPolicy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.MacApi()
body =  # array[MAC Policy Value Object] | Policy Data

try: 
    # Configure MAC Policy
    api_response = api_instance.update_mac_policy(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling MacApi->updateMACPolicy: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 500 - Internal Server Error


Nodegroups

createNodeGroup

Add a new Node Group

Adds a new Node Group. <code>subj_name</code>, <code>subj_type</code> (1: Policy group) and at least one condition in <code>filterList</code> are required. <code>policyAutoApply</code> defaults to 1 (apply the policy after the change); 0 leaves it for a manual apply.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodegroups?apiKey={Key}" -H "Content-Type: application/json" -d '{"subj_name":"GROUP_A","subj_desc":"sample","subj_type":1,"filterList":[{"ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2","ft_disp":"192.168.1.2"}]}'</pre>Response<pre>{"code":200,"message":"","parameter":null,"data":null}</pre>The new ID is not returned. Look it up with GET /nodegroups?name=GROUP_A (<code>SUBJ_ID</code>).<br/>Errors (400): duplicate name, empty <code>filterList</code>, invalid <code>subj_type</code>, missing or invalid name.


/nodegroups

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodegroups?policyAutoApply="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        SubjVo body = ; // SubjVo | SubjVo JSON Data
        String policyAutoApply = 1; // String | Policy auto apply
        try {
            Message Value Object result = apiInstance.createNodeGroup(body, policyAutoApply);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#createNodeGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        SubjVo body = ; // SubjVo | SubjVo JSON Data
        String policyAutoApply = 1; // String | Policy auto apply
        try {
            Message Value Object result = apiInstance.createNodeGroup(body, policyAutoApply);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#createNodeGroup");
            e.printStackTrace();
        }
    }
}
SubjVo *body = ; // SubjVo JSON Data
String *policyAutoApply = 1; // Policy auto apply (optional) (default to 1)

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Add a new Node Group
[apiInstance createNodeGroupWith:body
    policyAutoApply:policyAutoApply
              completionHandler: ^(Message Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var body = ; // {SubjVo} SubjVo JSON Data

var opts = { 
  'policyAutoApply': 1 // {String} Policy auto apply
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNodeGroup(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNodeGroupExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var body = new SubjVo(); // SubjVo | SubjVo JSON Data
            var policyAutoApply = 1;  // String | Policy auto apply (optional)  (default to 1)

            try
            {
                // Add a new Node Group
                Message Value Object result = apiInstance.createNodeGroup(body, policyAutoApply);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.createNodeGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$body = ; // SubjVo | SubjVo JSON Data
$policyAutoApply = 1; // String | Policy auto apply

try {
    $result = $api_instance->createNodeGroup($body, $policyAutoApply);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->createNodeGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $body = WWW::SwaggerClient::Object::SubjVo->new(); # SubjVo | SubjVo JSON Data
my $policyAutoApply = 1; # String | Policy auto apply

eval { 
    my $result = $api_instance->createNodeGroup(body => $body, policyAutoApply => $policyAutoApply);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->createNodeGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
body =  # SubjVo | SubjVo JSON Data
policyAutoApply = 1 # String | Policy auto apply (optional) (default to 1)

try: 
    # Add a new Node Group
    api_response = api_instance.create_node_group(body, policyAutoApply=policyAutoApply)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->createNodeGroup: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
policyAutoApply
String
Policy auto apply

Responses

Status: 200 - Success

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createNodeGroupFilters

Assign a Condition

Adds conditions to the Node Group specified. The body is a list of conditions (<code>ft_item</code>, <code>ft_op</code>, <code>ft_value</code>, <code>ft_disp</code>). Existing conditions are kept. The policy is applied right after the change.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}/filters?apiKey={Key}" -H "Content-Type: application/json" -d '[{"ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2","ft_disp":"192.168.1.2"}]'</pre>Response<pre>[{"ft_catgry":"SYSTEM","ft_id":"56","ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2","ft_disp":"192.168.1.2","ft_num":0,...}]</pre>The response echoes the request (<code>ft_num</code> is not the stored number). Set <code>ft_disp</code>; without it the condition is shown with an empty value in the UI. Use GET /nodegroups/{id}/filters on an existing group to see valid <code>FT_ITEM</code>/<code>FT_OP</code> pairs.<br/>Errors: 400 for an unknown <code>ft_item</code>, 404 when the Node Group does not exist.


/nodegroups/{id}/filters

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodegroups/{id}/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | Node Group ID
        array[FilterVo] body = ; // array[FilterVo] | FilterVo List
        try {
            array[FilterVo] result = apiInstance.createNodeGroupFilters(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#createNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | Node Group ID
        array[FilterVo] body = ; // array[FilterVo] | FilterVo List
        try {
            array[FilterVo] result = apiInstance.createNodeGroupFilters(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#createNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
String *id = 50; // Node Group ID
array[FilterVo] *body = ; // FilterVo List

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Assign a Condition
[apiInstance createNodeGroupFiltersWith:id
    body:body
              completionHandler: ^(array[FilterVo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var id = 50; // {String} Node Group ID

var body = ; // {array[FilterVo]} FilterVo List


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNodeGroupFilters(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNodeGroupFiltersExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var id = 50;  // String | Node Group ID
            var body = new array[FilterVo](); // array[FilterVo] | FilterVo List

            try
            {
                // Assign a Condition
                array[FilterVo] result = apiInstance.createNodeGroupFilters(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.createNodeGroupFilters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$id = 50; // String | Node Group ID
$body = ; // array[FilterVo] | FilterVo List

try {
    $result = $api_instance->createNodeGroupFilters($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->createNodeGroupFilters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $id = 50; # String | Node Group ID
my $body = [WWW::SwaggerClient::Object::array[FilterVo]->new()]; # array[FilterVo] | FilterVo List

eval { 
    my $result = $api_instance->createNodeGroupFilters(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->createNodeGroupFilters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
id = 50 # String | Node Group ID
body =  # array[FilterVo] | FilterVo List

try: 
    # Assign a Condition
    api_response = api_instance.create_node_group_filters(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->createNodeGroupFilters: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Node Group ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


deleteNodeGroupFilters

Remove the Condition(s)

Removes conditions from the Node Group specified. A condition is removed only when <code>ft_item</code>, <code>ft_op</code> and <code>ft_value</code> all match a stored condition. The policy is applied right after the change.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}/filters?apiKey={Key}" -H "Content-Type: application/json" -d '[{"ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2"}]'</pre>Response<pre>[{"ft_catgry":"SYSTEM","ft_id":"56","ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2",...}]</pre>The response echoes the request. It returns 200 even when no condition matched, so check the result with GET /nodegroups/{id}/filters. Returns 404 when the Node Group does not exist.


/nodegroups/{id}/filters

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodegroups/{id}/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        array[FilterVo] body = ; // array[FilterVo] | FilterVo List
        try {
            array[FilterVo] result = apiInstance.deleteNodeGroupFilters(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#deleteNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        array[FilterVo] body = ; // array[FilterVo] | FilterVo List
        try {
            array[FilterVo] result = apiInstance.deleteNodeGroupFilters(id, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#deleteNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
String *id = 50; // SUBJ_ID
array[FilterVo] *body = ; // FilterVo List

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Remove the Condition(s)
[apiInstance deleteNodeGroupFiltersWith:id
    body:body
              completionHandler: ^(array[FilterVo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var id = 50; // {String} SUBJ_ID

var body = ; // {array[FilterVo]} FilterVo List


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteNodeGroupFilters(id, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNodeGroupFiltersExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var id = 50;  // String | SUBJ_ID
            var body = new array[FilterVo](); // array[FilterVo] | FilterVo List

            try
            {
                // Remove the Condition(s)
                array[FilterVo] result = apiInstance.deleteNodeGroupFilters(id, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.deleteNodeGroupFilters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$id = 50; // String | SUBJ_ID
$body = ; // array[FilterVo] | FilterVo List

try {
    $result = $api_instance->deleteNodeGroupFilters($id, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->deleteNodeGroupFilters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $id = 50; # String | SUBJ_ID
my $body = [WWW::SwaggerClient::Object::array[FilterVo]->new()]; # array[FilterVo] | FilterVo List

eval { 
    my $result = $api_instance->deleteNodeGroupFilters(id => $id, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->deleteNodeGroupFilters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
id = 50 # String | SUBJ_ID
body =  # array[FilterVo] | FilterVo List

try: 
    # Remove the Condition(s)
    api_response = api_instance.delete_node_group_filters(id, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->deleteNodeGroupFilters: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
SUBJ_ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getFavoriteNodeGroups

List Widget Node Groups

Retrieves the Node Groups selected in the Node Group widget of the calling administrator's dashboard, with their node counts.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodegroups/favorite?apiKey={Key}"</pre>Response<pre>[{"SUBJ_ID":"50","SUBJ_NAME":"PC","SUBJ_TYPE":1,"SUBJ_VIEW":"node","NODECNT":120}]</pre>The list follows the dashboard widget settings of the administrator who owns the API key. Returns 404 <code>{"code":404,"message":"Not Found"}</code> when no Node Group is selected in the widget.


/nodegroups/favorite

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodegroups/favorite"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        try {
            array[NodeGrpFavoriteDoc] result = apiInstance.getFavoriteNodeGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getFavoriteNodeGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        try {
            array[NodeGrpFavoriteDoc] result = apiInstance.getFavoriteNodeGroups();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getFavoriteNodeGroups");
            e.printStackTrace();
        }
    }
}

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// List Widget Node Groups
[apiInstance getFavoriteNodeGroupsWithCompletionHandler: 
              ^(array[NodeGrpFavoriteDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getFavoriteNodeGroups(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getFavoriteNodeGroupsExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();

            try
            {
                // List Widget Node Groups
                array[NodeGrpFavoriteDoc] result = apiInstance.getFavoriteNodeGroups();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.getFavoriteNodeGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();

try {
    $result = $api_instance->getFavoriteNodeGroups();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->getFavoriteNodeGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();

eval { 
    my $result = $api_instance->getFavoriteNodeGroups();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->getFavoriteNodeGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()

try: 
    # List Widget Node Groups
    api_response = api_instance.get_favorite_node_groups()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->getFavoriteNodeGroups: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getNodeGroup

Retrieve a specific Node Group's information

Retrieves the information of the Node Group specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}?apiKey={Key}"</pre>The response has <code>nodeGrp</code> (Node Group settings), <code>filters</code> (conditions) and <code>category</code>.


/nodegroups/{id}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodegroups/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            NodeGrpDetailDoc result = apiInstance.getNodeGroup(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            NodeGrpDetailDoc result = apiInstance.getNodeGroup(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroup");
            e.printStackTrace();
        }
    }
}
String *id = 50; // SUBJ_ID

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Retrieve a specific Node Group's information
[apiInstance getNodeGroupWith:id
              completionHandler: ^(NodeGrpDetailDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var id = 50; // {String} SUBJ_ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeGroup(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeGroupExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var id = 50;  // String | SUBJ_ID

            try
            {
                // Retrieve a specific Node Group's information
                NodeGrpDetailDoc result = apiInstance.getNodeGroup(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.getNodeGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$id = 50; // String | SUBJ_ID

try {
    $result = $api_instance->getNodeGroup($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->getNodeGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $id = 50; # String | SUBJ_ID

eval { 
    my $result = $api_instance->getNodeGroup(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->getNodeGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
id = 50 # String | SUBJ_ID

try: 
    # Retrieve a specific Node Group's information
    api_response = api_instance.get_node_group(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->getNodeGroup: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
SUBJ_ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getNodeGroupDelete

Delete a specific Node Group

Deletes the Node Group specified.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":null,"data":null}</pre>Errors: 412 "The Node Group is already in use." when a policy or other setting uses the group; 500 when the Node Group does not exist.


/nodegroups/{id}

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodegroups/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            Message Value Object result = apiInstance.getNodeGroupDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroupDelete");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            Message Value Object result = apiInstance.getNodeGroupDelete(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroupDelete");
            e.printStackTrace();
        }
    }
}
String *id = 50; // SUBJ_ID

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Delete a specific Node Group
[apiInstance getNodeGroupDeleteWith:id
              completionHandler: ^(Message Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var id = 50; // {String} SUBJ_ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeGroupDelete(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeGroupDeleteExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var id = 50;  // String | SUBJ_ID

            try
            {
                // Delete a specific Node Group
                Message Value Object result = apiInstance.getNodeGroupDelete(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.getNodeGroupDelete: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$id = 50; // String | SUBJ_ID

try {
    $result = $api_instance->getNodeGroupDelete($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->getNodeGroupDelete: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $id = 50; # String | SUBJ_ID

eval { 
    my $result = $api_instance->getNodeGroupDelete(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->getNodeGroupDelete: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
id = 50 # String | SUBJ_ID

try: 
    # Delete a specific Node Group
    api_response = api_instance.get_node_group_delete(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->getNodeGroupDelete: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
SUBJ_ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 412 - Precondition Failed

Status: 500 - Internal Server Error


getNodeGroupFilters

Retrieve a specific Node Group's Condition(s)

Retrieves the conditions (filters) of the Node Group specified. Node Group IDs can be imported through the "/mc2/rest/nodegroups" API (<code>SUBJ_ID</code>).<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}/filters?apiKey={Key}"</pre>Response<pre>{"filters":[{"FT_NUM":391,"FT_ITEM":"IP","FT_OP":7,"FT_VALUE":"192.168.1.2","FT_DISP":"192.168.1.2","FU_DISP":"IPv4","FO_DISP":"Equals","HELPTIP":"..."}]}</pre>Returns 404 when the Node Group does not exist or has no condition.


/nodegroups/{id}/filters

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodegroups/{id}/filters"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            NodeGrpFiltersDoc result = apiInstance.getNodeGroupFilters(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        String id = 50; // String | SUBJ_ID
        try {
            NodeGrpFiltersDoc result = apiInstance.getNodeGroupFilters(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroupFilters");
            e.printStackTrace();
        }
    }
}
String *id = 50; // SUBJ_ID

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Retrieve a specific Node Group's Condition(s)
[apiInstance getNodeGroupFiltersWith:id
              completionHandler: ^(NodeGrpFiltersDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var id = 50; // {String} SUBJ_ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeGroupFilters(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeGroupFiltersExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var id = 50;  // String | SUBJ_ID

            try
            {
                // Retrieve a specific Node Group's Condition(s)
                NodeGrpFiltersDoc result = apiInstance.getNodeGroupFilters(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.getNodeGroupFilters: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$id = 50; // String | SUBJ_ID

try {
    $result = $api_instance->getNodeGroupFilters($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->getNodeGroupFilters: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $id = 50; # String | SUBJ_ID

eval { 
    my $result = $api_instance->getNodeGroupFilters(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->getNodeGroupFilters: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
id = 50 # String | SUBJ_ID

try: 
    # Retrieve a specific Node Group's Condition(s)
    api_response = api_instance.get_node_group_filters(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->getNodeGroupFilters: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
SUBJ_ID
Required

Responses

Status: 200 - Successfully retrieved node group filters.

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNodeGroups

List Node Groups

Retrieves a list of the Node Groups.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodegroups?apiKey={Key}"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row has <code>SUBJ_ID</code> (Node Group ID), <code>SUBJ_NAME</code> and <code>SUBJ_NODECOUNT</code>.


/nodegroups

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodegroups?page=&pageSize=&sort=&qsearch=&id=&type=&name=&desc=&objGroupId=&v="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"SUBJ_NAME","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = PC; // String | Search string
        String id = 50; // String | SUBJ_ID
        String type = 1; // String | Type (1: Policy Group, 2: Status Group)
        String name = PC; // String | Node Group name (partial match)
        String desc = PC group; // String | Description
        String objGroupId = 1; // String | Category
        String v = 2; // String | Version
        try {
            NodeGrpListDoc result = apiInstance.getNodeGroups(page, pageSize, sort, qsearch, id, type, name, desc, objGroupId, v);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroups");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"SUBJ_NAME","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = PC; // String | Search string
        String id = 50; // String | SUBJ_ID
        String type = 1; // String | Type (1: Policy Group, 2: Status Group)
        String name = PC; // String | Node Group name (partial match)
        String desc = PC group; // String | Description
        String objGroupId = 1; // String | Category
        String v = 2; // String | Version
        try {
            NodeGrpListDoc result = apiInstance.getNodeGroups(page, pageSize, sort, qsearch, id, type, name, desc, objGroupId, v);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#getNodeGroups");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"SUBJ_NAME","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *qsearch = PC; // Search string (optional)
String *id = 50; // SUBJ_ID (optional)
String *type = 1; // Type (1: Policy Group, 2: Status Group) (optional)
String *name = PC; // Node Group name (partial match) (optional)
String *desc = PC group; // Description (optional)
String *objGroupId = 1; // Category (optional)
String *v = 2; // Version (optional)

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// List Node Groups
[apiInstance getNodeGroupsWith:page
    pageSize:pageSize
    sort:sort
    qsearch:qsearch
    id:id
    type:type
    name:name
    desc:desc
    objGroupId:objGroupId
    v:v
              completionHandler: ^(NodeGrpListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"SUBJ_NAME","dir":"asc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'qsearch': PC, // {String} Search string
  'id': 50, // {String} SUBJ_ID
  'type': 1, // {String} Type (1: Policy Group, 2: Status Group)
  'name': PC, // {String} Node Group name (partial match)
  'desc': PC group, // {String} Description
  'objGroupId': 1, // {String} Category
  'v': 2 // {String} Version
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeGroups(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeGroupsExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"SUBJ_NAME","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var qsearch = PC;  // String | Search string (optional) 
            var id = 50;  // String | SUBJ_ID (optional) 
            var type = 1;  // String | Type (1: Policy Group, 2: Status Group) (optional) 
            var name = PC;  // String | Node Group name (partial match) (optional) 
            var desc = PC group;  // String | Description (optional) 
            var objGroupId = 1;  // String | Category (optional) 
            var v = 2;  // String | Version (optional) 

            try
            {
                // List Node Groups
                NodeGrpListDoc result = apiInstance.getNodeGroups(page, pageSize, sort, qsearch, id, type, name, desc, objGroupId, v);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.getNodeGroups: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"SUBJ_NAME","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$qsearch = PC; // String | Search string
$id = 50; // String | SUBJ_ID
$type = 1; // String | Type (1: Policy Group, 2: Status Group)
$name = PC; // String | Node Group name (partial match)
$desc = PC group; // String | Description
$objGroupId = 1; // String | Category
$v = 2; // String | Version

try {
    $result = $api_instance->getNodeGroups($page, $pageSize, $sort, $qsearch, $id, $type, $name, $desc, $objGroupId, $v);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->getNodeGroups: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"SUBJ_NAME","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $qsearch = PC; # String | Search string
my $id = 50; # String | SUBJ_ID
my $type = 1; # String | Type (1: Policy Group, 2: Status Group)
my $name = PC; # String | Node Group name (partial match)
my $desc = PC group; # String | Description
my $objGroupId = 1; # String | Category
my $v = 2; # String | Version

eval { 
    my $result = $api_instance->getNodeGroups(page => $page, pageSize => $pageSize, sort => $sort, qsearch => $qsearch, id => $id, type => $type, name => $name, desc => $desc, objGroupId => $objGroupId, v => $v);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->getNodeGroups: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"SUBJ_NAME","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
qsearch = PC # String | Search string (optional)
id = 50 # String | SUBJ_ID (optional)
type = 1 # String | Type (1: Policy Group, 2: Status Group) (optional)
name = PC # String | Node Group name (partial match) (optional)
desc = PC group # String | Description (optional)
objGroupId = 1 # String | Category (optional)
v = 2 # String | Version (optional)

try: 
    # List Node Groups
    api_response = api_instance.get_node_groups(page, pageSize, sort=sort, qsearch=qsearch, id=id, type=type, name=name, desc=desc, objGroupId=objGroupId, v=v)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->getNodeGroups: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
qsearch
String
Search string
id
String
SUBJ_ID
type
String
Type (1: Policy Group, 2: Status Group)
name
String
Node Group name (partial match)
desc
String
Description
objGroupId
String
Category
v
String
Version

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


updateNodeGroup

Update an existing Node Group

Updates an existing Node Group. The target is the <code>subj_id</code> in the body; the <code>{id}</code> in the path is not used. The whole group is replaced, so send <code>subj_name</code>, <code>subj_type</code> and the full <code>filterList</code>.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodegroups/{Node Group ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"subj_id":"{Node Group ID}","subj_name":"GROUP_A","subj_desc":"new description","subj_type":1,"filterList":[{"ft_item":"IP","ft_op":7,"ft_value":"192.168.1.2","ft_disp":"192.168.1.2"}]}'</pre>Response<pre>{"code":200,"message":"","parameter":null,"data":null}</pre>The update replaces all conditions with <code>filterList</code>. <code>policyAutoApply</code> defaults to 1.<br/>Errors: 400 when <code>subj_id</code> is missing, <code>filterList</code> is empty or the new name is in use; 500 when the Node Group does not exist.


/nodegroups/{id}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodegroups/{id}?policyAutoApply="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodegroupsApi;

import java.io.File;
import java.util.*;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        
        NodegroupsApi apiInstance = new NodegroupsApi();
        SubjVo body = ; // SubjVo | SubjVo JSON Data
        String policyAutoApply = 1; // String | Policy auto apply
        try {
            Message Value Object result = apiInstance.updateNodeGroup(body, policyAutoApply);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#updateNodeGroup");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodegroupsApi;

public class NodegroupsApiExample {

    public static void main(String[] args) {
        NodegroupsApi apiInstance = new NodegroupsApi();
        SubjVo body = ; // SubjVo | SubjVo JSON Data
        String policyAutoApply = 1; // String | Policy auto apply
        try {
            Message Value Object result = apiInstance.updateNodeGroup(body, policyAutoApply);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodegroupsApi#updateNodeGroup");
            e.printStackTrace();
        }
    }
}
SubjVo *body = ; // SubjVo JSON Data
String *policyAutoApply = 1; // Policy auto apply (optional) (default to 1)

NodegroupsApi *apiInstance = [[NodegroupsApi alloc] init];

// Update an existing Node Group
[apiInstance updateNodeGroupWith:body
    policyAutoApply:policyAutoApply
              completionHandler: ^(Message Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodegroupsApi()

var body = ; // {SubjVo} SubjVo JSON Data

var opts = { 
  'policyAutoApply': 1 // {String} Policy auto apply
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateNodeGroup(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNodeGroupExample
    {
        public void main()
        {
            
            var apiInstance = new NodegroupsApi();
            var body = new SubjVo(); // SubjVo | SubjVo JSON Data
            var policyAutoApply = 1;  // String | Policy auto apply (optional)  (default to 1)

            try
            {
                // Update an existing Node Group
                Message Value Object result = apiInstance.updateNodeGroup(body, policyAutoApply);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodegroupsApi.updateNodeGroup: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodegroupsApi();
$body = ; // SubjVo | SubjVo JSON Data
$policyAutoApply = 1; // String | Policy auto apply

try {
    $result = $api_instance->updateNodeGroup($body, $policyAutoApply);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodegroupsApi->updateNodeGroup: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodegroupsApi;

my $api_instance = WWW::SwaggerClient::NodegroupsApi->new();
my $body = WWW::SwaggerClient::Object::SubjVo->new(); # SubjVo | SubjVo JSON Data
my $policyAutoApply = 1; # String | Policy auto apply

eval { 
    my $result = $api_instance->updateNodeGroup(body => $body, policyAutoApply => $policyAutoApply);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodegroupsApi->updateNodeGroup: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodegroupsApi()
body =  # SubjVo | SubjVo JSON Data
policyAutoApply = 1 # String | Policy auto apply (optional) (default to 1)

try: 
    # Update an existing Node Group
    api_response = api_instance.update_node_group(body, policyAutoApply=policyAutoApply)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodegroupsApi->updateNodeGroup: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
policyAutoApply
String
Policy auto apply

Responses

Status: 200 - Success

Status: 204 - No Content

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Nodes

auth

Require a specific IP (MAC)'s User Authentication

Authenticates a user on the Nodes found by IP or MAC. Form data: <code>userId</code>, <code>passwd</code>, <code>ip</code> and/or <code>mac</code>, <code>passCheck</code> (1: check password), <code>scope</code>: <code>singleUpNode</code>, <code>allUpNode</code>, <code>singleNode</code>, <code>allNode</code> (single* fails when more than one node matches; *UpNode only UP nodes).<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodes/auth?apiKey={Key}" --data-urlencode "userId=user01" --data-urlencode "passwd={Password}" --data-urlencode "ip=192.168.1.2" --data-urlencode "passCheck=1" --data-urlencode "scope=singleUpNode"</pre>Response<pre>{"nodes":[{"ip":"192.168.1.2","mac":"00:11:22:33:44:55","nodeId":"{Node ID}","resultCode":0}]}</pre>Errors: 206 when only some nodes succeed, 406 when all fail or too many nodes match, 404 when no node matches, 400 for an invalid IP/MAC. <code>scope</code> is required: without it an HTML error page is returned with HTTP 200.


/nodes/auth

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodes/auth"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String userId = user01; // String | Username (USER_ID)
        String passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
        String scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes String passwd = password1; // String | Password String ip = 192.168.1.2; // String | IP String mac = 00:11:22:33:44:55; // String | MAC try { NodeAuthListDoc result = apiInstance.auth(userId, passCheck, scope, passwd, ip, mac); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NodesApi#auth"); e.printStackTrace(); } } }
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String userId = user01; // String | Username (USER_ID)
        String passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
        String scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes String passwd = password1; // String | Password String ip = 192.168.1.2; // String | IP String mac = 00:11:22:33:44:55; // String | MAC try { NodeAuthListDoc result = apiInstance.auth(userId, passCheck, scope, passwd, ip, mac); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NodesApi#auth"); e.printStackTrace(); } } }
String *userId = user01; // Username (USER_ID)
String *passCheck = 1; // Password check (1: Check, Leave blank not to check) (default to 1)
String *scope = singleUpNode; // Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) String *passwd = password1; // Password (optional) String *ip = 192.168.1.2; // IP (optional) String *mac = 00:11:22:33:44:55; // MAC (optional) NodesApi *apiInstance = [[NodesApi alloc] init]; // Require a specific IP (MAC)'s User Authentication [apiInstance authWith:userId passCheck:passCheck scope:scope passwd:passwd ip:ip mac:mac completionHandler: ^(NodeAuthListDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var userId = user01; // {String} Username (USER_ID)

var passCheck = 1; // {String} Password check (1: Check, Leave blank not to check)

var scope = singleUpNode; // {String} Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes var opts = { 'passwd': password1, // {String} Password 'ip': 192.168.1.2, // {String} IP 'mac': 00:11:22:33:44:55 // {String} MAC }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.auth(userId, passCheck, scope, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class authExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var userId = user01;  // String | Username (USER_ID)
            var passCheck = 1;  // String | Password check (1: Check, Leave blank not to check) (default to 1)
            var scope = singleUpNode;  // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) var passwd = password1; // String | Password (optional) var ip = 192.168.1.2; // String | IP (optional) var mac = 00:11:22:33:44:55; // String | MAC (optional) try { // Require a specific IP (MAC)'s User Authentication NodeAuthListDoc result = apiInstance.auth(userId, passCheck, scope, passwd, ip, mac); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling NodesApi.auth: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$userId = user01; // String | Username (USER_ID)
$passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
$scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes $passwd = password1; // String | Password $ip = 192.168.1.2; // String | IP $mac = 00:11:22:33:44:55; // String | MAC try { $result = $api_instance->auth($userId, $passCheck, $scope, $passwd, $ip, $mac); print_r($result); } catch (Exception $e) { echo 'Exception when calling NodesApi->auth: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $userId = user01; # String | Username (USER_ID)
my $passCheck = 1; # String | Password check (1: Check, Leave blank not to check)
my $scope = singleUpNode; # String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes my $passwd = password1; # String | Password my $ip = 192.168.1.2; # String | IP my $mac = 00:11:22:33:44:55; # String | MAC eval { my $result = $api_instance->auth(userId => $userId, passCheck => $passCheck, scope => $scope, passwd => $passwd, ip => $ip, mac => $mac); print Dumper($result); }; if ($@) { warn "Exception when calling NodesApi->auth: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
userId = user01 # String | Username (USER_ID)
passCheck = 1 # String | Password check (1: Check, Leave blank not to check) (default to 1)
scope = singleUpNode # String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) passwd = password1 # String | Password (optional) ip = 192.168.1.2 # String | IP (optional) mac = 00:11:22:33:44:55 # String | MAC (optional) try: # Require a specific IP (MAC)'s User Authentication api_response = api_instance.auth(userId, passCheck, scope, passwd=passwd, ip=ip, mac=mac) pprint(api_response) except ApiException as e: print("Exception when calling NodesApi->auth: %s\n" % e)

Parameters

Form parameters
Name Description
userId*
String
Username (USER_ID)
Required
passwd
String
Password
ip
String
IP
mac
String
MAC
passCheck*
String
Password check (1: Check, Leave blank not to check)
Required
scope*
String
Scope<br/>singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes
Required

Responses

Status: 200 - Success

Status: 206 - Partial Content

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 500 - Internal Server Error


commandToNode

Run a specific Node's Task

Runs a node command (Task) on the Node specified, for example <code>ipDeny</code>, <code>ipAllow</code>, <code>macDeny</code>, <code>macAllow</code>, <code>ipProtect</code>, <code>unAuth</code>, <code>wakeOnLan</code>, <code>sendInstantMsg</code>. The body is form data: <code>comment</code> (logged as the reason) and <code>parameter</code> (JSON for commands that need it).<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/ipDeny?apiKey={Key}" --data-urlencode "comment=blocked by API"</pre>Response<pre>{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2",...}</pre>The response is the Node. Returns 404 for an unknown Node ID and 500 when the command is unknown or fails. This changes the live network policy of the node.


/nodes/{nodeId}/{cmd}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}/{cmd}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String cmd = ipDeny; // String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
        String comment = reason; // String | Description
        String parameter = {"subject":"Notice","msg":"Hello"}; // String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg
        try {
            NodeListVo result = apiInstance.commandToNode(nodeId, cmd, comment, parameter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#commandToNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String cmd = ipDeny; // String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
        String comment = reason; // String | Description
        String parameter = {"subject":"Notice","msg":"Hello"}; // String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg
        try {
            NodeListVo result = apiInstance.commandToNode(nodeId, cmd, comment, parameter);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#commandToNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *cmd = ipDeny; // Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
String *comment = reason; // Description (optional)
String *parameter = {"subject":"Notice","msg":"Hello"}; // Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Run a specific Node's Task
[apiInstance commandToNodeWith:nodeId
    cmd:cmd
    comment:comment
    parameter:parameter
              completionHandler: ^(NodeListVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var cmd = ipDeny; // {String} Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)

var opts = { 
  'comment': reason, // {String} Description
  'parameter': {"subject":"Notice","msg":"Hello"} // {String} Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.commandToNode(nodeId, cmd, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class commandToNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var cmd = ipDeny;  // String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
            var comment = reason;  // String | Description (optional) 
            var parameter = {"subject":"Notice","msg":"Hello"};  // String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg (optional) 

            try
            {
                // Run a specific Node's Task
                NodeListVo result = apiInstance.commandToNode(nodeId, cmd, comment, parameter);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.commandToNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$cmd = ipDeny; // String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
$comment = reason; // String | Description
$parameter = {"subject":"Notice","msg":"Hello"}; // String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg

try {
    $result = $api_instance->commandToNode($nodeId, $cmd, $comment, $parameter);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->commandToNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $cmd = ipDeny; # String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
my $comment = reason; # String | Description
my $parameter = {"subject":"Notice","msg":"Hello"}; # String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg

eval { 
    my $result = $api_instance->commandToNode(nodeId => $nodeId, cmd => $cmd, comment => $comment, parameter => $parameter);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->commandToNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
cmd = ipDeny # String | Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
comment = reason # String | Description (optional)
parameter = {"subject":"Notice","msg":"Hello"} # String | Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg (optional)

try: 
    # Run a specific Node's Task
    api_response = api_instance.command_to_node(nodeId, cmd, comment=comment, parameter=parameter)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->commandToNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
cmd*
String
Task (ipDeny: Deny IP, ipAllow: Allow IP, ipProtect: Enable IP Change Prevention, ipFixAuthUser: Enable Hostname Policy, ipUnFixAuthUser: Require User Authentication, ipUnFixHostName: Clear Hostname Policy Settings, macDeny: Deny MAC, macAllow: Allow MAC, sendInstantMsg: Send Instant Message)
Required
Form parameters
Name Description
comment
String
Description
parameter
String
Command parameter in JSON, only for commands that need one. E.g., {"subject":"Notice","msg":"Hello"} for sendInstantMsg

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


commandsToNodes

Run a specific Node's Task

Runs node commands on several Nodes at once. Each item has <code>nodeId</code>, <code>cmds</code> (command names as in PUT /nodes/{nodeId}/{cmd}), <code>extraInfo</code> (reason) and <code>parameters</code> (list of <code>cmd</code>/<code>parameter</code>).<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/commands?apiKey={Key}" -H "Content-Type: application/json" -d '[{"nodeId":"{Node ID}","cmds":["ipDeny"],"extraInfo":"blocked by API","parameters":[]}]'</pre>Response<pre>{"success":[{"code":200,"parameter":{...}}],"fail":[{"code":404,"message":"...","parameter":{"nodeId":"..."}}]}</pre>HTTP 200 is returned even when items fail; check <code>fail</code> (404 unknown node, 400 unknown command). Always send <code>parameters</code> (an empty list is fine); without it the request fails with 500.


/nodes/commands

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/commands"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        array[Node Commands Value Object] body = ; // array[Node Commands Value Object] | Commands Data
        try {
            Messages Value Object result = apiInstance.commandsToNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#commandsToNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        array[Node Commands Value Object] body = ; // array[Node Commands Value Object] | Commands Data
        try {
            Messages Value Object result = apiInstance.commandsToNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#commandsToNodes");
            e.printStackTrace();
        }
    }
}
array[Node Commands Value Object] *body = ; // Commands Data

NodesApi *apiInstance = [[NodesApi alloc] init];

// Run a specific Node's Task
[apiInstance commandsToNodesWith:body
              completionHandler: ^(Messages Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var body = ; // {array[Node Commands Value Object]} Commands Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.commandsToNodes(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class commandsToNodesExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var body = new array[Node Commands Value Object](); // array[Node Commands Value Object] | Commands Data

            try
            {
                // Run a specific Node's Task
                Messages Value Object result = apiInstance.commandsToNodes(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.commandsToNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$body = ; // array[Node Commands Value Object] | Commands Data

try {
    $result = $api_instance->commandsToNodes($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->commandsToNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $body = [WWW::SwaggerClient::Object::array[Node Commands Value Object]->new()]; # array[Node Commands Value Object] | Commands Data

eval { 
    my $result = $api_instance->commandsToNodes(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->commandsToNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
body =  # array[Node Commands Value Object] | Commands Data

try: 
    # Run a specific Node's Task
    api_response = api_instance.commands_to_nodes(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->commandsToNodes: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


createNodeTagsOfNode

Assign a tag

Assigns a tag to the Node specified. Specify the tag by <code>name</code> or <code>id</code>.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"}]'</pre>Response<pre>[{"Type":"node","IDX":6,"Name":"TAG_A","Description":"","nodeId":"{Node ID}"}]</pre>Returns 400 for a Node that cannot have tags, such as a sensor or center node.


/nodes/{nodeId}/tags

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodes/{nodeId}/tags?applyAgent="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        Integer applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[NodeTagMapDoc] result = apiInstance.createNodeTagsOfNode(nodeId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#createNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        Integer applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[NodeTagMapDoc] result = apiInstance.createNodeTagsOfNode(nodeId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#createNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
array[TagVo] *body = ; // Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
Integer *applyAgent = 0; // Apply the policy to the agent.(0: false, 1: true) (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Assign a tag
[apiInstance createNodeTagsOfNodeWith:nodeId
    body:body
    applyAgent:applyAgent
              completionHandler: ^(array[NodeTagMapDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {array[TagVo]} Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

var opts = { 
  'applyAgent': 0 // {Integer} Apply the policy to the agent.(0: false, 1: true)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNodeTagsOfNode(nodeId, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNodeTagsOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new array[TagVo](); // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
            var applyAgent = 0;  // Integer | Apply the policy to the agent.(0: false, 1: true) (optional) 

            try
            {
                // Assign a tag
                array[NodeTagMapDoc] result = apiInstance.createNodeTagsOfNode(nodeId, body, applyAgent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.createNodeTagsOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
$applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)

try {
    $result = $api_instance->createNodeTagsOfNode($nodeId, $body, $applyAgent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->createNodeTagsOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
my $applyAgent = 0; # Integer | Apply the policy to the agent.(0: false, 1: true)

eval { 
    my $result = $api_instance->createNodeTagsOfNode(nodeId => $nodeId, body => $body, applyAgent => $applyAgent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->createNodeTagsOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
applyAgent = 0 # Integer | Apply the policy to the agent.(0: false, 1: true) (optional)

try: 
    # Assign a tag
    api_response = api_instance.create_node_tags_of_node(nodeId, body, applyAgent=applyAgent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->createNodeTagsOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *
Query parameters
Name Description
applyAgent
Integer (int32)
Apply the policy to the agent.(0: false, 1: true)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createNodes

Add a new Node

Adds Nodes. The body is a list; each item needs <code>nl_ipstr</code> or <code>nl_mac</code>, and <code>nl_genidev</code> (Node Type, 10 or above, for example 10: Other, 20: PC). <code>nl_sensornid</code> selects the sensor; <code>doNotDeleteNode</code> prohibits automatic deletion.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodes?apiKey={Key}" -H "Content-Type: application/json" -d '[{"nl_ipstr":"192.168.1.2","nl_mac":"00:11:22:33:44:55","nl_genidev":20,"nl_sensornid":"{Sensor Node ID}"}]'</pre>Response<pre>{"success":[{"code":200,"parameter":{...},"data":{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2","nl_mac":"00:11:22:33:44:55",...}}],"fail":[]}</pre>HTTP 200 is returned even when items fail; check <code>fail</code> (each has <code>code</code> 400 and <code>message</code>: no IP and MAC, invalid IP/MAC, system node type, already registered). Without an IP the node gets 0.0.0.0. MAC may use - or :. An empty list returns 400.


/nodes

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        array[Node Value Object for create] body = ; // array[Node Value Object for create] | Node information
        try {
            Messages Value Object result = apiInstance.createNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#createNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        array[Node Value Object for create] body = ; // array[Node Value Object for create] | Node information
        try {
            Messages Value Object result = apiInstance.createNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#createNodes");
            e.printStackTrace();
        }
    }
}
array[Node Value Object for create] *body = ; // Node information

NodesApi *apiInstance = [[NodesApi alloc] init];

// Add a new Node
[apiInstance createNodesWith:body
              completionHandler: ^(Messages Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var body = ; // {array[Node Value Object for create]} Node information


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNodes(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNodesExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var body = new array[Node Value Object for create](); // array[Node Value Object for create] | Node information

            try
            {
                // Add a new Node
                Messages Value Object result = apiInstance.createNodes(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.createNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$body = ; // array[Node Value Object for create] | Node information

try {
    $result = $api_instance->createNodes($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->createNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $body = [WWW::SwaggerClient::Object::array[Node Value Object for create]->new()]; # array[Node Value Object for create] | Node information

eval { 
    my $result = $api_instance->createNodes(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->createNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
body =  # array[Node Value Object for create] | Node information

try: 
    # Add a new Node
    api_response = api_instance.create_nodes(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->createNodes: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deauthenticateNode

Deauthenticate a specific IP (MAC)

Removes user authentication from the Nodes found by IP or MAC and the authenticated user. Form data: <code>userId</code>, <code>ip</code>, <code>mac</code>, <code>scope</code> (<code>singleUpNode</code>, <code>allUpNode</code>, <code>singleNode</code>, <code>allNode</code>).<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodes/auth?apiKey={Key}" --data-urlencode "userId=user01" --data-urlencode "ip=192.168.1.2" --data-urlencode "scope=allUpNode"</pre>Response<pre>{"nodes":[{"ip":"192.168.1.2","mac":"00:11:22:33:44:55","nodeId":"{Node ID}","resultCode":0}]}</pre>Only nodes authenticated as <code>userId</code> match. Errors: 206 partial, 406 failed or too many nodes, 404 no node matches. <code>scope</code> is required: without it an HTML error page is returned with HTTP 200.


/nodes/auth

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodes/auth"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String userId = user01; // String | Username (USER_ID)
        String scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes String ip = 192.168.1.2; // String | IP String mac = 00:11:22:33:44:55; // String | MAC try { NodeAuthListDoc result = apiInstance.deauthenticateNode(userId, scope, ip, mac); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NodesApi#deauthenticateNode"); e.printStackTrace(); } } }
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String userId = user01; // String | Username (USER_ID)
        String scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes String ip = 192.168.1.2; // String | IP String mac = 00:11:22:33:44:55; // String | MAC try { NodeAuthListDoc result = apiInstance.deauthenticateNode(userId, scope, ip, mac); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling NodesApi#deauthenticateNode"); e.printStackTrace(); } } }
String *userId = user01; // Username (USER_ID)
String *scope = singleUpNode; // Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) String *ip = 192.168.1.2; // IP (optional) String *mac = 00:11:22:33:44:55; // MAC (optional) NodesApi *apiInstance = [[NodesApi alloc] init]; // Deauthenticate a specific IP (MAC) [apiInstance deauthenticateNodeWith:userId scope:scope ip:ip mac:mac completionHandler: ^(NodeAuthListDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var userId = user01; // {String} Username (USER_ID)

var scope = singleUpNode; // {String} Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes var opts = { 'ip': 192.168.1.2, // {String} IP 'mac': 00:11:22:33:44:55 // {String} MAC }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.deauthenticateNode(userId, scope, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deauthenticateNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var userId = user01;  // String | Username (USER_ID)
            var scope = singleUpNode;  // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) var ip = 192.168.1.2; // String | IP (optional) var mac = 00:11:22:33:44:55; // String | MAC (optional) try { // Deauthenticate a specific IP (MAC) NodeAuthListDoc result = apiInstance.deauthenticateNode(userId, scope, ip, mac); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling NodesApi.deauthenticateNode: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$userId = user01; // String | Username (USER_ID)
$scope = singleUpNode; // String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes $ip = 192.168.1.2; // String | IP $mac = 00:11:22:33:44:55; // String | MAC try { $result = $api_instance->deauthenticateNode($userId, $scope, $ip, $mac); print_r($result); } catch (Exception $e) { echo 'Exception when calling NodesApi->deauthenticateNode: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $userId = user01; # String | Username (USER_ID)
my $scope = singleUpNode; # String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes my $ip = 192.168.1.2; # String | IP my $mac = 00:11:22:33:44:55; # String | MAC eval { my $result = $api_instance->deauthenticateNode(userId => $userId, scope => $scope, ip => $ip, mac => $mac); print Dumper($result); }; if ($@) { warn "Exception when calling NodesApi->deauthenticateNode: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
userId = user01 # String | Username (USER_ID)
scope = singleUpNode # String | Scope
singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes (default to allUpNode) ip = 192.168.1.2 # String | IP (optional) mac = 00:11:22:33:44:55 # String | MAC (optional) try: # Deauthenticate a specific IP (MAC) api_response = api_instance.deauthenticate_node(userId, scope, ip=ip, mac=mac) pprint(api_response) except ApiException as e: print("Exception when calling NodesApi->deauthenticateNode: %s\n" % e)

Parameters

Form parameters
Name Description
userId*
String
Username (USER_ID)
Required
ip
String
IP
mac
String
MAC
scope*
String
Scope<br/>singleUpNode: A single UP Node, allUpNode: All UP Nodes, singleNode: A single Node, allNode: All Nodes
Required

Responses

Status: 200 - Success

Status: 206 - Partial Content

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 500 - Internal Server Error


deleteNode

Delete a specific Node

Deletes the Node specified.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}?apiKey={Key}"</pre>Response<pre>{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2","nl_mac":"00:11:22:33:44:55","nl_name":"PC-01",...}</pre>The response is the deleted Node. An unknown Node ID returns 400 (not 404) "not a valid parameter".


/nodes/{nodeId}

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodes/{nodeId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeVo result = apiInstance.deleteNode(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeVo result = apiInstance.deleteNode(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Delete a specific Node
[apiInstance deleteNodeWith:nodeId
              completionHandler: ^(NodeVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteNode(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Delete a specific Node
                NodeVo result = apiInstance.deleteNode(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.deleteNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->deleteNode($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->deleteNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->deleteNode(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->deleteNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Delete a specific Node
    api_response = api_instance.delete_node(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->deleteNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteNodeTagsOfNode

Remove the tag(s)

Removes the tag(s) from the Node specified. The body is an array of tag IDs (NP_IDX).<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '["6"]'</pre>Response<pre>[]</pre>The response lists the tags that remain on the Node.


/nodes/{nodeId}/tags

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodes/{nodeId}/tags?applyAgent="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        array[String] body = ; // array[String] | Tag List
        Integer applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[PropertyVo] result = apiInstance.deleteNodeTagsOfNode(nodeId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        array[String] body = ; // array[String] | Tag List
        Integer applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[PropertyVo] result = apiInstance.deleteNodeTagsOfNode(nodeId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
array[String] *body = ; // Tag List
Integer *applyAgent = 0; // Apply the policy to the agent.(0: false, 1: true) (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Remove the tag(s)
[apiInstance deleteNodeTagsOfNodeWith:nodeId
    body:body
    applyAgent:applyAgent
              completionHandler: ^(array[PropertyVo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {array[String]} Tag List

var opts = { 
  'applyAgent': 0 // {Integer} Apply the policy to the agent.(0: false, 1: true)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteNodeTagsOfNode(nodeId, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNodeTagsOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new array[String](); // array[String] | Tag List
            var applyAgent = 0;  // Integer | Apply the policy to the agent.(0: false, 1: true) (optional) 

            try
            {
                // Remove the tag(s)
                array[PropertyVo] result = apiInstance.deleteNodeTagsOfNode(nodeId, body, applyAgent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.deleteNodeTagsOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // array[String] | Tag List
$applyAgent = 0; // Integer | Apply the policy to the agent.(0: false, 1: true)

try {
    $result = $api_instance->deleteNodeTagsOfNode($nodeId, $body, $applyAgent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->deleteNodeTagsOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Tag List
my $applyAgent = 0; # Integer | Apply the policy to the agent.(0: false, 1: true)

eval { 
    my $result = $api_instance->deleteNodeTagsOfNode(nodeId => $nodeId, body => $body, applyAgent => $applyAgent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->deleteNodeTagsOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # array[String] | Tag List
applyAgent = 0 # Integer | Apply the policy to the agent.(0: false, 1: true) (optional)

try: 
    # Remove the tag(s)
    api_response = api_instance.delete_node_tags_of_node(nodeId, body, applyAgent=applyAgent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->deleteNodeTagsOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *
Query parameters
Name Description
applyAgent
Integer (int32)
Apply the policy to the agent.(0: false, 1: true)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteNodes

Remove Specific Nodes

Deletes several Nodes. The body is a list of Node IDs.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodes?apiKey={Key}" -H "Content-Type: application/json" -d '["{Node ID}","{Node ID}"]'</pre>Response<pre>{"success":[{"code":200,"message":"","parameter":"{Node ID}","data":null}],"fail":[{"code":404,"message":"","parameter":"{Node ID}","data":null}]}</pre>HTTP 200 is returned even when some IDs fail; check <code>fail</code> (404 unknown Node ID, 500 delete error). An empty list returns 400.


/nodes

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodes"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        array[String] body = ; // array[String] | Node ID List(Format [nodeId,nodeId])
        try {
            Messages Value Object result = apiInstance.deleteNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        array[String] body = ; // array[String] | Node ID List(Format [nodeId,nodeId])
        try {
            Messages Value Object result = apiInstance.deleteNodes(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#deleteNodes");
            e.printStackTrace();
        }
    }
}
array[String] *body = ; // Node ID List(Format [nodeId,nodeId])

NodesApi *apiInstance = [[NodesApi alloc] init];

// Remove Specific Nodes
[apiInstance deleteNodesWith:body
              completionHandler: ^(Messages Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var body = ; // {array[String]} Node ID List(Format [nodeId,nodeId])


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteNodes(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteNodesExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var body = new array[String](); // array[String] | Node ID List(Format [nodeId,nodeId])

            try
            {
                // Remove Specific Nodes
                Messages Value Object result = apiInstance.deleteNodes(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.deleteNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$body = ; // array[String] | Node ID List(Format [nodeId,nodeId])

try {
    $result = $api_instance->deleteNodes($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->deleteNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Node ID List(Format [nodeId,nodeId])

eval { 
    my $result = $api_instance->deleteNodes(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->deleteNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
body =  # array[String] | Node ID List(Format [nodeId,nodeId])

try: 
    # Remove Specific Nodes
    api_response = api_instance.delete_nodes(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->deleteNodes: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Nodes removed successfully or partial failures reported

Status: 400 - Invalid Node ID list provided

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getCountOfNode

Retrieve the number of Nodes

Retrieves the number of the Nodes. Only <code>active</code>, <code>risk</code> and <code>genidevs</code> are applied; the search parameters of GET /nodes are not.<br/><code>active</code> and <code>risk</code> default to false. Without parameters, the API counts Nodes that are down and have no anomaly, not all Nodes. Use <code>total</code> of GET /nodes for the number of all Nodes.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/count?apiKey={Key}&amp;active=true"</pre>Response<pre>{"count": 320}</pre>


/nodes/count

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/count?active=&risk=&genidevs="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Boolean active = true; // Boolean | Node UP
        Boolean risk = false; // Boolean | Anomalies detected
        String genidevs = 1,2; // String | Node Type (CM_CODE or CM_CODEs separated by comma)
        try {
            CountDoc result = apiInstance.getCountOfNode(active, risk, genidevs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCountOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Boolean active = true; // Boolean | Node UP
        Boolean risk = false; // Boolean | Anomalies detected
        String genidevs = 1,2; // String | Node Type (CM_CODE or CM_CODEs separated by comma)
        try {
            CountDoc result = apiInstance.getCountOfNode(active, risk, genidevs);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCountOfNode");
            e.printStackTrace();
        }
    }
}
Boolean *active = true; // Node UP (optional)
Boolean *risk = false; // Anomalies detected (optional)
String *genidevs = 1,2; // Node Type (CM_CODE or CM_CODEs separated by comma) (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve the number of Nodes
[apiInstance getCountOfNodeWith:active
    risk:risk
    genidevs:genidevs
              completionHandler: ^(CountDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var opts = { 
  'active': true, // {Boolean} Node UP
  'risk': false, // {Boolean} Anomalies detected
  'genidevs': 1,2 // {String} Node Type (CM_CODE or CM_CODEs separated by comma)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountOfNode(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var active = true;  // Boolean | Node UP (optional) 
            var risk = false;  // Boolean | Anomalies detected (optional) 
            var genidevs = 1,2;  // String | Node Type (CM_CODE or CM_CODEs separated by comma) (optional) 

            try
            {
                // Retrieve the number of Nodes
                CountDoc result = apiInstance.getCountOfNode(active, risk, genidevs);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getCountOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$active = true; // Boolean | Node UP
$risk = false; // Boolean | Anomalies detected
$genidevs = 1,2; // String | Node Type (CM_CODE or CM_CODEs separated by comma)

try {
    $result = $api_instance->getCountOfNode($active, $risk, $genidevs);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getCountOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $active = true; # Boolean | Node UP
my $risk = false; # Boolean | Anomalies detected
my $genidevs = 1,2; # String | Node Type (CM_CODE or CM_CODEs separated by comma)

eval { 
    my $result = $api_instance->getCountOfNode(active => $active, risk => $risk, genidevs => $genidevs);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getCountOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
active = true # Boolean | Node UP (optional)
risk = false # Boolean | Anomalies detected (optional)
genidevs = 1,2 # String | Node Type (CM_CODE or CM_CODEs separated by comma) (optional)

try: 
    # Retrieve the number of Nodes
    api_response = api_instance.get_count_of_node(active=active, risk=risk, genidevs=genidevs)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getCountOfNode: %s\n" % e)

Parameters

Query parameters
Name Description
active
Boolean
Node UP
risk
Boolean
Anomalies detected
genidevs
String
Node Type (CM_CODE or CM_CODEs separated by comma)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found


getCountOfStatisticsForNodes

Retrieve Node detection average by period

Retrieves node counts over time. <code>periodType</code>: <code>min</code> (default, 15-minute points of today), <code>hour</code>, <code>day</code> (daily points; <code>timeScope</code> days, default 7). Fields: <code>cps_data1</code> UP nodes, <code>cps_data2</code> all nodes, <code>cps_data3</code> UP/all (%), <code>cps_data4</code> all devices.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/stat?apiKey={Key}&amp;periodType=day&amp;timeScope=7"</pre>Response<pre>[{"cps_timestamp":1794236400000,"cps_time":1794268800000,"cps_data1":320,"cps_data2":338,"cps_data3":94,"cps_data4":203,"cps_data5":0}]</pre>Times are epoch milliseconds. <code>timeScope</code> has no visible effect with <code>min</code>. Returns 404 when there is no data, for example an unknown <code>periodType</code> or <code>hour</code> with a <code>timeScope</code>.


/nodes/stat

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/stat?periodType=&timeScope="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String periodType = day; // String | Time unit (min, hour, day)
        Integer timeScope = 7; // Integer | Period
        try {
            array[CommonPeriodicStatVo] result = apiInstance.getCountOfStatisticsForNodes(periodType, timeScope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCountOfStatisticsForNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String periodType = day; // String | Time unit (min, hour, day)
        Integer timeScope = 7; // Integer | Period
        try {
            array[CommonPeriodicStatVo] result = apiInstance.getCountOfStatisticsForNodes(periodType, timeScope);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCountOfStatisticsForNodes");
            e.printStackTrace();
        }
    }
}
String *periodType = day; // Time unit (min, hour, day) (optional)
Integer *timeScope = 7; // Period (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve Node detection average by period
[apiInstance getCountOfStatisticsForNodesWith:periodType
    timeScope:timeScope
              completionHandler: ^(array[CommonPeriodicStatVo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var opts = { 
  'periodType': day, // {String} Time unit (min, hour, day)
  'timeScope': 7 // {Integer} Period
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCountOfStatisticsForNodes(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCountOfStatisticsForNodesExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var periodType = day;  // String | Time unit (min, hour, day) (optional) 
            var timeScope = 7;  // Integer | Period (optional) 

            try
            {
                // Retrieve Node detection average by period
                array[CommonPeriodicStatVo] result = apiInstance.getCountOfStatisticsForNodes(periodType, timeScope);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getCountOfStatisticsForNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$periodType = day; // String | Time unit (min, hour, day)
$timeScope = 7; // Integer | Period

try {
    $result = $api_instance->getCountOfStatisticsForNodes($periodType, $timeScope);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getCountOfStatisticsForNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $periodType = day; # String | Time unit (min, hour, day)
my $timeScope = 7; # Integer | Period

eval { 
    my $result = $api_instance->getCountOfStatisticsForNodes(periodType => $periodType, timeScope => $timeScope);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getCountOfStatisticsForNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
periodType = day # String | Time unit (min, hour, day) (optional)
timeScope = 7 # Integer | Period (optional)

try: 
    # Retrieve Node detection average by period
    api_response = api_instance.get_count_of_statistics_for_nodes(periodType=periodType, timeScope=timeScope)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getCountOfStatisticsForNodes: %s\n" % e)

Parameters

Query parameters
Name Description
periodType
String
Time unit (min, hour, day)
timeScope
Integer (int32)
Period

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getCvesOfNode

Retrieve a specific Node's CVE(s)

Retrieves the CVEs that match the platform of the Node specified. Paging: <code>page</code> (default 1), <code>pageSize</code> (default 30), <code>sort</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/cves?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"result":[{"CVE_ID":"CVE-2024-0001",...}],"total":0,"page":1,"pageSize":30}</pre>The result is empty when the node platform has no CVE data. An unknown Node ID returns an HTML error page with HTTP 200, not JSON.


/nodes/{nodeId}/cves

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/cves?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"publishedDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            NodeCveListDoc result = apiInstance.getCvesOfNode(nodeId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCvesOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"publishedDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            NodeCveListDoc result = apiInstance.getCvesOfNode(nodeId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getCvesOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"publishedDate","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's CVE(s)
[apiInstance getCvesOfNodeWith:nodeId
    page:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(NodeCveListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"publishedDate","dir":"desc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getCvesOfNode(nodeId, page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getCvesOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"publishedDate","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // Retrieve a specific Node's CVE(s)
                NodeCveListDoc result = apiInstance.getCvesOfNode(nodeId, page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getCvesOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"publishedDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getCvesOfNode($nodeId, $page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getCvesOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"publishedDate","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getCvesOfNode(nodeId => $nodeId, page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getCvesOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"publishedDate","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # Retrieve a specific Node's CVE(s)
    api_response = api_instance.get_cves_of_node(nodeId, page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getCvesOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node ID Not Found

Status: 500 - Internal Server Error


getDeviceAssetCustomFields

Get custom fields for device asset information

Retrieves the asset custom fields (DLM_CUSTOM) of the Device of the Node specified, with the current value in <code>CONF_VALUE</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/device/asset/customfields?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":"{Node ID}","data":[{"CONF_KEY":"NI_CUSTOM01","CONF_DISP":"Location","CONF_VALUE":"3F"}]}</pre><code>data</code> is empty when no asset custom field is enabled. Errors are returned with HTTP 200: for an unknown Node ID the body has <code>"code":404</code>.


/nodes/{nodeId}/device/asset/customfields

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/device/asset/customfields"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getDeviceAssetCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getDeviceAssetCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getDeviceAssetCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getDeviceAssetCustomFields");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get custom fields for device asset information
[apiInstance getDeviceAssetCustomFieldsWith:nodeId
              completionHandler: ^(NodeCustomFieldsDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceAssetCustomFields(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDeviceAssetCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Get custom fields for device asset information
                NodeCustomFieldsDoc result = apiInstance.getDeviceAssetCustomFields(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getDeviceAssetCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getDeviceAssetCustomFields($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getDeviceAssetCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getDeviceAssetCustomFields(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getDeviceAssetCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Get custom fields for device asset information
    api_response = api_instance.get_device_asset_custom_fields(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getDeviceAssetCustomFields: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getDeviceCustomFields

Get custom fields of device

Retrieves the Device custom fields (DEV_CUSTOM) of the Node specified, with the current value in <code>CONF_VALUE</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/device/customfields?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":"{Node ID}","data":[{"CONF_KEY":"DL_CUSTOM01","CONF_DISP":"VLAN","CONF_TYPE":25,"CONF_VALUE":"","CONF_VISIBLE":1}]}</pre>Errors are returned with HTTP 200: for an unknown Node ID the body has <code>"code":404</code> and <code>data</code> is null.


/nodes/{nodeId}/device/customfields

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/device/customfields"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getDeviceCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getDeviceCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getDeviceCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getDeviceCustomFields");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get custom fields of device
[apiInstance getDeviceCustomFieldsWith:nodeId
              completionHandler: ^(NodeCustomFieldsDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceCustomFields(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDeviceCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Get custom fields of device
                NodeCustomFieldsDoc result = apiInstance.getDeviceCustomFields(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getDeviceCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getDeviceCustomFields($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getDeviceCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getDeviceCustomFields(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getDeviceCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Get custom fields of device
    api_response = api_instance.get_device_custom_fields(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getDeviceCustomFields: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getMalwareListOfNode

List of malware detected on the node

Retrieves the suspicious executable files the agent reported for the Device of the Node specified. Only files at or above the malware confidence setting are listed. Paging: <code>page</code> (default 1), <code>pageSize</code> (default 30), <code>sort</code>, <code>fileName</code> filter.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/malware?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"code":200,"message":"","parameter":{"devId":"...","confidenceScore":70,"page":1,"pageSize":30},"data":{"result":[],"total":0,"page":1,"pageSize":30}}</pre>The list is in <code>data.result</code>. Errors are returned with HTTP 200: an unknown Node ID gives <code>"code":404</code> in the body.


/nodes/{nodeId}/malware

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/malware?page=&pageSize=&sort=&fileName="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"NI_DATE","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String fileName = sample.exe; // String | File Name
        try {
            NodeMalwareDoc result = apiInstance.getMalwareListOfNode(nodeId, page, pageSize, sort, fileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getMalwareListOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"NI_DATE","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String fileName = sample.exe; // String | File Name
        try {
            NodeMalwareDoc result = apiInstance.getMalwareListOfNode(nodeId, page, pageSize, sort, fileName);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getMalwareListOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"NI_DATE","dir":"desc"}; // Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *fileName = sample.exe; // File Name (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// List of malware detected on the node
[apiInstance getMalwareListOfNodeWith:nodeId
    page:page
    pageSize:pageSize
    sort:sort
    fileName:fileName
              completionHandler: ^(NodeMalwareDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"NI_DATE","dir":"desc"}, // {String} Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'fileName': sample.exe // {String} File Name
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getMalwareListOfNode(nodeId, page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getMalwareListOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"NI_DATE","dir":"desc"};  // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var fileName = sample.exe;  // String | File Name (optional) 

            try
            {
                // List of malware detected on the node
                NodeMalwareDoc result = apiInstance.getMalwareListOfNode(nodeId, page, pageSize, sort, fileName);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getMalwareListOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"NI_DATE","dir":"desc"}; // String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$fileName = sample.exe; // String | File Name

try {
    $result = $api_instance->getMalwareListOfNode($nodeId, $page, $pageSize, $sort, $fileName);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getMalwareListOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"NI_DATE","dir":"desc"}; # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $fileName = sample.exe; # String | File Name

eval { 
    my $result = $api_instance->getMalwareListOfNode(nodeId => $nodeId, page => $page, pageSize => $pageSize, sort => $sort, fileName => $fileName);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getMalwareListOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"NI_DATE","dir":"desc"} # String | Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
fileName = sample.exe # String | File Name (optional)

try: 
    # List of malware detected on the node
    api_response = api_instance.get_malware_list_of_node(nodeId, page, pageSize, sort=sort, fileName=fileName)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getMalwareListOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sort criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
fileName
String
File Name

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNode

Retrieve a specific Node's information

Retrieves the information of the Node specified.<br/>Node IDs can be imported into the node list through the "/mc2/rest/nodes" API.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}?apiKey={Key}"</pre>The response has <code>node</code> (Node fields such as <code>nl_nodeid</code>, <code>nl_ipstr</code>, <code>nl_mac</code>, <code>nl_name</code>) and <code>dev</code> (Device fields such as <code>dl_id</code>, <code>dl_name</code>).


/nodes/{nodeId}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}?v="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String v = 2; // String | Version
        try {
            NodeDetailDoc result = apiInstance.getNode(nodeId, v);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String v = 2; // String | Version
        try {
            NodeDetailDoc result = apiInstance.getNode(nodeId, v);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *v = 2; // Version (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's information
[apiInstance getNodeWith:nodeId
    v:v
              completionHandler: ^(NodeDetailDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var opts = { 
  'v': 2 // {String} Version
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNode(nodeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var v = 2;  // String | Version (optional) 

            try
            {
                // Retrieve a specific Node's information
                NodeDetailDoc result = apiInstance.getNode(nodeId, v);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$v = 2; // String | Version

try {
    $result = $api_instance->getNode($nodeId, $v);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $v = 2; # String | Version

eval { 
    my $result = $api_instance->getNode(nodeId => $nodeId, v => $v);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
v = 2 # String | Version (optional)

try: 
    # Retrieve a specific Node's information
    api_response = api_instance.get_node(nodeId, v=v)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
v
String
Version

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getNodeCustomFields

Get custom fields of node

Retrieves the Node custom fields (NODE_CUSTOM) of the Node specified, with the current value in <code>CONF_VALUE</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/customfields?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":"{Node ID}","data":[{"CONF_KEY":"NL_CUSTOM02","CONF_DISP":"Department","CONF_TYPE":33,"CONF_VALUE":""}]}</pre>Errors are returned with HTTP 200: for an unknown Node ID the body has <code>"code":404</code>.


/nodes/{nodeId}/customfields

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/customfields"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getNodeCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeCustomFields");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeCustomFieldsDoc result = apiInstance.getNodeCustomFields(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeCustomFields");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Get custom fields of node
[apiInstance getNodeCustomFieldsWith:nodeId
              completionHandler: ^(NodeCustomFieldsDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeCustomFields(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeCustomFieldsExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Get custom fields of node
                NodeCustomFieldsDoc result = apiInstance.getNodeCustomFields(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNodeCustomFields: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getNodeCustomFields($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNodeCustomFields: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getNodeCustomFields(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNodeCustomFields: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Get custom fields of node
    api_response = api_instance.get_node_custom_fields(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNodeCustomFields: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNodeInformation

Retrieve the data of the InfoConf

Retrieves the information panels of a category for the Node specified. <code>catgry</code>: CAT_NETINFO, CAT_SYSINFO, CAT_SENSORINFO, CAT_SENSORSTATUS, CAT_SOFTWAREINFO, CAT_WSTINFO, CAT_NODEPOLICY.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/information/CAT_SYSINFO?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":{"catgry":"CAT_SYSINFO","nodeid":"{Node ID}"},"data":[{"infoId":"CPU","title":"...","category":"CAT_SYSINFO","dispOrder":1,"columns":[...],"data":[...]}]}</pre>Each panel has <code>columns</code> (column definitions) and <code>data</code> (rows; empty when not collected). Returns 404 for an unknown or empty category. An unknown Node ID still returns 200 with empty panels.


/nodes/{nodeId}/information/{catgry}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/information/{catgry}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String catgry = CAT_SYSINFO; // String | Category
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeInfoDoc result = apiInstance.getNodeInformation(catgry, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeInformation");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String catgry = CAT_SYSINFO; // String | Category
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodeInfoDoc result = apiInstance.getNodeInformation(catgry, nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeInformation");
            e.printStackTrace();
        }
    }
}
String *catgry = CAT_SYSINFO; // Category
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve the data of the InfoConf
[apiInstance getNodeInformationWith:catgry
    nodeId:nodeId
              completionHandler: ^(NodeInfoDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var catgry = CAT_SYSINFO; // {String} Category

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeInformation(catgry, nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeInformationExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var catgry = CAT_SYSINFO;  // String | Category
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Retrieve the data of the InfoConf
                NodeInfoDoc result = apiInstance.getNodeInformation(catgry, nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNodeInformation: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$catgry = CAT_SYSINFO; // String | Category
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getNodeInformation($catgry, $nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNodeInformation: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $catgry = CAT_SYSINFO; # String | Category
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getNodeInformation(catgry => $catgry, nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNodeInformation: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
catgry = CAT_SYSINFO # String | Category
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Retrieve the data of the InfoConf
    api_response = api_instance.get_node_information(catgry, nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNodeInformation: %s\n" % e)

Parameters

Path parameters
Name Description
catgry*
String
Category
Required
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNodePolicy

Retrieve a specific Node's information

Retrieves the IP and MAC policy settings of the Node specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/policy?apiKey={Key}"</pre>The response has <code>ipPolicy</code>, <code>selectIpList</code>, <code>macPolicy</code> and <code>selectMacList</code>.


/nodes/{nodeId}/policy

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/policy"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodePolicyVo result = apiInstance.getNodePolicy(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            NodePolicyVo result = apiInstance.getNodePolicy(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodePolicy");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's information
[apiInstance getNodePolicyWith:nodeId
              completionHandler: ^(NodePolicyVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodePolicy(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodePolicyExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Retrieve a specific Node's information
                NodePolicyVo result = apiInstance.getNodePolicy(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNodePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getNodePolicy($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNodePolicy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getNodePolicy(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNodePolicy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Retrieve a specific Node's information
    api_response = api_instance.get_node_policy(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNodePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Server Error


getNodeTagsOfNode

Retrieve a specific Node's tag(s)

Retrieves the tag(s) assigned to the Node specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/tags?apiKey={Key}&amp;type=node"</pre>Response<pre>[{"type":"node","id":"6","name":"TAG_A","description":"","startDate":null,"expireDate":null,"targetId":"{Node ID}"}]</pre>Returns 404 when no tag is assigned to the Node. Treat it as an empty list.


/nodes/{nodeId}/tags

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/tags?type="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String type = node; // String | Tag Type. Always send it: without it the API returns an error page.
        try {
            array[PropertyVo] result = apiInstance.getNodeTagsOfNode(nodeId, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String type = node; // String | Tag Type. Always send it: without it the API returns an error page.
        try {
            array[PropertyVo] result = apiInstance.getNodeTagsOfNode(nodeId, type);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodeTagsOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *type = node; // Tag Type. Always send it: without it the API returns an error page.

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's tag(s)
[apiInstance getNodeTagsOfNodeWith:nodeId
    type:type
              completionHandler: ^(array[PropertyVo] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var type = node; // {String} Tag Type. Always send it: without it the API returns an error page.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodeTagsOfNode(nodeId, type, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodeTagsOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var type = node;  // String | Tag Type. Always send it: without it the API returns an error page.

            try
            {
                // Retrieve a specific Node's tag(s)
                array[PropertyVo] result = apiInstance.getNodeTagsOfNode(nodeId, type);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNodeTagsOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$type = node; // String | Tag Type. Always send it: without it the API returns an error page.

try {
    $result = $api_instance->getNodeTagsOfNode($nodeId, $type);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNodeTagsOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $type = node; # String | Tag Type. Always send it: without it the API returns an error page.

eval { 
    my $result = $api_instance->getNodeTagsOfNode(nodeId => $nodeId, type => $type);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNodeTagsOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
type = node # String | Tag Type. Always send it: without it the API returns an error page.

try: 
    # Retrieve a specific Node's tag(s)
    api_response = api_instance.get_node_tags_of_node(nodeId, type)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNodeTagsOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
type*
String
Tag Type. Always send it: without it the API returns an error page.
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node ID Not Found

Status: 500 - Internal Server Error


getNodes

List Nodes

Retrieves a list of the Nodes.<br/><br/>To find several nodes by IP in one call, pass an IPv4 range or CIDR to <code>qsearch</code>. A comma-separated IP list is not supported. The search also matches other columns, so filter the result by <code>NL_IPSTR</code>.<br/><pre>curl -k -G "https://{Policy Server Management IP}/mc2/rest/nodes" --data-urlencode "apiKey={Key}" --data-urlencode "qsearch=192.168.1.2-192.168.1.7" --data-urlencode "pageSize=1000"</pre>To find the nodes that have a node tag, pass the tag name to <code>nodeproperty</code>.<br/><pre>curl -k -G "https://{Policy Server Management IP}/mc2/rest/nodes" --data-urlencode "apiKey={Key}" --data-urlencode "nodeproperty=TAG_A"</pre>Response: <code>{"result": [...], "total": N, "page": 1, "pageSize": 30}</code>. Each row has <code>NL_NODEID</code> (Node ID) and <code>NL_IPSTR</code> (IP). Node tags are not included in the rows; use <code>/nodes/{nodeId}/tags?type=node</code> or <code>nodeproperty</code>. The default page size is 30, so compare <code>total</code> and request the next <code>page</code> when needed.


/nodes

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes?page=&pageSize=&sort=&view=&subjid=&perspective=&licenseLimitExceededTime=&nid=&authdept=&deptcode=&authuser=&authuserExact=&property=&nodeproperty=&macproperty=&systemid=&roleid=&genidev=&genidevs=&agentType=&agentUpDown=&ipEqual=&ip=&macEqual=&mac=&riskNode=&riskDefinitionId=&beforeLoginTime=&qsearch=&ipUseOption="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String view = node; // String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)
        String sort = {"field":"NL_IPSTR","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String subjid = 50; // String | Node Group (SUBJ_ID)
        String perspective = node; // String | View Criteria (node, dev)
        String licenseLimitExceededTime = 2026-11-10 10:00:00; // String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
        String nid = All; // String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
        String authdept = Sales; // String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
        String deptcode = D001; // String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
        String authuser = user01; // String | Authenticated user ID and user name included
        String authuserExact = user01; // String | Authenticated user ID
        String property = TAG_A; // String | Tag name (Node, MAC). Tag ID is not supported.
        String nodeproperty = TAG_A; // String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
        String macproperty = TAG_A; // String | MAC Tag
        String systemid = 1; // String | Node Policy (SYSTEM_ID)
        String roleid = 1; // String | Enforcement Policy (ROLE_ID)
        String genidev = 2; // String | Node Type (CM_CODE)
        String genidevs = 1,2; // String | Node Types (CM_CODEs separated by comma)
        String agentType = agent_inst; // String | Agent installed (agent_inst: Installed, agent_noinst: Not installed)
        String agentUpDown = UP; // String | Agent running (UP, DOWN)
        Boolean ipEqual = true; // Boolean | IP Match Full
        String ip = 192.168.1.2; // String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
        Boolean macEqual = true; // Boolean | MAC Match Full
        String mac = 00:11:22:33:44:55; // String | MAC
        Boolean riskNode = true; // Boolean | Anomalies detected
        String riskDefinitionId = 1; // String | Anomaly Definition
        String beforeLoginTime = 2026-11-10 10:00:00; // String | Logged in (yyyy-MM-dd hh:mm:ss)
        String qsearch = 192.168.1.0/24; // String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
        String ipUseOption = use; // String | IP state (all: All, use: Assigned, unuse: Available)
        try {
            NodeListDoc result = apiInstance.getNodes(page, pageSize, view, sort, subjid, perspective, licenseLimitExceededTime, nid, authdept, deptcode, authuser, authuserExact, property, nodeproperty, macproperty, systemid, roleid, genidev, genidevs, agentType, agentUpDown, ipEqual, ip, macEqual, mac, riskNode, riskDefinitionId, beforeLoginTime, qsearch, ipUseOption);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodes");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String view = node; // String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)
        String sort = {"field":"NL_IPSTR","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String subjid = 50; // String | Node Group (SUBJ_ID)
        String perspective = node; // String | View Criteria (node, dev)
        String licenseLimitExceededTime = 2026-11-10 10:00:00; // String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
        String nid = All; // String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
        String authdept = Sales; // String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
        String deptcode = D001; // String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
        String authuser = user01; // String | Authenticated user ID and user name included
        String authuserExact = user01; // String | Authenticated user ID
        String property = TAG_A; // String | Tag name (Node, MAC). Tag ID is not supported.
        String nodeproperty = TAG_A; // String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
        String macproperty = TAG_A; // String | MAC Tag
        String systemid = 1; // String | Node Policy (SYSTEM_ID)
        String roleid = 1; // String | Enforcement Policy (ROLE_ID)
        String genidev = 2; // String | Node Type (CM_CODE)
        String genidevs = 1,2; // String | Node Types (CM_CODEs separated by comma)
        String agentType = agent_inst; // String | Agent installed (agent_inst: Installed, agent_noinst: Not installed)
        String agentUpDown = UP; // String | Agent running (UP, DOWN)
        Boolean ipEqual = true; // Boolean | IP Match Full
        String ip = 192.168.1.2; // String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
        Boolean macEqual = true; // Boolean | MAC Match Full
        String mac = 00:11:22:33:44:55; // String | MAC
        Boolean riskNode = true; // Boolean | Anomalies detected
        String riskDefinitionId = 1; // String | Anomaly Definition
        String beforeLoginTime = 2026-11-10 10:00:00; // String | Logged in (yyyy-MM-dd hh:mm:ss)
        String qsearch = 192.168.1.0/24; // String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
        String ipUseOption = use; // String | IP state (all: All, use: Assigned, unuse: Available)
        try {
            NodeListDoc result = apiInstance.getNodes(page, pageSize, view, sort, subjid, perspective, licenseLimitExceededTime, nid, authdept, deptcode, authuser, authuserExact, property, nodeproperty, macproperty, systemid, roleid, genidev, genidevs, agentType, agentUpDown, ipEqual, ip, macEqual, mac, riskNode, riskDefinitionId, beforeLoginTime, qsearch, ipUseOption);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getNodes");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *view = node; // Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View) (default to node)
String *sort = {"field":"NL_IPSTR","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *subjid = 50; // Node Group (SUBJ_ID) (optional)
String *perspective = node; // View Criteria (node, dev) (optional)
String *licenseLimitExceededTime = 2026-11-10 10:00:00; // Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1". (optional)
String *nid = All; // Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group) (optional) (default to All)
String *authdept = Sales; // Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column) (optional)
String *deptcode = D001; // Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments) (optional)
String *authuser = user01; // Authenticated user ID and user name included (optional)
String *authuserExact = user01; // Authenticated user ID (optional)
String *property = TAG_A; // Tag name (Node, MAC). Tag ID is not supported. (optional)
String *nodeproperty = TAG_A; // Node tag name. Returns the nodes that have this node tag. Tag ID is not supported. (optional)
String *macproperty = TAG_A; // MAC Tag (optional)
String *systemid = 1; // Node Policy (SYSTEM_ID) (optional)
String *roleid = 1; // Enforcement Policy (ROLE_ID) (optional)
String *genidev = 2; // Node Type (CM_CODE) (optional)
String *genidevs = 1,2; // Node Types (CM_CODEs separated by comma) (optional)
String *agentType = agent_inst; // Agent installed (agent_inst: Installed, agent_noinst: Not installed) (optional)
String *agentUpDown = UP; // Agent running (UP, DOWN) (optional)
Boolean *ipEqual = true; // IP Match Full (optional) (default to false)
String *ip = 192.168.1.2; // IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR. (optional)
Boolean *macEqual = true; // MAC Match Full (optional) (default to false)
String *mac = 00:11:22:33:44:55; // MAC (optional)
Boolean *riskNode = true; // Anomalies detected (optional)
String *riskDefinitionId = 1; // Anomaly Definition (optional)
String *beforeLoginTime = 2026-11-10 10:00:00; // Logged in (yyyy-MM-dd hh:mm:ss) (optional)
String *qsearch = 192.168.1.0/24; // Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24). (optional)
String *ipUseOption = use; // IP state (all: All, use: Assigned, unuse: Available) (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// List Nodes
[apiInstance getNodesWith:page
    pageSize:pageSize
    view:view
    sort:sort
    subjid:subjid
    perspective:perspective
    licenseLimitExceededTime:licenseLimitExceededTime
    nid:nid
    authdept:authdept
    deptcode:deptcode
    authuser:authuser
    authuserExact:authuserExact
    property:property
    nodeproperty:nodeproperty
    macproperty:macproperty
    systemid:systemid
    roleid:roleid
    genidev:genidev
    genidevs:genidevs
    agentType:agentType
    agentUpDown:agentUpDown
    ipEqual:ipEqual
    ip:ip
    macEqual:macEqual
    mac:mac
    riskNode:riskNode
    riskDefinitionId:riskDefinitionId
    beforeLoginTime:beforeLoginTime
    qsearch:qsearch
    ipUseOption:ipUseOption
              completionHandler: ^(NodeListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var view = node; // {String} Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)

var opts = { 
  'sort': {"field":"NL_IPSTR","dir":"asc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'subjid': 50, // {String} Node Group (SUBJ_ID)
  'perspective': node, // {String} View Criteria (node, dev)
  'licenseLimitExceededTime': 2026-11-10 10:00:00, // {String} Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
  'nid': All, // {String} Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
  'authdept': Sales, // {String} Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
  'deptcode': D001, // {String} Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
  'authuser': user01, // {String} Authenticated user ID and user name included
  'authuserExact': user01, // {String} Authenticated user ID
  'property': TAG_A, // {String} Tag name (Node, MAC). Tag ID is not supported.
  'nodeproperty': TAG_A, // {String} Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
  'macproperty': TAG_A, // {String} MAC Tag
  'systemid': 1, // {String} Node Policy (SYSTEM_ID)
  'roleid': 1, // {String} Enforcement Policy (ROLE_ID)
  'genidev': 2, // {String} Node Type (CM_CODE)
  'genidevs': 1,2, // {String} Node Types (CM_CODEs separated by comma)
  'agentType': agent_inst, // {String} Agent installed (agent_inst: Installed, agent_noinst: Not installed)
  'agentUpDown': UP, // {String} Agent running (UP, DOWN)
  'ipEqual': true, // {Boolean} IP Match Full
  'ip': 192.168.1.2, // {String} IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
  'macEqual': true, // {Boolean} MAC Match Full
  'mac': 00:11:22:33:44:55, // {String} MAC
  'riskNode': true, // {Boolean} Anomalies detected
  'riskDefinitionId': 1, // {String} Anomaly Definition
  'beforeLoginTime': 2026-11-10 10:00:00, // {String} Logged in (yyyy-MM-dd hh:mm:ss)
  'qsearch': 192.168.1.0/24, // {String} Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
  'ipUseOption': use // {String} IP state (all: All, use: Assigned, unuse: Available)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodes(page, pageSize, view, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodesExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var view = node;  // String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View) (default to node)
            var sort = {"field":"NL_IPSTR","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var subjid = 50;  // String | Node Group (SUBJ_ID) (optional) 
            var perspective = node;  // String | View Criteria (node, dev) (optional) 
            var licenseLimitExceededTime = 2026-11-10 10:00:00;  // String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1". (optional) 
            var nid = All;  // String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group) (optional)  (default to All)
            var authdept = Sales;  // String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column) (optional) 
            var deptcode = D001;  // String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments) (optional) 
            var authuser = user01;  // String | Authenticated user ID and user name included (optional) 
            var authuserExact = user01;  // String | Authenticated user ID (optional) 
            var property = TAG_A;  // String | Tag name (Node, MAC). Tag ID is not supported. (optional) 
            var nodeproperty = TAG_A;  // String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported. (optional) 
            var macproperty = TAG_A;  // String | MAC Tag (optional) 
            var systemid = 1;  // String | Node Policy (SYSTEM_ID) (optional) 
            var roleid = 1;  // String | Enforcement Policy (ROLE_ID) (optional) 
            var genidev = 2;  // String | Node Type (CM_CODE) (optional) 
            var genidevs = 1,2;  // String | Node Types (CM_CODEs separated by comma) (optional) 
            var agentType = agent_inst;  // String | Agent installed (agent_inst: Installed, agent_noinst: Not installed) (optional) 
            var agentUpDown = UP;  // String | Agent running (UP, DOWN) (optional) 
            var ipEqual = true;  // Boolean | IP Match Full (optional)  (default to false)
            var ip = 192.168.1.2;  // String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR. (optional) 
            var macEqual = true;  // Boolean | MAC Match Full (optional)  (default to false)
            var mac = 00:11:22:33:44:55;  // String | MAC (optional) 
            var riskNode = true;  // Boolean | Anomalies detected (optional) 
            var riskDefinitionId = 1;  // String | Anomaly Definition (optional) 
            var beforeLoginTime = 2026-11-10 10:00:00;  // String | Logged in (yyyy-MM-dd hh:mm:ss) (optional) 
            var qsearch = 192.168.1.0/24;  // String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24). (optional) 
            var ipUseOption = use;  // String | IP state (all: All, use: Assigned, unuse: Available) (optional) 

            try
            {
                // List Nodes
                NodeListDoc result = apiInstance.getNodes(page, pageSize, view, sort, subjid, perspective, licenseLimitExceededTime, nid, authdept, deptcode, authuser, authuserExact, property, nodeproperty, macproperty, systemid, roleid, genidev, genidevs, agentType, agentUpDown, ipEqual, ip, macEqual, mac, riskNode, riskDefinitionId, beforeLoginTime, qsearch, ipUseOption);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getNodes: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$view = node; // String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)
$sort = {"field":"NL_IPSTR","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$subjid = 50; // String | Node Group (SUBJ_ID)
$perspective = node; // String | View Criteria (node, dev)
$licenseLimitExceededTime = 2026-11-10 10:00:00; // String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
$nid = All; // String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
$authdept = Sales; // String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
$deptcode = D001; // String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
$authuser = user01; // String | Authenticated user ID and user name included
$authuserExact = user01; // String | Authenticated user ID
$property = TAG_A; // String | Tag name (Node, MAC). Tag ID is not supported.
$nodeproperty = TAG_A; // String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
$macproperty = TAG_A; // String | MAC Tag
$systemid = 1; // String | Node Policy (SYSTEM_ID)
$roleid = 1; // String | Enforcement Policy (ROLE_ID)
$genidev = 2; // String | Node Type (CM_CODE)
$genidevs = 1,2; // String | Node Types (CM_CODEs separated by comma)
$agentType = agent_inst; // String | Agent installed (agent_inst: Installed, agent_noinst: Not installed)
$agentUpDown = UP; // String | Agent running (UP, DOWN)
$ipEqual = true; // Boolean | IP Match Full
$ip = 192.168.1.2; // String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
$macEqual = true; // Boolean | MAC Match Full
$mac = 00:11:22:33:44:55; // String | MAC
$riskNode = true; // Boolean | Anomalies detected
$riskDefinitionId = 1; // String | Anomaly Definition
$beforeLoginTime = 2026-11-10 10:00:00; // String | Logged in (yyyy-MM-dd hh:mm:ss)
$qsearch = 192.168.1.0/24; // String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
$ipUseOption = use; // String | IP state (all: All, use: Assigned, unuse: Available)

try {
    $result = $api_instance->getNodes($page, $pageSize, $view, $sort, $subjid, $perspective, $licenseLimitExceededTime, $nid, $authdept, $deptcode, $authuser, $authuserExact, $property, $nodeproperty, $macproperty, $systemid, $roleid, $genidev, $genidevs, $agentType, $agentUpDown, $ipEqual, $ip, $macEqual, $mac, $riskNode, $riskDefinitionId, $beforeLoginTime, $qsearch, $ipUseOption);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getNodes: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $view = node; # String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)
my $sort = {"field":"NL_IPSTR","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $subjid = 50; # String | Node Group (SUBJ_ID)
my $perspective = node; # String | View Criteria (node, dev)
my $licenseLimitExceededTime = 2026-11-10 10:00:00; # String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
my $nid = All; # String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
my $authdept = Sales; # String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
my $deptcode = D001; # String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
my $authuser = user01; # String | Authenticated user ID and user name included
my $authuserExact = user01; # String | Authenticated user ID
my $property = TAG_A; # String | Tag name (Node, MAC). Tag ID is not supported.
my $nodeproperty = TAG_A; # String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
my $macproperty = TAG_A; # String | MAC Tag
my $systemid = 1; # String | Node Policy (SYSTEM_ID)
my $roleid = 1; # String | Enforcement Policy (ROLE_ID)
my $genidev = 2; # String | Node Type (CM_CODE)
my $genidevs = 1,2; # String | Node Types (CM_CODEs separated by comma)
my $agentType = agent_inst; # String | Agent installed (agent_inst: Installed, agent_noinst: Not installed)
my $agentUpDown = UP; # String | Agent running (UP, DOWN)
my $ipEqual = true; # Boolean | IP Match Full
my $ip = 192.168.1.2; # String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
my $macEqual = true; # Boolean | MAC Match Full
my $mac = 00:11:22:33:44:55; # String | MAC
my $riskNode = true; # Boolean | Anomalies detected
my $riskDefinitionId = 1; # String | Anomaly Definition
my $beforeLoginTime = 2026-11-10 10:00:00; # String | Logged in (yyyy-MM-dd hh:mm:ss)
my $qsearch = 192.168.1.0/24; # String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
my $ipUseOption = use; # String | IP state (all: All, use: Assigned, unuse: Available)

eval { 
    my $result = $api_instance->getNodes(page => $page, pageSize => $pageSize, view => $view, sort => $sort, subjid => $subjid, perspective => $perspective, licenseLimitExceededTime => $licenseLimitExceededTime, nid => $nid, authdept => $authdept, deptcode => $deptcode, authuser => $authuser, authuserExact => $authuserExact, property => $property, nodeproperty => $nodeproperty, macproperty => $macproperty, systemid => $systemid, roleid => $roleid, genidev => $genidev, genidevs => $genidevs, agentType => $agentType, agentUpDown => $agentUpDown, ipEqual => $ipEqual, ip => $ip, macEqual => $macEqual, mac => $mac, riskNode => $riskNode, riskDefinitionId => $riskDefinitionId, beforeLoginTime => $beforeLoginTime, qsearch => $qsearch, ipUseOption => $ipUseOption);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getNodes: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
view = node # String | Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View) (default to node)
sort = {"field":"NL_IPSTR","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
subjid = 50 # String | Node Group (SUBJ_ID) (optional)
perspective = node # String | View Criteria (node, dev) (optional)
licenseLimitExceededTime = 2026-11-10 10:00:00 # String | Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1". (optional)
nid = All # String | Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group) (optional) (default to All)
authdept = Sales # String | Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column) (optional)
deptcode = D001 # String | Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments) (optional)
authuser = user01 # String | Authenticated user ID and user name included (optional)
authuserExact = user01 # String | Authenticated user ID (optional)
property = TAG_A # String | Tag name (Node, MAC). Tag ID is not supported. (optional)
nodeproperty = TAG_A # String | Node tag name. Returns the nodes that have this node tag. Tag ID is not supported. (optional)
macproperty = TAG_A # String | MAC Tag (optional)
systemid = 1 # String | Node Policy (SYSTEM_ID) (optional)
roleid = 1 # String | Enforcement Policy (ROLE_ID) (optional)
genidev = 2 # String | Node Type (CM_CODE) (optional)
genidevs = 1,2 # String | Node Types (CM_CODEs separated by comma) (optional)
agentType = agent_inst # String | Agent installed (agent_inst: Installed, agent_noinst: Not installed) (optional)
agentUpDown = UP # String | Agent running (UP, DOWN) (optional)
ipEqual = true # Boolean | IP Match Full (optional) (default to false)
ip = 192.168.1.2 # String | IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR. (optional)
macEqual = true # Boolean | MAC Match Full (optional) (default to false)
mac = 00:11:22:33:44:55 # String | MAC (optional)
riskNode = true # Boolean | Anomalies detected (optional)
riskDefinitionId = 1 # String | Anomaly Definition (optional)
beforeLoginTime = 2026-11-10 10:00:00 # String | Logged in (yyyy-MM-dd hh:mm:ss) (optional)
qsearch = 192.168.1.0/24 # String | Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24). (optional)
ipUseOption = use # String | IP state (all: All, use: Assigned, unuse: Available) (optional)

try: 
    # List Nodes
    api_response = api_instance.get_nodes(page, pageSize, view, sort=sort, subjid=subjid, perspective=perspective, licenseLimitExceededTime=licenseLimitExceededTime, nid=nid, authdept=authdept, deptcode=deptcode, authuser=authuser, authuserExact=authuserExact, property=property, nodeproperty=nodeproperty, macproperty=macproperty, systemid=systemid, roleid=roleid, genidev=genidev, genidevs=genidevs, agentType=agentType, agentUpDown=agentUpDown, ipEqual=ipEqual, ip=ip, macEqual=macEqual, mac=mac, riskNode=riskNode, riskDefinitionId=riskDefinitionId, beforeLoginTime=beforeLoginTime, qsearch=qsearch, ipUseOption=ipUseOption)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getNodes: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
view*
String
Views (summary: Overview, node: Node View, authuser: Authenticated User View, ipmgmt: IPAM View, risk: Anomaly View, pms: OS Update View, sms: Asset Management View, aa: Agent Action View, mediamgmt: External Device View)
Required
subjid
String
Node Group (SUBJ_ID)
perspective
String
View Criteria (node, dev)
licenseLimitExceededTime
String
Device registration time (yyyy-MM-dd HH:mm:ss). Nodes whose device was added after this time are returned with licenseLimitNode "1".
nid
String
Retrieval Scope (Node ID: Policy Server / Sensor Node ID, All: All, ObjGroup: Group)
authdept
String
Authenticated user's department name (equal search on NODELIST's NL_AUTHUSERDEPTNAME column)
deptcode
String
Authenticated user's department code (like search on USER's USER_DEPT column to include sub-departments)
authuser
String
Authenticated user ID and user name included
authuserExact
String
Authenticated user ID
property
String
Tag name (Node, MAC). Tag ID is not supported.
nodeproperty
String
Node tag name. Returns the nodes that have this node tag. Tag ID is not supported.
macproperty
String
MAC Tag
systemid
String
Node Policy (SYSTEM_ID)
roleid
String
Enforcement Policy (ROLE_ID)
genidev
String
Node Type (CM_CODE)
genidevs
String
Node Types (CM_CODEs separated by comma)
agentType
String
Agent installed (agent_inst: Installed, agent_noinst: Not installed)
agentUpDown
String
Agent running (UP, DOWN)
ipEqual
Boolean
IP Match Full
ip
String
IP. Single value only. Partial match unless ipEqual is true. Use qsearch for an IP range or CIDR.
macEqual
Boolean
MAC Match Full
mac
String
MAC
riskNode
Boolean
Anomalies detected
riskDefinitionId
String
Anomaly Definition
beforeLoginTime
String
Logged in (yyyy-MM-dd hh:mm:ss)
qsearch
String
Search string. Also accepts an IPv4 range (192.168.1.2-192.168.1.7) or CIDR (192.168.1.0/24).
ipUseOption
String
IP state (all: All, use: Assigned, unuse: Available)

Responses

Status: 200 - Success

Status: 400 - Invalid parameter

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getPatchStatisticsForNode

Retrieve a specific Node's information

Retrieves the OS update (patch) status of the Device of the Node specified. <code>notmeetpatch</code>=on (default) lists only missing patches of the assigned patch set; off lists all reported patches. Paging: <code>page</code>, <code>pageSize</code>, <code>sort</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/patchstat?apiKey={Key}&amp;page=1&amp;pageSize=30&amp;notmeetpatch=on"</pre>Response<pre>{"result":[{"UpdateID":"...","Title":"...",...}],"total":0,"page":1,"pageSize":30}</pre>For macOS nodes <code>notmeetpatch</code> is forced to off. <code>qsearch</code> is accepted but not used. Returns 404 for an unknown Node ID.


/nodes/{nodeId}/patchstat

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/patchstat?page=&pageSize=&sort=&qsearch=¬meetpatch="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CheckDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = KB5000001; // String | Not used. The server ignores this value.
        String notmeetpatch = on; // String | Whether patch is not satisfied or all
        try {
            NodePatchStatDoc result = apiInstance.getPatchStatisticsForNode(nodeId, page, pageSize, sort, qsearch, notmeetpatch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getPatchStatisticsForNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CheckDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = KB5000001; // String | Not used. The server ignores this value.
        String notmeetpatch = on; // String | Whether patch is not satisfied or all
        try {
            NodePatchStatDoc result = apiInstance.getPatchStatisticsForNode(nodeId, page, pageSize, sort, qsearch, notmeetpatch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getPatchStatisticsForNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"CheckDate","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *qsearch = KB5000001; // Not used. The server ignores this value. (optional)
String *notmeetpatch = on; // Whether patch is not satisfied or all (optional) (default to on)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's information
[apiInstance getPatchStatisticsForNodeWith:nodeId
    page:page
    pageSize:pageSize
    sort:sort
    qsearch:qsearch
    notmeetpatch:notmeetpatch
              completionHandler: ^(NodePatchStatDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"CheckDate","dir":"desc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'qsearch': KB5000001, // {String} Not used. The server ignores this value.
  'notmeetpatch': on // {String} Whether patch is not satisfied or all
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getPatchStatisticsForNode(nodeId, page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getPatchStatisticsForNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"CheckDate","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var qsearch = KB5000001;  // String | Not used. The server ignores this value. (optional) 
            var notmeetpatch = on;  // String | Whether patch is not satisfied or all (optional)  (default to on)

            try
            {
                // Retrieve a specific Node's information
                NodePatchStatDoc result = apiInstance.getPatchStatisticsForNode(nodeId, page, pageSize, sort, qsearch, notmeetpatch);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getPatchStatisticsForNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"CheckDate","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$qsearch = KB5000001; // String | Not used. The server ignores this value.
$notmeetpatch = on; // String | Whether patch is not satisfied or all

try {
    $result = $api_instance->getPatchStatisticsForNode($nodeId, $page, $pageSize, $sort, $qsearch, $notmeetpatch);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getPatchStatisticsForNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"CheckDate","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $qsearch = KB5000001; # String | Not used. The server ignores this value.
my $notmeetpatch = on; # String | Whether patch is not satisfied or all

eval { 
    my $result = $api_instance->getPatchStatisticsForNode(nodeId => $nodeId, page => $page, pageSize => $pageSize, sort => $sort, qsearch => $qsearch, notmeetpatch => $notmeetpatch);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getPatchStatisticsForNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"CheckDate","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
qsearch = KB5000001 # String | Not used. The server ignores this value. (optional)
notmeetpatch = on # String | Whether patch is not satisfied or all (optional) (default to on)

try: 
    # Retrieve a specific Node's information
    api_response = api_instance.get_patch_statistics_for_node(nodeId, page, pageSize, sort=sort, qsearch=qsearch, notmeetpatch=notmeetpatch)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getPatchStatisticsForNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
qsearch
String
Not used. The server ignores this value.
notmeetpatch
String
Whether patch is not satisfied or all

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getUpDownDatasOfNode

Retrieve a specific Node's connection status (UP / DOWN)

Retrieves the UP/DOWN history of the Node specified for the last 7 days, for drawing a status chart.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/updown?apiKey={Key}"</pre>Response<pre>[{"_time":1793672042564,"NODEUP":1},{"_time":1794276842564,"NODEUP":1}]</pre><code>_time</code> is epoch milliseconds and <code>NODEUP</code> is 1 (UP) or 0 (DOWN). When there is no change in the period, two points (7 days ago and now) with the current state are returned. An unknown Node ID returns an HTML error page with HTTP 200, not JSON.


/nodes/{nodeId}/updown

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{nodeId}/updown"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            array[NodeUpDownDoc] result = apiInstance.getUpDownDatasOfNode(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getUpDownDatasOfNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        try {
            array[NodeUpDownDoc] result = apiInstance.getUpDownDatasOfNode(nodeId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#getUpDownDatasOfNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieve a specific Node's connection status (UP / DOWN)
[apiInstance getUpDownDatasOfNodeWith:nodeId
              completionHandler: ^(array[NodeUpDownDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUpDownDatasOfNode(nodeId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUpDownDatasOfNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID

            try
            {
                // Retrieve a specific Node's connection status (UP / DOWN)
                array[NodeUpDownDoc] result = apiInstance.getUpDownDatasOfNode(nodeId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.getUpDownDatasOfNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID

try {
    $result = $api_instance->getUpDownDatasOfNode($nodeId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->getUpDownDatasOfNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID

eval { 
    my $result = $api_instance->getUpDownDatasOfNode(nodeId => $nodeId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->getUpDownDatasOfNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID

try: 
    # Retrieve a specific Node's connection status (UP / DOWN)
    api_response = api_instance.get_up_down_datas_of_node(nodeId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->getUpDownDatasOfNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


managementScope

Retrieves a specific IP address's state

Checks whether an IP address is managed. If Nodes use the IP, they are returned. Otherwise the sensor whose network includes the IP is returned.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/nodes/192.168.1.2/managementscope?apiKey={Key}"</pre>Response<pre>[{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2","nl_mac":"00:11:22:33:44:55","nl_sensornid":"{Sensor Node ID}","nl_genidev":20}]</pre>For an IP without a node, <code>nl_nodeid</code>, <code>nl_mac</code> and <code>nl_genidev</code> are null and only <code>nl_sensornid</code> is set. Errors: 404 "IP Not Found" when no sensor covers the IP, 400 for an invalid IP.


/nodes/{ip}/managementscope

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/nodes/{ip}/managementscope"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String ip = 192.168.1.2; // String | IP
        try {
            array[IP Value Object] result = apiInstance.managementScope(ip);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#managementScope");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String ip = 192.168.1.2; // String | IP
        try {
            array[IP Value Object] result = apiInstance.managementScope(ip);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#managementScope");
            e.printStackTrace();
        }
    }
}
String *ip = 192.168.1.2; // IP

NodesApi *apiInstance = [[NodesApi alloc] init];

// Retrieves a specific IP address's state
[apiInstance managementScopeWith:ip
              completionHandler: ^(array[IP Value Object] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var ip = 192.168.1.2; // {String} IP


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.managementScope(ip, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class managementScopeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var ip = 192.168.1.2;  // String | IP

            try
            {
                // Retrieves a specific IP address's state
                array[IP Value Object] result = apiInstance.managementScope(ip);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.managementScope: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$ip = 192.168.1.2; // String | IP

try {
    $result = $api_instance->managementScope($ip);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->managementScope: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $ip = 192.168.1.2; # String | IP

eval { 
    my $result = $api_instance->managementScope(ip => $ip);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->managementScope: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
ip = 192.168.1.2 # String | IP

try: 
    # Retrieves a specific IP address's state
    api_response = api_instance.management_scope(ip)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->managementScope: %s\n" % e)

Parameters

Path parameters
Name Description
ip*
String
IP
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - IP not found


nodeAuth

Require a specific Node's User Authentication

Authenticates a user on the Node specified (same as user login on the captive portal). Form data: <code>userId</code>, <code>passwd</code>, <code>passCheck</code> (1: check the password, 0: authenticate without the password).<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/auth?apiKey={Key}" --data-urlencode "userId=user01" --data-urlencode "passwd={Password}" --data-urlencode "passCheck=1"</pre>Response<pre>{"ip":"192.168.1.2","mac":"00:11:22:33:44:55","nodeId":"{Node ID}","resultCode":0}</pre>Errors: 406 with <code>param.resultCode</code> and <code>param.message</code> when authentication fails, 404 for an unknown Node ID, 500 on an internal error.


/nodes/{nodeId}/auth

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/nodes/{nodeId}/auth"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String userId = user01; // String | Username (USER_ID)
        String passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
        String passwd = password1; // String | Password
        try {
            NodeAuthResultDoc result = apiInstance.nodeAuth(nodeId, userId, passCheck, passwd);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodeAuth");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String userId = user01; // String | Username (USER_ID)
        String passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
        String passwd = password1; // String | Password
        try {
            NodeAuthResultDoc result = apiInstance.nodeAuth(nodeId, userId, passCheck, passwd);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodeAuth");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *userId = user01; // Username (USER_ID)
String *passCheck = 1; // Password check (1: Check, Leave blank not to check) (default to 1)
String *passwd = password1; // Password (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Require a specific Node's User Authentication
[apiInstance nodeAuthWith:nodeId
    userId:userId
    passCheck:passCheck
    passwd:passwd
              completionHandler: ^(NodeAuthResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var userId = user01; // {String} Username (USER_ID)

var passCheck = 1; // {String} Password check (1: Check, Leave blank not to check)

var opts = { 
  'passwd': password1 // {String} Password
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodeAuth(nodeId, userId, passCheck, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodeAuthExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var userId = user01;  // String | Username (USER_ID)
            var passCheck = 1;  // String | Password check (1: Check, Leave blank not to check) (default to 1)
            var passwd = password1;  // String | Password (optional) 

            try
            {
                // Require a specific Node's User Authentication
                NodeAuthResultDoc result = apiInstance.nodeAuth(nodeId, userId, passCheck, passwd);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodeAuth: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$userId = user01; // String | Username (USER_ID)
$passCheck = 1; // String | Password check (1: Check, Leave blank not to check)
$passwd = password1; // String | Password

try {
    $result = $api_instance->nodeAuth($nodeId, $userId, $passCheck, $passwd);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodeAuth: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $userId = user01; # String | Username (USER_ID)
my $passCheck = 1; # String | Password check (1: Check, Leave blank not to check)
my $passwd = password1; # String | Password

eval { 
    my $result = $api_instance->nodeAuth(nodeId => $nodeId, userId => $userId, passCheck => $passCheck, passwd => $passwd);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodeAuth: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
userId = user01 # String | Username (USER_ID)
passCheck = 1 # String | Password check (1: Check, Leave blank not to check) (default to 1)
passwd = password1 # String | Password (optional)

try: 
    # Require a specific Node's User Authentication
    api_response = api_instance.node_auth(nodeId, userId, passCheck, passwd=passwd)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodeAuth: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Form parameters
Name Description
userId*
String
Username (USER_ID)
Required
passwd
String
Password
passCheck*
String
Password check (1: Check, Leave blank not to check)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 500 - Internal Server Error


nodeLogout

Deauthenticate a specific Node

Removes the user authentication from the Node specified. <code>authby</code>=cwp (default) logs out the captive portal session; mc clears the authentication from the policy server.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/auth?apiKey={Key}&amp;authby=cwp"</pre>Response<pre>{"ip":"192.168.1.2","mac":"00:11:22:33:44:55","nodeId":"{Node ID}","resultCode":0}</pre>Errors: 406 with <code>param.resultCode</code> 1 when the node was not authenticated or logout failed, 404 for an unknown Node ID. Do not send a form Content-Type (415).


/nodes/{nodeId}/auth

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/nodes/{nodeId}/auth?authby="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String authby = cwp; // String | Authentication by
        try {
            NodeAuthResultDoc result = apiInstance.nodeLogout(nodeId, authby);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodeLogout");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String authby = cwp; // String | Authentication by
        try {
            NodeAuthResultDoc result = apiInstance.nodeLogout(nodeId, authby);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#nodeLogout");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *authby = cwp; // Authentication by (optional) (default to cwp)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Deauthenticate a specific Node
[apiInstance nodeLogoutWith:nodeId
    authby:authby
              completionHandler: ^(NodeAuthResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var opts = { 
  'authby': cwp // {String} Authentication by
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.nodeLogout(nodeId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class nodeLogoutExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var authby = cwp;  // String | Authentication by (optional)  (default to cwp)

            try
            {
                // Deauthenticate a specific Node
                NodeAuthResultDoc result = apiInstance.nodeLogout(nodeId, authby);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.nodeLogout: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$authby = cwp; // String | Authentication by

try {
    $result = $api_instance->nodeLogout($nodeId, $authby);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->nodeLogout: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $authby = cwp; # String | Authentication by

eval { 
    my $result = $api_instance->nodeLogout(nodeId => $nodeId, authby => $authby);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->nodeLogout: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
authby = cwp # String | Authentication by (optional) (default to cwp)

try: 
    # Deauthenticate a specific Node
    api_response = api_instance.node_logout(nodeId, authby=authby)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->nodeLogout: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
authby
String
Authentication by

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 406 - Not Acceptable

Status: 500 - Internal Server Error


performNodeActionOnNode

Run a specific Node's Node Action

Sends a Node Action to the Node specified. <code>nodeaction</code>: 1 node information scan, 7 OS update, 8 run agent actions, 10 send asset information, 12 reapply node policy, 18 start agent, 19 stop agent, 20 agent update, 21 failure recovery, 25 integrity check, 27 collect agent logs.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/nodeaction?apiKey={Key}&amp;nodeaction=1"</pre>Response<pre>{"code":200,"message":"","parameter":{"nodeaction":"1","nodeId":"{Node ID}"},"data":null}</pre>The result is always HTTP 200; check <code>code</code> in the body (404 for an unknown Node ID). <code>code</code> 200 only means the request was handed over; it is also 200 when the hand-over fails.


/nodes/{nodeId}/nodeaction

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}/nodeaction?nodeaction="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String nodeaction = 1; // String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)
        try {
            NodeActionResultDoc result = apiInstance.performNodeActionOnNode(nodeId, nodeaction);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#performNodeActionOnNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        String nodeaction = 1; // String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)
        try {
            NodeActionResultDoc result = apiInstance.performNodeActionOnNode(nodeId, nodeaction);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#performNodeActionOnNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
String *nodeaction = 1; // Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Run a specific Node's Node Action
[apiInstance performNodeActionOnNodeWith:nodeId
    nodeaction:nodeaction
              completionHandler: ^(NodeActionResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var nodeaction = 1; // {String} Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.performNodeActionOnNode(nodeId, nodeaction, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class performNodeActionOnNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var nodeaction = 1;  // String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)

            try
            {
                // Run a specific Node's Node Action
                NodeActionResultDoc result = apiInstance.performNodeActionOnNode(nodeId, nodeaction);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.performNodeActionOnNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$nodeaction = 1; // String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)

try {
    $result = $api_instance->performNodeActionOnNode($nodeId, $nodeaction);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->performNodeActionOnNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $nodeaction = 1; # String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)

eval { 
    my $result = $api_instance->performNodeActionOnNode(nodeId => $nodeId, nodeaction => $nodeaction);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->performNodeActionOnNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
nodeaction = 1 # String | Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)

try: 
    # Run a specific Node's Node Action
    api_response = api_instance.perform_node_action_on_node(nodeId, nodeaction)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->performNodeActionOnNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Query parameters
Name Description
nodeaction*
String
Node Action (1: Node Information scanning, 7: OS Update, 8: Excute Agent actions, 10: Send the node asset information, 12: Reapplying node policies, 18: Start Agent service, 19: Stop Agent service, 20: Agent Update, 21: Server failure Recovery, 25: Integrity Verification27: Collect Agent Logs)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


updateDevice

Update an existing Node

Updates the Device of the Node specified. Fields sent in the body (an empty string included) overwrite the stored values (for example <code>dl_name</code>, <code>dl_desc</code>, <code>dl_ownerid</code>, <code>dl_custom01</code> ~ <code>dl_custom09</code>). Device asset data can be sent in <code>devInfoAllAsset</code>.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/device?apiKey={Key}" -H "Content-Type: application/json" -d '{"dl_name":"PC-01","dl_desc":"Lobby PC"}'</pre>Response<pre>{"dl_name":"PC-01","dl_desc":"Lobby PC",...}</pre>The response echoes the request body. Do not send the <code>dev</code> object of GET /nodes/{nodeId} as is: fields such as <code>meetPatchSet</code> are rejected with 400 (plain text). Returns 404 "not found node." / "not found device." for an unknown Node or Device.


/nodes/{nodeId}/device

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}/device"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        DeviceVo body = ; // DeviceVo | DeviceVo JSON
        try {
            DeviceVo result = apiInstance.updateDevice(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateDevice");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        DeviceVo body = ; // DeviceVo | DeviceVo JSON
        try {
            DeviceVo result = apiInstance.updateDevice(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateDevice");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
DeviceVo *body = ; // DeviceVo JSON

NodesApi *apiInstance = [[NodesApi alloc] init];

// Update an existing Node
[apiInstance updateDeviceWith:nodeId
    body:body
              completionHandler: ^(DeviceVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {DeviceVo} DeviceVo JSON


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateDevice(nodeId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateDeviceExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new DeviceVo(); // DeviceVo | DeviceVo JSON

            try
            {
                // Update an existing Node
                DeviceVo result = apiInstance.updateDevice(nodeId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.updateDevice: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // DeviceVo | DeviceVo JSON

try {
    $result = $api_instance->updateDevice($nodeId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->updateDevice: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = WWW::SwaggerClient::Object::DeviceVo->new(); # DeviceVo | DeviceVo JSON

eval { 
    my $result = $api_instance->updateDevice(nodeId => $nodeId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->updateDevice: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # DeviceVo | DeviceVo JSON

try: 
    # Update an existing Node
    api_response = api_instance.update_device(nodeId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->updateDevice: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


updateDeviceAsset

Modify asset information of the device

Updates the asset information (purchase date, supplier, serial number, memo, <code>ni_custom01</code> ~ <code>ni_custom20</code>) of the Device. The target Device is <code>ni_devid</code> in the body; the Node ID in the path is only checked to exist. The Device ID is the <code>dl_id</code> of <code>dev</code> in GET /nodes/{nodeId}.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/device/asset?apiKey={Key}" -H "Content-Type: application/json" -d '{"ni_devid":"{Device ID}","ni_serialNumber":"SN-0001","ni_purchaseDate":"2026-01-02","ni_memo":"sample"}'</pre>Response<pre>{"ni_devid":"{Device ID}","ni_purchaseDate":1767312000000,"ni_serialNumber":"SN-0001","ni_memo":"sample","ni_supplier":"",...}</pre>The whole asset record is replaced: fields not sent become empty. Dates are <code>yyyy-MM-dd</code> and returned as epoch milliseconds. Errors: 500 when <code>ni_devid</code> is missing, 404 "not found node." for an unknown Node ID.


/nodes/{nodeId}/device/asset

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}/device/asset"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        DevInfoAllAssetVo body = ; // DevInfoAllAssetVo | DevInfoAllAssetVo JSON
        try {
            DevInfoAllAssetVo result = apiInstance.updateDeviceAsset(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateDeviceAsset");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        DevInfoAllAssetVo body = ; // DevInfoAllAssetVo | DevInfoAllAssetVo JSON
        try {
            DevInfoAllAssetVo result = apiInstance.updateDeviceAsset(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateDeviceAsset");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
DevInfoAllAssetVo *body = ; // DevInfoAllAssetVo JSON

NodesApi *apiInstance = [[NodesApi alloc] init];

// Modify asset information of the device
[apiInstance updateDeviceAssetWith:nodeId
    body:body
              completionHandler: ^(DevInfoAllAssetVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {DevInfoAllAssetVo} DevInfoAllAssetVo JSON


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateDeviceAsset(nodeId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateDeviceAssetExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new DevInfoAllAssetVo(); // DevInfoAllAssetVo | DevInfoAllAssetVo JSON

            try
            {
                // Modify asset information of the device
                DevInfoAllAssetVo result = apiInstance.updateDeviceAsset(nodeId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.updateDeviceAsset: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // DevInfoAllAssetVo | DevInfoAllAssetVo JSON

try {
    $result = $api_instance->updateDeviceAsset($nodeId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->updateDeviceAsset: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = WWW::SwaggerClient::Object::DevInfoAllAssetVo->new(); # DevInfoAllAssetVo | DevInfoAllAssetVo JSON

eval { 
    my $result = $api_instance->updateDeviceAsset(nodeId => $nodeId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->updateDeviceAsset: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # DevInfoAllAssetVo | DevInfoAllAssetVo JSON

try: 
    # Modify asset information of the device
    api_response = api_instance.update_device_asset(nodeId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->updateDeviceAsset: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


updateNode

Update an existing Node

Updates an existing Node. Only the fields in the body that are not null are changed. Updatable fields: <code>nl_name</code>, <code>nl_desc</code>, <code>nl_genidev</code>, <code>nl_genidevconfirm</code>, <code>nl_genidev2</code>, <code>nl_genidev2confirm</code>, <code>nl_flags</code>, <code>nl_fqdn</code>, <code>nl_platform</code>, <code>nl_platformconfirm</code>, <code>nl_domain</code>, <code>nl_dnsname</code>, <code>nl_osdetect</code>, <code>nl_osconfirm</code>, <code>nl_custom01</code> ~ <code>nl_custom20</code>.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"nl_name":"PC-01","nl_desc":"Lobby PC"}'</pre>Response<pre>{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2","nl_mac":"00:11:22:33:44:55","nl_name":"PC-01","nl_desc":"Lobby PC",...}</pre>The response is the updated Node (same fields as <code>node</code> in GET /nodes/{nodeId}). Returns 404 "Node not found" for an unknown Node ID.


/nodes/{nodeId}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        NodeVo body = ; // NodeVo | NodeVo JSON
        try {
            NodeListVo result = apiInstance.updateNode(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateNode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        NodeVo body = ; // NodeVo | NodeVo JSON
        try {
            NodeListVo result = apiInstance.updateNode(nodeId, body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateNode");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
NodeVo *body = ; // NodeVo JSON

NodesApi *apiInstance = [[NodesApi alloc] init];

// Update an existing Node
[apiInstance updateNodeWith:nodeId
    body:body
              completionHandler: ^(NodeListVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {NodeVo} NodeVo JSON


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateNode(nodeId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNodeExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new NodeVo(); // NodeVo | NodeVo JSON

            try
            {
                // Update an existing Node
                NodeListVo result = apiInstance.updateNode(nodeId, body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.updateNode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // NodeVo | NodeVo JSON

try {
    $result = $api_instance->updateNode($nodeId, $body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->updateNode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = WWW::SwaggerClient::Object::NodeVo->new(); # NodeVo | NodeVo JSON

eval { 
    my $result = $api_instance->updateNode(nodeId => $nodeId, body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->updateNode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # NodeVo | NodeVo JSON

try: 
    # Update an existing Node
    api_response = api_instance.update_node(nodeId, body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->updateNode: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


updateNodePolicy

Update an existing Node

Changes the node policy settings (IP/MAC policy, user authentication policy, hostname policy, block log, node scan, deletion protection) of the Node specified. Only items present in the body are applied. If <code>comment</code> is given it is also written to the node description.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/nodes/{Node ID}/policy?apiKey={Key}&amp;comment=reason" -H "Content-Type: application/json" -d '{"blocklog":true,"nodescan":true,"permanent":false}'</pre>Response<pre>{"code":200,"message":"","parameter":{"nodeid":"{Node ID}","comment":"reason","nodePolicyVo":{...}},"data":null}</pre>Use GET /nodes/{nodeId}/policy to read the current values and the field format. The result is always HTTP 200; check <code>code</code> in the body: 404 "not found node.", 400 "can't apply Genian's Module." for system nodes (sensor, policy server), 400 when the body is empty.


/nodes/{nodeId}/policy

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/nodes/{nodeId}/policy?comment="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.NodesApi;

import java.io.File;
import java.util.*;

public class NodesApiExample {

    public static void main(String[] args) {
        
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        NodePolicyVo body = ; // NodePolicyVo | Node Policy Vo JSON
        String comment = reason; // String | Comment
        try {
            NodePolicyResultDoc result = apiInstance.updateNodePolicy(nodeId, body, comment);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateNodePolicy");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.NodesApi;

public class NodesApiExample {

    public static void main(String[] args) {
        NodesApi apiInstance = new NodesApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
        NodePolicyVo body = ; // NodePolicyVo | Node Policy Vo JSON
        String comment = reason; // String | Comment
        try {
            NodePolicyResultDoc result = apiInstance.updateNodePolicy(nodeId, body, comment);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling NodesApi#updateNodePolicy");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Node ID
NodePolicyVo *body = ; // Node Policy Vo JSON
String *comment = reason; // Comment (optional)

NodesApi *apiInstance = [[NodesApi alloc] init];

// Update an existing Node
[apiInstance updateNodePolicyWith:nodeId
    body:body
    comment:comment
              completionHandler: ^(NodePolicyResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.NodesApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Node ID

var body = ; // {NodePolicyVo} Node Policy Vo JSON

var opts = { 
  'comment': reason // {String} Comment
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateNodePolicy(nodeId, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNodePolicyExample
    {
        public void main()
        {
            
            var apiInstance = new NodesApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Node ID
            var body = new NodePolicyVo(); // NodePolicyVo | Node Policy Vo JSON
            var comment = reason;  // String | Comment (optional) 

            try
            {
                // Update an existing Node
                NodePolicyResultDoc result = apiInstance.updateNodePolicy(nodeId, body, comment);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling NodesApi.updateNodePolicy: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\NodesApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Node ID
$body = ; // NodePolicyVo | Node Policy Vo JSON
$comment = reason; // String | Comment

try {
    $result = $api_instance->updateNodePolicy($nodeId, $body, $comment);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling NodesApi->updateNodePolicy: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::NodesApi;

my $api_instance = WWW::SwaggerClient::NodesApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Node ID
my $body = WWW::SwaggerClient::Object::NodePolicyVo->new(); # NodePolicyVo | Node Policy Vo JSON
my $comment = reason; # String | Comment

eval { 
    my $result = $api_instance->updateNodePolicy(nodeId => $nodeId, body => $body, comment => $comment);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling NodesApi->updateNodePolicy: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.NodesApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Node ID
body =  # NodePolicyVo | Node Policy Vo JSON
comment = reason # String | Comment (optional)

try: 
    # Update an existing Node
    api_response = api_instance.update_node_policy(nodeId, body, comment=comment)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling NodesApi->updateNodePolicy: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Node ID
Required
Body parameters
Name Description
body *
Query parameters
Name Description
comment
String
Comment

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


Policies

apply

Apply Policy

Applies the pending policy changes (the same as Apply in the Web Console). No body is needed.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/policies/apply?apiKey={Key}" -H "Content-Type: application/json"</pre>Response<pre>{"code":200,"message":"...","parameter":null,"data":1794244201000}</pre><code>data</code> is the change date returned by the apply and <code>message</code> is the result message. Always HTTP 200; an error during apply gives <code>code</code> 500 in the body. The policy is pushed to the sensors, so run this only when you intend to apply all pending changes.


/policies/apply

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/policies/apply"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        try {
            PolApplyDoc result = apiInstance.apply();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#apply");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        try {
            PolApplyDoc result = apiInstance.apply();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#apply");
            e.printStackTrace();
        }
    }
}

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// Apply Policy
[apiInstance applyWithCompletionHandler: 
              ^(PolApplyDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.apply(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class applyExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();

            try
            {
                // Apply Policy
                PolApplyDoc result = apiInstance.apply();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.apply: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();

try {
    $result = $api_instance->apply();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->apply: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();

eval { 
    my $result = $api_instance->apply();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->apply: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()

try: 
    # Apply Policy
    api_response = api_instance.apply()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->apply: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


createNetworkObject

Add a new network object

Creates a Network Object. The change takes effect after the policy is applied (POST /policies/apply).<br/><code>net_type</code>: 1 IP and netmask (<code>net_ip1str</code>, <code>net_ip2str</code>), 2 range (start and end IP), 3 FQDN (<code>net_fqdn</code>, <code>net_ttl</code>). <code>childIds</code> lists other Network Objects separated by <code>;</code>. Either <code>netvoList</code> or <code>childIds</code> is required. Note the key spelling <code>descripton</code>.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/policies/object/networks?apiKey={Key}" -H "Content-Type: application/json" -d '{"id":"NET_A","descripton":"Sample","netvoList":[{"net_type":1,"net_ip1str":"192.168.1.0","net_ip2str":"255.255.255.0"},{"net_type":3,"net_fqdn":"www.example.com","net_ttl":3600}]}'</pre>Response<pre>{"code":200,"message":"","parameter":{"id":"NET_A",...},"data":null}</pre>Always HTTP 200; check <code>code</code> in the body. 400 is returned for a missing or invalid ID, too many or circular child objects, or no conditions. There is no delete API; delete objects in the Web Console.


/policies/object/networks

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/policies/object/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        네트워크 객체 body = ; // 네트워크 객체 | Network Object
        try {
            PolNetworkObjectSaveDoc result = apiInstance.createNetworkObject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#createNetworkObject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        네트워크 객체 body = ; // 네트워크 객체 | Network Object
        try {
            PolNetworkObjectSaveDoc result = apiInstance.createNetworkObject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#createNetworkObject");
            e.printStackTrace();
        }
    }
}
네트워크 객체 *body = ; // Network Object

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// Add a new network object
[apiInstance createNetworkObjectWith:body
              completionHandler: ^(PolNetworkObjectSaveDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var body = ; // {네트워크 객체} Network Object


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createNetworkObject(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createNetworkObjectExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var body = new 네트워크 객체(); // 네트워크 객체 | Network Object

            try
            {
                // Add a new network object
                PolNetworkObjectSaveDoc result = apiInstance.createNetworkObject(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.createNetworkObject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$body = ; // 네트워크 객체 | Network Object

try {
    $result = $api_instance->createNetworkObject($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->createNetworkObject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $body = WWW::SwaggerClient::Object::네트워크 객체->new(); # 네트워크 객체 | Network Object

eval { 
    my $result = $api_instance->createNetworkObject(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->createNetworkObject: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
body =  # 네트워크 객체 | Network Object

try: 
    # Add a new network object
    api_response = api_instance.create_network_object(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->createNetworkObject: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Successfully created network object

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getEnforcementPolicies

List Enforcement Policies

Retrieves a list of the Enforcement Policies.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/policies/enforcementpolicies?apiKey={Key}"</pre>Each row in <code>result</code> has <code>role_id</code>, <code>role_name</code>, <code>role_order</code> and <code>role_mode</code>.


/policies/enforcementpolicies

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/policies/enforcementpolicies?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"role_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolEnforcementListDoc result = apiInstance.getEnforcementPolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getEnforcementPolicies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"role_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolEnforcementListDoc result = apiInstance.getEnforcementPolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getEnforcementPolicies");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"role_order","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// List Enforcement Policies
[apiInstance getEnforcementPoliciesWith:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(PolEnforcementListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"role_order","dir":"asc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getEnforcementPolicies(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getEnforcementPoliciesExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"role_order","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // List Enforcement Policies
                PolEnforcementListDoc result = apiInstance.getEnforcementPolicies(page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.getEnforcementPolicies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"role_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getEnforcementPolicies($page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->getEnforcementPolicies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"role_order","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getEnforcementPolicies(page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->getEnforcementPolicies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"role_order","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # List Enforcement Policies
    api_response = api_instance.get_enforcement_policies(page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->getEnforcementPolicies: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNetworkObject

Retrieve a specific network object

Retrieves the Network Object specified. The ID is <code>og_id</code> from GET /policies/object/networks; URL-encode IDs with special characters.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/policies/object/networks/{Network Object ID}?apiKey={Key}"</pre>Response<pre>{"code":200,"message":"","parameter":"NET_A","data":{"id":"NET_A","type":2,"childIds":"","descripton":"","netvoList":[{"net_id":"NET_A","net_type":1,"net_ip1str":"192.168.1.0","net_ip2str":"192.168.1.255","net_fqdn":"","net_ttl":0,"netAsUIString":"192.168.1.0/255.255.255.0"}]}}</pre><code>net_type</code>: 1 IP/netmask, 2 range, 3 FQDN. For type 1 the response has the network and broadcast address. An unknown ID returns HTTP 200 with <code>code</code> 404 in the body.


/policies/object/networks/{id}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/policies/object/networks/{id}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        String id = NET_A; // String | Network Object ID
        try {
            PolNetworkObjectMessageDoc result = apiInstance.getNetworkObject(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNetworkObject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        String id = NET_A; // String | Network Object ID
        try {
            PolNetworkObjectMessageDoc result = apiInstance.getNetworkObject(id);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNetworkObject");
            e.printStackTrace();
        }
    }
}
String *id = NET_A; // Network Object ID

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// Retrieve a specific network object
[apiInstance getNetworkObjectWith:id
              completionHandler: ^(PolNetworkObjectMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var id = NET_A; // {String} Network Object ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNetworkObject(id, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNetworkObjectExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var id = NET_A;  // String | Network Object ID

            try
            {
                // Retrieve a specific network object
                PolNetworkObjectMessageDoc result = apiInstance.getNetworkObject(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.getNetworkObject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$id = NET_A; // String | Network Object ID

try {
    $result = $api_instance->getNetworkObject($id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->getNetworkObject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $id = NET_A; # String | Network Object ID

eval { 
    my $result = $api_instance->getNetworkObject(id => $id);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->getNetworkObject: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
id = NET_A # String | Network Object ID

try: 
    # Retrieve a specific network object
    api_response = api_instance.get_network_object(id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->getNetworkObject: %s\n" % e)

Parameters

Path parameters
Name Description
id*
String
Network Object ID
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNetworkObjects

List of network objects

Retrieves a list of the networks objects.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/policies/object/networks?apiKey={Key}"</pre>Each row in <code>result</code> has <code>og_id</code>, <code>og_desc</code> and <code>og_class</code>.


/policies/object/networks

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/policies/object/networks?page=&pageSize=&sort=&qsearch="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"og_id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = NET_A; // String | Search string
        try {
            PolNetworkObjectListDoc result = apiInstance.getNetworkObjects(page, pageSize, sort, qsearch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNetworkObjects");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"og_id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        String qsearch = NET_A; // String | Search string
        try {
            PolNetworkObjectListDoc result = apiInstance.getNetworkObjects(page, pageSize, sort, qsearch);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNetworkObjects");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"og_id","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
String *qsearch = NET_A; // Search string (optional)

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// List of network objects
[apiInstance getNetworkObjectsWith:page
    pageSize:pageSize
    sort:sort
    qsearch:qsearch
              completionHandler: ^(PolNetworkObjectListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"og_id","dir":"asc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
  'qsearch': NET_A // {String} Search string
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNetworkObjects(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNetworkObjectsExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"og_id","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 
            var qsearch = NET_A;  // String | Search string (optional) 

            try
            {
                // List of network objects
                PolNetworkObjectListDoc result = apiInstance.getNetworkObjects(page, pageSize, sort, qsearch);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.getNetworkObjects: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"og_id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
$qsearch = NET_A; // String | Search string

try {
    $result = $api_instance->getNetworkObjects($page, $pageSize, $sort, $qsearch);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->getNetworkObjects: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"og_id","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
my $qsearch = NET_A; # String | Search string

eval { 
    my $result = $api_instance->getNetworkObjects(page => $page, pageSize => $pageSize, sort => $sort, qsearch => $qsearch);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->getNetworkObjects: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"og_id","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)
qsearch = NET_A # String | Search string (optional)

try: 
    # List of network objects
    api_response = api_instance.get_network_objects(page, pageSize, sort=sort, qsearch=qsearch)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->getNetworkObjects: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
qsearch
String
Search string

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getNodePolicies

List Node Policies

Retrieves a list of the Node Policies.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/policies/nodepolicies?apiKey={Key}"</pre>Each row in <code>result</code> has <code>system_id</code>, <code>system_name</code>, <code>system_order</code> and <code>system_mode</code>.


/policies/nodepolicies

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/policies/nodepolicies?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"system_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolNodePolicyListDoc result = apiInstance.getNodePolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNodePolicies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"system_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolNodePolicyListDoc result = apiInstance.getNodePolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getNodePolicies");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"system_order","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// List Node Policies
[apiInstance getNodePoliciesWith:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(PolNodePolicyListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"system_order","dir":"asc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getNodePolicies(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getNodePoliciesExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"system_order","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // List Node Policies
                PolNodePolicyListDoc result = apiInstance.getNodePolicies(page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.getNodePolicies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"system_order","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getNodePolicies($page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->getNodePolicies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"system_order","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getNodePolicies(page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->getNodePolicies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"system_order","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # List Node Policies
    api_response = api_instance.get_node_policies(page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->getNodePolicies: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getWlanPolicies

List Wlan Policies

Retrieves a list of the WLAN Policies (SSID policies).<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/policies/wlanpolicies?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"result":[{"id":1,"ssid":"CORP-WLAN","type":0,"mode":0,"description":"","apProfileId":1,"apApplyType":0,"apApplyTags":"","apTime_id":"","clientProfileId":1,"macList":""}],"total":1,"page":1,"pageSize":30}</pre>Returns <code>{"result":[],"total":0}</code> when no WLAN Policy exists. The fields are the SSID columns listed above.


/policies/wlanpolicies

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/policies/wlanpolicies?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolWlanListDoc result = apiInstance.getWlanPolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getWlanPolicies");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
        try {
            PolWlanListDoc result = apiInstance.getWlanPolicies(page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#getWlanPolicies");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"id","dir":"asc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// List Wlan Policies
[apiInstance getWlanPoliciesWith:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(PolWlanListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"id","dir":"asc"} // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getWlanPolicies(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getWlanPoliciesExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"id","dir":"asc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional) 

            try
            {
                // List Wlan Policies
                PolWlanListDoc result = apiInstance.getWlanPolicies(page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.getWlanPolicies: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"id","dir":"asc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

try {
    $result = $api_instance->getWlanPolicies($page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->getWlanPolicies: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"id","dir":"asc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

eval { 
    my $result = $api_instance->getWlanPolicies(page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->getWlanPolicies: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"id","dir":"asc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"}) (optional)

try: 
    # List Wlan Policies
    api_response = api_instance.get_wlan_policies(page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->getWlanPolicies: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


updateNetworkObject

Update an existing network object

Updates an existing Network Object. <code>id</code> in the body selects the object. The conditions are replaced by <code>netvoList</code>, so send the full list. The change takes effect after the policy is applied (POST /policies/apply).<br/><code>net_type</code>: 1 IP and netmask (<code>net_ip1str</code>, <code>net_ip2str</code>), 2 range (start and end IP), 3 FQDN (<code>net_fqdn</code>, <code>net_ttl</code>). <code>childIds</code> lists other Network Objects separated by <code>;</code>. Either <code>netvoList</code> or <code>childIds</code> is required. Note the key spelling <code>descripton</code>.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/policies/object/networks?apiKey={Key}" -H "Content-Type: application/json" -d '{"id":"NET_A","descripton":"Sample","netvoList":[{"net_type":1,"net_ip1str":"192.168.1.0","net_ip2str":"255.255.255.0"},{"net_type":3,"net_fqdn":"www.example.com","net_ttl":3600}]}'</pre>Response<pre>{"code":200,"message":"","parameter":{"id":"NET_A",...},"data":null}</pre>Always HTTP 200; check <code>code</code> in the body (400 for invalid input, 500 when saving fails).


/policies/object/networks

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/policies/object/networks"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.PoliciesApi;

import java.io.File;
import java.util.*;

public class PoliciesApiExample {

    public static void main(String[] args) {
        
        PoliciesApi apiInstance = new PoliciesApi();
        네트워크 객체 body = ; // 네트워크 객체 | Network Object
        try {
            PolNetworkObjectSaveDoc result = apiInstance.updateNetworkObject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#updateNetworkObject");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.PoliciesApi;

public class PoliciesApiExample {

    public static void main(String[] args) {
        PoliciesApi apiInstance = new PoliciesApi();
        네트워크 객체 body = ; // 네트워크 객체 | Network Object
        try {
            PolNetworkObjectSaveDoc result = apiInstance.updateNetworkObject(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling PoliciesApi#updateNetworkObject");
            e.printStackTrace();
        }
    }
}
네트워크 객체 *body = ; // Network Object

PoliciesApi *apiInstance = [[PoliciesApi alloc] init];

// Update an existing network object
[apiInstance updateNetworkObjectWith:body
              completionHandler: ^(PolNetworkObjectSaveDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.PoliciesApi()

var body = ; // {네트워크 객체} Network Object


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.updateNetworkObject(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateNetworkObjectExample
    {
        public void main()
        {
            
            var apiInstance = new PoliciesApi();
            var body = new 네트워크 객체(); // 네트워크 객체 | Network Object

            try
            {
                // Update an existing network object
                PolNetworkObjectSaveDoc result = apiInstance.updateNetworkObject(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PoliciesApi.updateNetworkObject: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\PoliciesApi();
$body = ; // 네트워크 객체 | Network Object

try {
    $result = $api_instance->updateNetworkObject($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PoliciesApi->updateNetworkObject: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::PoliciesApi;

my $api_instance = WWW::SwaggerClient::PoliciesApi->new();
my $body = WWW::SwaggerClient::Object::네트워크 객체->new(); # 네트워크 객체 | Network Object

eval { 
    my $result = $api_instance->updateNetworkObject(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling PoliciesApi->updateNetworkObject: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.PoliciesApi()
body =  # 네트워크 객체 | Network Object

try: 
    # Update an existing network object
    api_response = api_instance.update_network_object(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PoliciesApi->updateNetworkObject: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found


Reports

getReportDownloadFiles

Download a specific Report's file(s)

Downloads one file generated by the Report specified. <code>filename</code> is <code>ReportFileName</code> of GET /reports/{reportId}/files and must belong to that report.<br/>Example<pre>curl -k -o report.pdf "https://{Policy Server Management IP}/mc2/rest/reports/{Report ID}/downloadFile?apiKey={Key}&amp;filename=GenianNAC_DASHBOARD_1_20261110_021000.pdf"</pre>Returns the file as <code>application/octet-stream</code> with <code>Content-Disposition: attachment;filename=...</code>. If the file does not exist, belongs to another report or the name is invalid, the API returns an HTML error page with HTTP 200 instead of 404, so check the Content-Type.


/reports/{reportId}/downloadFile

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/reports/{reportId}/downloadFile?filename="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReportsApi;

import java.io.File;
import java.util.*;

public class ReportsApiExample {

    public static void main(String[] args) {
        
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 1; // String | Report ID (ReportId)
        String filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; // String | File Name
  The UTF-8 should be used for URLEncoder. try { apiInstance.getReportDownloadFiles(reportId, filename); } catch (ApiException e) { System.err.println("Exception when calling ReportsApi#getReportDownloadFiles"); e.printStackTrace(); } } }
import io.swagger.client.api.ReportsApi;

public class ReportsApiExample {

    public static void main(String[] args) {
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 1; // String | Report ID (ReportId)
        String filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; // String | File Name
  The UTF-8 should be used for URLEncoder. try { apiInstance.getReportDownloadFiles(reportId, filename); } catch (ApiException e) { System.err.println("Exception when calling ReportsApi#getReportDownloadFiles"); e.printStackTrace(); } } }
String *reportId = 1; // Report ID (ReportId)
String *filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; // File Name
  The UTF-8 should be used for URLEncoder. ReportsApi *apiInstance = [[ReportsApi alloc] init]; // Download a specific Report's file(s) [apiInstance getReportDownloadFilesWith:reportId filename:filename completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ReportsApi()

var reportId = 1; // {String} Report ID (ReportId)

var filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; // {String} File Name
  The UTF-8 should be used for URLEncoder. var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; api.getReportDownloadFiles(reportId, filename, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReportDownloadFilesExample
    {
        public void main()
        {
            
            var apiInstance = new ReportsApi();
            var reportId = 1;  // String | Report ID (ReportId)
            var filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf;  // String | File Name
  The UTF-8 should be used for URLEncoder. try { // Download a specific Report's file(s) apiInstance.getReportDownloadFiles(reportId, filename); } catch (Exception e) { Debug.Print("Exception when calling ReportsApi.getReportDownloadFiles: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ReportsApi();
$reportId = 1; // String | Report ID (ReportId)
$filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; // String | File Name
  The UTF-8 should be used for URLEncoder. try { $api_instance->getReportDownloadFiles($reportId, $filename); } catch (Exception $e) { echo 'Exception when calling ReportsApi->getReportDownloadFiles: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReportsApi;

my $api_instance = WWW::SwaggerClient::ReportsApi->new();
my $reportId = 1; # String | Report ID (ReportId)
my $filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf; # String | File Name
  The UTF-8 should be used for URLEncoder. eval { $api_instance->getReportDownloadFiles(reportId => $reportId, filename => $filename); }; if ($@) { warn "Exception when calling ReportsApi->getReportDownloadFiles: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ReportsApi()
reportId = 1 # String | Report ID (ReportId)
filename = GenianNAC_DASHBOARD_1_20261110_021000.pdf # String | File Name
  The UTF-8 should be used for URLEncoder. try: # Download a specific Report's file(s) api_instance.get_report_download_files(reportId, filename) except ApiException as e: print("Exception when calling ReportsApi->getReportDownloadFiles: %s\n" % e)

Parameters

Path parameters
Name Description
reportId*
String
Report ID (ReportId)
Required
Query parameters
Name Description
filename*
String
File Name<br/>&nbsp; The UTF-8 should be used for URLEncoder.
Required

Responses

Status: 200 - File downloaded successfully

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getReportFiles

Retrieve a specific Report's file(s)

Retrieves the files generated by the Report specified. <code>reportId</code> is <code>ReportId</code> of GET /reports (for example a Query Report or Dashboard Report). Daily report files are not listed.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/reports/{Report ID}/files?apiKey={Key}&amp;page=1&amp;pageSize=30"</pre>Response<pre>{"result":[{"ReportId":1,"ReportFileName":"GenianNAC_DASHBOARD_1_20261110_021000.pdf","ReportFileType":"queryReport","CreateDate":1794244201000,"ReportFileDesc":"","ReportAdmin":"","ReportFile":"JVBERi0x..."}],"total":14,"page":1,"pageSize":2}</pre><code>ReportFile</code> is the whole file in Base64, so use a small <code>pageSize</code>. Use <code>ReportFileName</code> with GET /reports/{reportId}/downloadFile. An unknown <code>reportId</code> returns an empty <code>result</code>.


/reports/{reportId}/files

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/reports/{reportId}/files?page=&pageSize=&sort="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReportsApi;

import java.io.File;
import java.util.*;

public class ReportsApiExample {

    public static void main(String[] args) {
        
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 1; // String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}
        try {
            RptFileListDoc result = apiInstance.getReportFiles(reportId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReportFiles");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReportsApi;

public class ReportsApiExample {

    public static void main(String[] args) {
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 1; // String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}
        try {
            RptFileListDoc result = apiInstance.getReportFiles(reportId, page, pageSize, sort);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReportFiles");
            e.printStackTrace();
        }
    }
}
String *reportId = 1; // Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"CreateDate","dir":"desc"}; // Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"} (optional)

ReportsApi *apiInstance = [[ReportsApi alloc] init];

// Retrieve a specific Report's file(s)
[apiInstance getReportFilesWith:reportId
    page:page
    pageSize:pageSize
    sort:sort
              completionHandler: ^(RptFileListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ReportsApi()

var reportId = 1; // {String} Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"CreateDate","dir":"desc"} // {String} Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReportFiles(reportId, page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReportFilesExample
    {
        public void main()
        {
            
            var apiInstance = new ReportsApi();
            var reportId = 1;  // String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"CreateDate","dir":"desc"};  // String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"} (optional) 

            try
            {
                // Retrieve a specific Report's file(s)
                RptFileListDoc result = apiInstance.getReportFiles(reportId, page, pageSize, sort);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReportsApi.getReportFiles: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ReportsApi();
$reportId = 1; // String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"CreateDate","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}

try {
    $result = $api_instance->getReportFiles($reportId, $page, $pageSize, $sort);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportsApi->getReportFiles: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReportsApi;

my $api_instance = WWW::SwaggerClient::ReportsApi->new();
my $reportId = 1; # String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"CreateDate","dir":"desc"}; # String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}

eval { 
    my $result = $api_instance->getReportFiles(reportId => $reportId, page => $page, pageSize => $pageSize, sort => $sort);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReportsApi->getReportFiles: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ReportsApi()
reportId = 1 # String | Report ID (ReportId) only for Query Report (GWP300001) and Log Report (GWP300006)
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"CreateDate","dir":"desc"} # String | Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"} (optional)

try: 
    # Retrieve a specific Report's file(s)
    api_response = api_instance.get_report_files(reportId, page, pageSize, sort=sort)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReportsApi->getReportFiles: %s\n" % e)

Parameters

Path parameters
Name Description
reportId*
String
Report ID (ReportId) only for <b>Query Report (GWP300001) and Log Report (GWP300006)</b>
Required
Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON - {"field":"CreateDate","dir":"desc"}

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getReportResultDatas

Retrieve a specific Report's data

Retrieves the statistics of the built-in reports. <code>reportId</code>: 500 Node Group, 501 WLAN Group, 502 Log Filter. <code>itemIds</code> limits the items (comma-separated Node Group, WLAN Group or Log Filter IDs); without it all items are returned.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/reports/502/result?apiKey={Key}&amp;itemIds=1"</pre>Response<pre>[{"id":"1","name":"Error Logs","currentCount":"158","yesterdayAgoCount":"66","weekAgoCount":"","monthAgoCount":"","minDate":"1791558000000","chartData":[{"TIMESTAMP":1791558000000,"DATA":0},{"TIMESTAMP":1794276952000,"DATA":158}]}]</pre>The response is an array, one element per item. Counts are strings; an empty string means no data for that period. Any other <code>reportId</code>, or IDs that do not exist, return 404. For 502 a non-numeric item ID returns an HTML error page.


/reports/{reportId}/result

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/reports/{reportId}/result?itemIds="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReportsApi;

import java.io.File;
import java.util.*;

public class ReportsApiExample {

    public static void main(String[] args) {
        
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 502; // String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
        String itemIds = 34; // String | ItemID (Use a comma to separate entries.)
        try {
            array[RptResultDoc] result = apiInstance.getReportResultDatas(reportId, itemIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReportResultDatas");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReportsApi;

public class ReportsApiExample {

    public static void main(String[] args) {
        ReportsApi apiInstance = new ReportsApi();
        String reportId = 502; // String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
        String itemIds = 34; // String | ItemID (Use a comma to separate entries.)
        try {
            array[RptResultDoc] result = apiInstance.getReportResultDatas(reportId, itemIds);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReportResultDatas");
            e.printStackTrace();
        }
    }
}
String *reportId = 502; // Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
String *itemIds = 34; // ItemID (Use a comma to separate entries.) (optional)

ReportsApi *apiInstance = [[ReportsApi alloc] init];

// Retrieve a specific Report's data
[apiInstance getReportResultDatasWith:reportId
    itemIds:itemIds
              completionHandler: ^(array[RptResultDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ReportsApi()

var reportId = 502; // {String} Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)

var opts = { 
  'itemIds': 34 // {String} ItemID (Use a comma to separate entries.)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReportResultDatas(reportId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReportResultDatasExample
    {
        public void main()
        {
            
            var apiInstance = new ReportsApi();
            var reportId = 502;  // String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
            var itemIds = 34;  // String | ItemID (Use a comma to separate entries.) (optional) 

            try
            {
                // Retrieve a specific Report's data
                array[RptResultDoc] result = apiInstance.getReportResultDatas(reportId, itemIds);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReportsApi.getReportResultDatas: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ReportsApi();
$reportId = 502; // String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
$itemIds = 34; // String | ItemID (Use a comma to separate entries.)

try {
    $result = $api_instance->getReportResultDatas($reportId, $itemIds);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportsApi->getReportResultDatas: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReportsApi;

my $api_instance = WWW::SwaggerClient::ReportsApi->new();
my $reportId = 502; # String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
my $itemIds = 34; # String | ItemID (Use a comma to separate entries.)

eval { 
    my $result = $api_instance->getReportResultDatas(reportId => $reportId, itemIds => $itemIds);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReportsApi->getReportResultDatas: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ReportsApi()
reportId = 502 # String | Report ID (500: Node Group, 501: WLAN Group, 502: Log Filter)
itemIds = 34 # String | ItemID (Use a comma to separate entries.) (optional)

try: 
    # Retrieve a specific Report's data
    api_response = api_instance.get_report_result_datas(reportId, itemIds=itemIds)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReportsApi->getReportResultDatas: %s\n" % e)

Parameters

Path parameters
Name Description
reportId*
String
<b>Report ID</b> (500: Node Group, 501: WLAN Group, 502: Log Filter)
Required
Query parameters
Name Description
itemIds
String
ItemID (Use a comma to separate entries.)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Report Not Found


getReports

List Reports

Retrieves a list of the Reports.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/reports?apiKey={Key}"</pre>Each row in <code>result</code> has <code>ReportId</code> and <code>ReportTitle</code>. Use <code>ReportId</code> in /reports/{reportId}/result.


/reports

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/reports?page=&pageSize=&sort=&qsearch=&reportId=&reportTitle=&onlyMyReport="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.ReportsApi;

import java.io.File;
import java.util.*;

public class ReportsApiExample {

    public static void main(String[] args) {
        
        ReportsApi apiInstance = new ReportsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"ReportId","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
        String qsearch = Dashboard; // String | Search string
        String reportId = 1; // String | Report ID
        String reportTitle = Dashboard Report; // String | Report Title
        Boolean onlyMyReport = false; // Boolean | Viewing my report(s)
        try {
            RptReportListDoc result = apiInstance.getReports(page, pageSize, sort, qsearch, reportId, reportTitle, onlyMyReport);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReports");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.ReportsApi;

public class ReportsApiExample {

    public static void main(String[] args) {
        ReportsApi apiInstance = new ReportsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"ReportId","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
        String qsearch = Dashboard; // String | Search string
        String reportId = 1; // String | Report ID
        String reportTitle = Dashboard Report; // String | Report Title
        Boolean onlyMyReport = false; // Boolean | Viewing my report(s)
        try {
            RptReportListDoc result = apiInstance.getReports(page, pageSize, sort, qsearch, reportId, reportTitle, onlyMyReport);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling ReportsApi#getReports");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *sort = {"field":"ReportId","dir":"desc"}; // Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"} (optional)
String *qsearch = Dashboard; // Search string (optional)
String *reportId = 1; // Report ID (optional)
String *reportTitle = Dashboard Report; // Report Title (optional)
Boolean *onlyMyReport = false; // Viewing my report(s) (optional)

ReportsApi *apiInstance = [[ReportsApi alloc] init];

// List Reports
[apiInstance getReportsWith:page
    pageSize:pageSize
    sort:sort
    qsearch:qsearch
    reportId:reportId
    reportTitle:reportTitle
    onlyMyReport:onlyMyReport
              completionHandler: ^(RptReportListDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.ReportsApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var opts = { 
  'sort': {"field":"ReportId","dir":"desc"}, // {String} Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
  'qsearch': Dashboard, // {String} Search string
  'reportId': 1, // {String} Report ID
  'reportTitle': Dashboard Report, // {String} Report Title
  'onlyMyReport': false // {Boolean} Viewing my report(s)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getReports(page, pageSize, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getReportsExample
    {
        public void main()
        {
            
            var apiInstance = new ReportsApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var sort = {"field":"ReportId","dir":"desc"};  // String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"} (optional) 
            var qsearch = Dashboard;  // String | Search string (optional) 
            var reportId = 1;  // String | Report ID (optional) 
            var reportTitle = Dashboard Report;  // String | Report Title (optional) 
            var onlyMyReport = false;  // Boolean | Viewing my report(s) (optional) 

            try
            {
                // List Reports
                RptReportListDoc result = apiInstance.getReports(page, pageSize, sort, qsearch, reportId, reportTitle, onlyMyReport);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling ReportsApi.getReports: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\ReportsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"ReportId","dir":"desc"}; // String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
$qsearch = Dashboard; // String | Search string
$reportId = 1; // String | Report ID
$reportTitle = Dashboard Report; // String | Report Title
$onlyMyReport = false; // Boolean | Viewing my report(s)

try {
    $result = $api_instance->getReports($page, $pageSize, $sort, $qsearch, $reportId, $reportTitle, $onlyMyReport);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ReportsApi->getReports: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::ReportsApi;

my $api_instance = WWW::SwaggerClient::ReportsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"ReportId","dir":"desc"}; # String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
my $qsearch = Dashboard; # String | Search string
my $reportId = 1; # String | Report ID
my $reportTitle = Dashboard Report; # String | Report Title
my $onlyMyReport = false; # Boolean | Viewing my report(s)

eval { 
    my $result = $api_instance->getReports(page => $page, pageSize => $pageSize, sort => $sort, qsearch => $qsearch, reportId => $reportId, reportTitle => $reportTitle, onlyMyReport => $onlyMyReport);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling ReportsApi->getReports: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ReportsApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
sort = {"field":"ReportId","dir":"desc"} # String | Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"} (optional)
qsearch = Dashboard # String | Search string (optional)
reportId = 1 # String | Report ID (optional)
reportTitle = Dashboard Report # String | Report Title (optional)
onlyMyReport = false # Boolean | Viewing my report(s) (optional)

try: 
    # List Reports
    api_response = api_instance.get_reports(page, pageSize, sort=sort, qsearch=qsearch, reportId=reportId, reportTitle=reportTitle, onlyMyReport=onlyMyReport)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ReportsApi->getReports: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
sort
String
Sorting criteria in the JSON - {"field":"ReportId","dir":"desc"}
qsearch
String
Search string
reportId
String
Report ID
reportTitle
String
Report Title
onlyMyReport
Boolean
Viewing my report(s)

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Sessions

getSession

Retrieve the current session information

Retrieves the information of the current session: the logged-in administrator, role, permissions and restrictions. With an apiKey it returns the administrator of the key.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/sessions/current?apiKey={Key}"</pre>Response<pre>{"adminId":"admin01","roleId":"superAdmin","roleType":1,"myLocale":"ko","authBy":"api","timezone":"","sessionTimeout":0,"loginTime":1794272200660, "permLevelMap":{"noPerm":0,"readOnly":5,"edit":10,"addEdit":15,"fullControl":20}, "adminPermMap":{"setup_config":20,...},"adminLimitation":false,"limitNodeCmdOption":[],"viewMap":{...}}</pre><code>adminPermMap</code> gives the permission level of each menu, compared with <code>permLevelMap</code>. Other fields include <code>adminName</code>, <code>adminDept</code>, <code>remoteAddr</code> and <code>limit*</code> options. <code>adminPasswd</code> is always null. Without a session the API returns 401.


/sessions/current

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/sessions/current"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionsApi;

import java.io.File;
import java.util.*;

public class SessionsApiExample {

    public static void main(String[] args) {
        
        SessionsApi apiInstance = new SessionsApi();
        try {
            SessCurrentDoc result = apiInstance.getSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#getSession");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionsApi;

public class SessionsApiExample {

    public static void main(String[] args) {
        SessionsApi apiInstance = new SessionsApi();
        try {
            SessCurrentDoc result = apiInstance.getSession();
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#getSession");
            e.printStackTrace();
        }
    }
}

SessionsApi *apiInstance = [[SessionsApi alloc] init];

// Retrieve the current session information
[apiInstance getSessionWithCompletionHandler: 
              ^(SessCurrentDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SessionsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSession(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSessionExample
    {
        public void main()
        {
            
            var apiInstance = new SessionsApi();

            try
            {
                // Retrieve the current session information
                SessCurrentDoc result = apiInstance.getSession();
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionsApi.getSession: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SessionsApi();

try {
    $result = $api_instance->getSession();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionsApi->getSession: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionsApi;

my $api_instance = WWW::SwaggerClient::SessionsApi->new();

eval { 
    my $result = $api_instance->getSession();
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionsApi->getSession: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SessionsApi()

try: 
    # Retrieve the current session information
    api_response = api_instance.get_session()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionsApi->getSession: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


login

Add a new session by Login

Logs an administrator in (password step) and creates a Web console session. No apiKey is needed. The session is kept in the <code>JSESSIONID</code> cookie, so save and reuse the cookie.<br/>Example<pre>curl -k -c cookie.txt -X POST "https://{Policy Server Management IP}/mc2/rest/sessions" -H "Content-Type: application/json" -d '{"adminid":"{Admin ID}","passwd":"{Password}","locale":"en"}'</pre>Response<pre>{"authResult":true,"authCode":0,"authInfo":{...},"forwardUrl":"...","alreadyLogin":false}</pre><code>authResult</code> is false on failure; all credential errors return the same <code>authCode</code>. <code>script</code> (for example <code>changePwdDialog(...)</code>, <code>needAnswerPopup(...)</code>, <code>otpAuthPopup(...)</code>) tells the next step of the Web console, and 2-step methods continue with /mfa/otp or /mfa/authcode. Optional fields: <code>forceLogin</code> ("true" ends an existing login), <code>browserTimeZone</code>, <code>authBy</code>.<br/>Errors: 500 for an unsupported <code>locale</code>.


/sessions

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/sessions"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionsApi;

import java.io.File;
import java.util.*;

public class SessionsApiExample {

    public static void main(String[] args) {
        
        SessionsApi apiInstance = new SessionsApi();
        Object body = ; // Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}
        try {
            SessLoginDoc result = apiInstance.login(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#login");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionsApi;

public class SessionsApiExample {

    public static void main(String[] args) {
        SessionsApi apiInstance = new SessionsApi();
        Object body = ; // Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}
        try {
            SessLoginDoc result = apiInstance.login(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#login");
            e.printStackTrace();
        }
    }
}
Object *body = ; // JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}

SessionsApi *apiInstance = [[SessionsApi alloc] init];

// Add a new session by Login
[apiInstance loginWith:body
              completionHandler: ^(SessLoginDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SessionsApi()

var body = ; // {Object} JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.login(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class loginExample
    {
        public void main()
        {
            
            var apiInstance = new SessionsApi();
            var body = new Object(); // Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}

            try
            {
                // Add a new session by Login
                SessLoginDoc result = apiInstance.login(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionsApi.login: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SessionsApi();
$body = ; // Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}

try {
    $result = $api_instance->login($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SessionsApi->login: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionsApi;

my $api_instance = WWW::SwaggerClient::SessionsApi->new();
my $body = WWW::SwaggerClient::Object::Object->new(); # Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}

eval { 
    my $result = $api_instance->login(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SessionsApi->login: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SessionsApi()
body =  # Object | JSON Authentication - {"adminid":"{adminid}","passwd":"{passwd}"}

try: 
    # Add a new session by Login
    api_response = api_instance.login(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SessionsApi->login: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - OK

Status: 400 - Bad Request

Status: 406 - Not Acceptable

Status: 500 - Internal Server Error


logout

Delete the current session by Logout

Logs out the current session. With an <code>apiToken</code> header, the session of that token is removed. Otherwise the session of the request (cookie) is invalidated and a logout audit log is written.<br/>Example<pre>curl -k -b cookie.txt -X DELETE "https://{Policy Server Management IP}/mc2/rest/sessions/current"</pre>Returns HTTP 200 with an empty body. Without a login session it returns 401.<br/>Do not call it with an apiKey you still need in a browser session: it ends the session of the request.


/sessions/current

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/sessions/current"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SessionsApi;

import java.io.File;
import java.util.*;

public class SessionsApiExample {

    public static void main(String[] args) {
        
        SessionsApi apiInstance = new SessionsApi();
        try {
            apiInstance.logout();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#logout");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SessionsApi;

public class SessionsApiExample {

    public static void main(String[] args) {
        SessionsApi apiInstance = new SessionsApi();
        try {
            apiInstance.logout();
        } catch (ApiException e) {
            System.err.println("Exception when calling SessionsApi#logout");
            e.printStackTrace();
        }
    }
}

SessionsApi *apiInstance = [[SessionsApi alloc] init];

// Delete the current session by Logout
[apiInstance logoutWithCompletionHandler: 
              ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SessionsApi()

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.logout(callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class logoutExample
    {
        public void main()
        {
            
            var apiInstance = new SessionsApi();

            try
            {
                // Delete the current session by Logout
                apiInstance.logout();
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SessionsApi.logout: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SessionsApi();

try {
    $api_instance->logout();
} catch (Exception $e) {
    echo 'Exception when calling SessionsApi->logout: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SessionsApi;

my $api_instance = WWW::SwaggerClient::SessionsApi->new();

eval { 
    $api_instance->logout();
};
if ($@) {
    warn "Exception when calling SessionsApi->logout: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SessionsApi()

try: 
    # Delete the current session by Logout
    api_instance.logout()
except ApiException as e:
    print("Exception when calling SessionsApi->logout: %s\n" % e)

Parameters

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


Switches

getSwitchPortBandWidthDatas

Retrieves a specific switch's link status (UP / DOWN)

Retrieves the bandwidth samples of a switch port for the last 7 days. <code>switchId</code> is the switch ID and <code>port</code> is the interface index (ifIndex).<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/switches/{Switch ID}/{Port}/bandwidth?apiKey={Key}"</pre>Response<pre>[{"_time":1794236400000,"_time_as_string":"2026-11-10 09:00:00","ifBandwidth":1250}]</pre>This is bandwidth data, not link UP/DOWN status. <code>_time</code> is epoch milliseconds. Unknown switch IDs or ports return 200 with an empty list. At most the first 1000 samples are returned.


/switches/{switchId}/{port}/bandwidth

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/switches/{switchId}/{port}/bandwidth"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SwitchesApi;

import java.io.File;
import java.util.*;

public class SwitchesApiExample {

    public static void main(String[] args) {
        
        SwitchesApi apiInstance = new SwitchesApi();
        String switchId = 1; // String | Switch ID
        String port = 1; // String | Port
        try {
            array[SwBandwidthDoc] result = apiInstance.getSwitchPortBandWidthDatas(switchId, port);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SwitchesApi#getSwitchPortBandWidthDatas");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SwitchesApi;

public class SwitchesApiExample {

    public static void main(String[] args) {
        SwitchesApi apiInstance = new SwitchesApi();
        String switchId = 1; // String | Switch ID
        String port = 1; // String | Port
        try {
            array[SwBandwidthDoc] result = apiInstance.getSwitchPortBandWidthDatas(switchId, port);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SwitchesApi#getSwitchPortBandWidthDatas");
            e.printStackTrace();
        }
    }
}
String *switchId = 1; // Switch ID
String *port = 1; // Port

SwitchesApi *apiInstance = [[SwitchesApi alloc] init];

// Retrieves a specific switch's link status (UP / DOWN)
[apiInstance getSwitchPortBandWidthDatasWith:switchId
    port:port
              completionHandler: ^(array[SwBandwidthDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SwitchesApi()

var switchId = 1; // {String} Switch ID

var port = 1; // {String} Port


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSwitchPortBandWidthDatas(switchId, port, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSwitchPortBandWidthDatasExample
    {
        public void main()
        {
            
            var apiInstance = new SwitchesApi();
            var switchId = 1;  // String | Switch ID
            var port = 1;  // String | Port

            try
            {
                // Retrieves a specific switch's link status (UP / DOWN)
                array[SwBandwidthDoc] result = apiInstance.getSwitchPortBandWidthDatas(switchId, port);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SwitchesApi.getSwitchPortBandWidthDatas: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SwitchesApi();
$switchId = 1; // String | Switch ID
$port = 1; // String | Port

try {
    $result = $api_instance->getSwitchPortBandWidthDatas($switchId, $port);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SwitchesApi->getSwitchPortBandWidthDatas: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SwitchesApi;

my $api_instance = WWW::SwaggerClient::SwitchesApi->new();
my $switchId = 1; # String | Switch ID
my $port = 1; # String | Port

eval { 
    my $result = $api_instance->getSwitchPortBandWidthDatas(switchId => $switchId, port => $port);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SwitchesApi->getSwitchPortBandWidthDatas: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SwitchesApi()
switchId = 1 # String | Switch ID
port = 1 # String | Port

try: 
    # Retrieves a specific switch's link status (UP / DOWN)
    api_response = api_instance.get_switch_port_band_width_datas(switchId, port)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SwitchesApi->getSwitchPortBandWidthDatas: %s\n" % e)

Parameters

Path parameters
Name Description
switchId*
String
Switch ID
Required
port*
String
Port
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Systems

commandToSystem

Run a specific System's Task

Runs a task on the sensor specified. <code>nodeId</code> is the Node ID of the sensor node; other nodes return 400. <code>cmd</code>: <code>Action</code> sends a sensor action with the code in <code>value</code>; <code>OperationMode</code> saves <code>value</code> as the operation mode (ACTIVEMODE) of the sensor interface.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/systems/{Node ID}/OperationMode?apiKey={Key}&amp;value=1" -H "Content-Type: application/json"</pre>Response<pre>{"nl_nodeid":"{Node ID}","nl_ipstr":"192.168.1.2","nl_genidev":2,...}</pre>Returns the sensor node on success. Any other <code>cmd</code> returns 400, and a failed command returns 500. <code>value</code> is not validated, so send only 0, 1 or 2. This changes how the sensor works; use it with care.


/systems/{nodeId}/{cmd}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/systems/{nodeId}/{cmd}?value="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Sensor's Node ID
        String cmd = OperationMode; // String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
        String value = 1; // String | Command Value
        try {
            NodeListVo result = apiInstance.commandToSystem(nodeId, cmd, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#commandToSystem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Sensor's Node ID
        String cmd = OperationMode; // String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
        String value = 1; // String | Command Value
        try {
            NodeListVo result = apiInstance.commandToSystem(nodeId, cmd, value);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#commandToSystem");
            e.printStackTrace();
        }
    }
}
String *nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Sensor's Node ID
String *cmd = OperationMode; // Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
String *value = 1; // Command Value

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Run a specific System's Task
[apiInstance commandToSystemWith:nodeId
    cmd:cmd
    value:value
              completionHandler: ^(NodeListVo output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Sensor's Node ID

var cmd = OperationMode; // {String} Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 

var value = 1; // {String} Command Value


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.commandToSystem(nodeId, cmd, value, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class commandToSystemExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Sensor's Node ID
            var cmd = OperationMode;  // String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
            var value = 1;  // String | Command Value

            try
            {
                // Run a specific System's Task
                NodeListVo result = apiInstance.commandToSystem(nodeId, cmd, value);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.commandToSystem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Sensor's Node ID
$cmd = OperationMode; // String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
$value = 1; // String | Command Value

try {
    $result = $api_instance->commandToSystem($nodeId, $cmd, $value);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->commandToSystem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Sensor's Node ID
my $cmd = OperationMode; # String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
my $value = 1; # String | Command Value

eval { 
    my $result = $api_instance->commandToSystem(nodeId => $nodeId, cmd => $cmd, value => $value);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemsApi->commandToSystem: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
nodeId = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Sensor's Node ID
cmd = OperationMode # String | Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes) 
value = 1 # String | Command Value

try: 
    # Run a specific System's Task
    api_response = api_instance.command_to_system(nodeId, cmd, value)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemsApi->commandToSystem: %s\n" % e)

Parameters

Path parameters
Name Description
nodeId*
String
Sensor's Node ID
Required
cmd*
String
Task (Action : Perform Action for Sensor, OperationMode: Edit All Sensors Operation Modes)
Required
Query parameters
Name Description
value*
String
Command Value
Required

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Node Not Found

Status: 500 - Internal Server Error


createDeviceTagsOfSystem

Assign a tag

Assigns tags to the System (device) specified. <code>devId</code> is the Device ID (<code>NL_DEVID</code> of the system node). Specify each tag by <code>name</code> or <code>id</code> (NP_IDX of GET /tags); <code>expireDate</code> uses yyyy-MM-dd HH:mm.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/systems/{Device ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"},{"id":"6","expireDate":"2099-12-31 23:00"}]'</pre>Returns HTTP 200 with an empty body.<br/>The list replaces the tags of the device: tags not in the list are removed. Unknown tags are skipped without an error, so a list with only unknown tags removes all tags of the device. An unknown <code>devId</code> returns 400; an empty list returns 500.


/systems/{devId}/tags

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/systems/{devId}/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        try {
            apiInstance.createDeviceTagsOfSystem(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#createDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        try {
            apiInstance.createDeviceTagsOfSystem(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#createDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Device ID
array[TagVo] *body = ; // Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Assign a tag
[apiInstance createDeviceTagsOfSystemWith:devId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Device ID

var body = ; // {array[TagVo]} Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createDeviceTagsOfSystem(devId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createDeviceTagsOfSystemExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Device ID
            var body = new array[TagVo](); // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

            try
            {
                // Assign a tag
                apiInstance.createDeviceTagsOfSystem(devId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.createDeviceTagsOfSystem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
$body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

try {
    $api_instance->createDeviceTagsOfSystem($devId, $body);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->createDeviceTagsOfSystem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Device ID
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

eval { 
    $api_instance->createDeviceTagsOfSystem(devId => $devId, body => $body);
};
if ($@) {
    warn "Exception when calling SystemsApi->createDeviceTagsOfSystem: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Device ID
body =  # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

try: 
    # Assign a tag
    api_instance.create_device_tags_of_system(devId, body)
except ApiException as e:
    print("Exception when calling SystemsApi->createDeviceTagsOfSystem: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteDeviceTagsOfSystem

Remove the tag(s)

Removes tags from the System (device) specified. The body is an array of tag IDs (<code>NP_IDX</code>); names are not accepted.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/systems/{Device ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '["6"]'</pre>Returns HTTP 200 with an empty body, also when the tag was not assigned or the value is a tag name (nothing is removed). An ID that is not a valid ID string, or an unknown <code>devId</code>, returns 400. Check the result with GET /systems/{devId}/tags.


/systems/{devId}/tags

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/systems/{devId}/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        array[String] body = ; // array[String] | Tag List
        try {
            apiInstance.deleteDeviceTagsOfSystem(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#deleteDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        array[String] body = ; // array[String] | Tag List
        try {
            apiInstance.deleteDeviceTagsOfSystem(devId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#deleteDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Device ID
array[String] *body = ; // Tag List

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Remove the tag(s)
[apiInstance deleteDeviceTagsOfSystemWith:devId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Device ID

var body = ; // {array[String]} Tag List


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteDeviceTagsOfSystem(devId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteDeviceTagsOfSystemExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Device ID
            var body = new array[String](); // array[String] | Tag List

            try
            {
                // Remove the tag(s)
                apiInstance.deleteDeviceTagsOfSystem(devId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.deleteDeviceTagsOfSystem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
$body = ; // array[String] | Tag List

try {
    $api_instance->deleteDeviceTagsOfSystem($devId, $body);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->deleteDeviceTagsOfSystem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Device ID
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Tag List

eval { 
    $api_instance->deleteDeviceTagsOfSystem(devId => $devId, body => $body);
};
if ($@) {
    warn "Exception when calling SystemsApi->deleteDeviceTagsOfSystem: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Device ID
body =  # array[String] | Tag List

try: 
    # Remove the tag(s)
    api_instance.delete_device_tags_of_system(devId, body)
except ApiException as e:
    print("Exception when calling SystemsApi->deleteDeviceTagsOfSystem: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getDeviceTagsOfSystem

Retrieve a specific System's tag(s)

Retrieves the tags assigned to the System (device) specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/systems/{Device ID}/tags?apiKey={Key}"</pre>Response<pre>[{"type":"device","id":"6","name":"TAG_A","description":"","startDate":null,"expireDate":4102408800000,"targetId":"{Device ID}","hasRole":false,"startDateWithTimezone":"","expireDateWithTimezone":""}]</pre>Returns 404 when the device has no tags, and also when the device does not exist.


/systems/{devId}/tags

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/systems/{devId}/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        try {
            array[SysTagDoc] result = apiInstance.getDeviceTagsOfSystem(devId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        try {
            array[SysTagDoc] result = apiInstance.getDeviceTagsOfSystem(devId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getDeviceTagsOfSystem");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Device ID

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Retrieve a specific System's tag(s)
[apiInstance getDeviceTagsOfSystemWith:devId
              completionHandler: ^(array[SysTagDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Device ID


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getDeviceTagsOfSystem(devId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getDeviceTagsOfSystemExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Device ID

            try
            {
                // Retrieve a specific System's tag(s)
                array[SysTagDoc] result = apiInstance.getDeviceTagsOfSystem(devId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.getDeviceTagsOfSystem: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID

try {
    $result = $api_instance->getDeviceTagsOfSystem($devId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->getDeviceTagsOfSystem: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Device ID

eval { 
    my $result = $api_instance->getDeviceTagsOfSystem(devId => $devId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemsApi->getDeviceTagsOfSystem: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Device ID

try: 
    # Retrieve a specific System's tag(s)
    api_response = api_instance.get_device_tags_of_system(devId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemsApi->getDeviceTagsOfSystem: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Device ID Not Found


getSensorConfig

Sensor Settings

Retrieves the settings of a sensor interface. <code>devId</code> is the sensor's Device ID and <code>interface</code> the interface name (for example eth0; names starting with virt read the virtual sensor settings). <code>key</code> returns one setting only.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/systems/sensor/conf/{Device ID}/eth0?apiKey={Key}&amp;key=ACTIVEMODE"</pre>Response<pre>{"code":200,"message":"","parameter":null,"data":{"ACTIVEMODE":"0"}}</pre>Without <code>key</code>, <code>data</code> has all settings of the interface (about 100 keys such as <code>RUNNINGMODE</code>, <code>MAXPERMAC</code>, <code>IPMBLOCKMODE</code>). An unknown device, interface or key returns 404. Only one key is accepted.


/systems/sensor/conf/{devId}/{interface}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/systems/sensor/conf/{devId}/{interface}?key="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Sensor's Device ID
        String interface = eth0; // String | Interface
        String key = ACTIVEMODE; // String | key
        try {
            SysSensorConfMessageDoc result = apiInstance.getSensorConfig(devId, interface, key);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSensorConfig");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Sensor's Device ID
        String interface = eth0; // String | Interface
        String key = ACTIVEMODE; // String | key
        try {
            SysSensorConfMessageDoc result = apiInstance.getSensorConfig(devId, interface, key);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSensorConfig");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Sensor's Device ID
String *interface = eth0; // Interface
String *key = ACTIVEMODE; // key (optional)

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Sensor Settings
[apiInstance getSensorConfigWith:devId
    interface:interface
    key:key
              completionHandler: ^(SysSensorConfMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Sensor's Device ID

var interface = eth0; // {String} Interface

var opts = { 
  'key': ACTIVEMODE // {String} key
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSensorConfig(devId, interface, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSensorConfigExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Sensor's Device ID
            var interface = eth0;  // String | Interface
            var key = ACTIVEMODE;  // String | key (optional) 

            try
            {
                // Sensor Settings
                SysSensorConfMessageDoc result = apiInstance.getSensorConfig(devId, interface, key);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.getSensorConfig: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Sensor's Device ID
$interface = eth0; // String | Interface
$key = ACTIVEMODE; // String | key

try {
    $result = $api_instance->getSensorConfig($devId, $interface, $key);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->getSensorConfig: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Sensor's Device ID
my $interface = eth0; # String | Interface
my $key = ACTIVEMODE; # String | key

eval { 
    my $result = $api_instance->getSensorConfig(devId => $devId, interface => $interface, key => $key);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemsApi->getSensorConfig: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Sensor's Device ID
interface = eth0 # String | Interface
key = ACTIVEMODE # String | key (optional)

try: 
    # Sensor Settings
    api_response = api_instance.get_sensor_config(devId, interface, key=key)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemsApi->getSensorConfig: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Sensor's Device ID
Required
interface*
String
Interface
Required
Query parameters
Name Description
key
String
key

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found Config

Status: 500 - Internal Server Error


getSystemCpuInfo

Retrieve a specific System's CPU information

Retrieves the CPU usage and temperature history of the System specified, from its RRD data.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/systems/{Device ID}/cpu?apiKey={Key}&amp;timegap=3600"</pre>Response<pre>[{"_time":1794240000,"_time_as_string":"2026-11-10 10:00:00","usage":12.3,"temperature":45.0}]</pre><code>timegap</code> is the period in seconds before now (default 3600). Each element is one sample: <code>_time</code> (epoch seconds), <code>_time_as_string</code> (in the admin's time zone and date format) and the values. Returns 404 when there is no sample in the period. When the system has no data file, the request fails with HTTP 500. <code>temperature</code> is missing when the system does not report it.


/systems/{devId}/cpu

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/systems/{devId}/cpu?timegap="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        Long timegap = 3600; // Long | Time difference between data requests (Second(s))
        try {
            array[SysCpuSampleDoc] result = apiInstance.getSystemCpuInfo(devId, timegap);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSystemCpuInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        Long timegap = 3600; // Long | Time difference between data requests (Second(s))
        try {
            array[SysCpuSampleDoc] result = apiInstance.getSystemCpuInfo(devId, timegap);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSystemCpuInfo");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Device ID
Long *timegap = 3600; // Time difference between data requests (Second(s)) (optional) (default to 3600)

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Retrieve a specific System's CPU information
[apiInstance getSystemCpuInfoWith:devId
    timegap:timegap
              completionHandler: ^(array[SysCpuSampleDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Device ID

var opts = { 
  'timegap': 3600 // {Long} Time difference between data requests (Second(s))
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemCpuInfo(devId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemCpuInfoExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Device ID
            var timegap = 3600;  // Long | Time difference between data requests (Second(s)) (optional)  (default to 3600)

            try
            {
                // Retrieve a specific System's CPU information
                array[SysCpuSampleDoc] result = apiInstance.getSystemCpuInfo(devId, timegap);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.getSystemCpuInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
$timegap = 3600; // Long | Time difference between data requests (Second(s))

try {
    $result = $api_instance->getSystemCpuInfo($devId, $timegap);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->getSystemCpuInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Device ID
my $timegap = 3600; # Long | Time difference between data requests (Second(s))

eval { 
    my $result = $api_instance->getSystemCpuInfo(devId => $devId, timegap => $timegap);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemsApi->getSystemCpuInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Device ID
timegap = 3600 # Long | Time difference between data requests (Second(s)) (optional) (default to 3600)

try: 
    # Retrieve a specific System's CPU information
    api_response = api_instance.get_system_cpu_info(devId, timegap=timegap)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemsApi->getSystemCpuInfo: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Query parameters
Name Description
timegap
Long (int64)
Time difference between data requests (Second(s))

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getSystemMemInfo

Retrieve a specific System's memory information

Retrieves the memory usage history of the System specified, from its RRD data.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/systems/{Device ID}/mem?apiKey={Key}&amp;timegap=3600"</pre>Response<pre>[{"_time":1794240000,"_time_as_string":"2026-11-10 10:00:00","usage":42.5}]</pre><code>timegap</code> is the period in seconds before now (default 3600). Each element is one sample: <code>_time</code> (epoch seconds), <code>_time_as_string</code> (in the admin's time zone and date format) and the values. Returns 404 when there is no sample in the period. When the system has no data file, the request fails with HTTP 500.


/systems/{devId}/mem

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/systems/{devId}/mem?timegap="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.SystemsApi;

import java.io.File;
import java.util.*;

public class SystemsApiExample {

    public static void main(String[] args) {
        
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        Long timegap = 3600; // Long | Time difference between data requests(Second(s))
        try {
            array[SysMemSampleDoc] result = apiInstance.getSystemMemInfo(devId, timegap);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSystemMemInfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.SystemsApi;

public class SystemsApiExample {

    public static void main(String[] args) {
        SystemsApi apiInstance = new SystemsApi();
        String devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
        Long timegap = 3600; // Long | Time difference between data requests(Second(s))
        try {
            array[SysMemSampleDoc] result = apiInstance.getSystemMemInfo(devId, timegap);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling SystemsApi#getSystemMemInfo");
            e.printStackTrace();
        }
    }
}
String *devId = 5d1e7b20-3c4a-1040-8001-001122334472; // Device ID
Long *timegap = 3600; // Time difference between data requests(Second(s)) (optional) (default to 3600)

SystemsApi *apiInstance = [[SystemsApi alloc] init];

// Retrieve a specific System's memory information
[apiInstance getSystemMemInfoWith:devId
    timegap:timegap
              completionHandler: ^(array[SysMemSampleDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.SystemsApi()

var devId = 5d1e7b20-3c4a-1040-8001-001122334472; // {String} Device ID

var opts = { 
  'timegap': 3600 // {Long} Time difference between data requests(Second(s))
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getSystemMemInfo(devId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getSystemMemInfoExample
    {
        public void main()
        {
            
            var apiInstance = new SystemsApi();
            var devId = 5d1e7b20-3c4a-1040-8001-001122334472;  // String | Device ID
            var timegap = 3600;  // Long | Time difference between data requests(Second(s)) (optional)  (default to 3600)

            try
            {
                // Retrieve a specific System's memory information
                array[SysMemSampleDoc] result = apiInstance.getSystemMemInfo(devId, timegap);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling SystemsApi.getSystemMemInfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\SystemsApi();
$devId = 5d1e7b20-3c4a-1040-8001-001122334472; // String | Device ID
$timegap = 3600; // Long | Time difference between data requests(Second(s))

try {
    $result = $api_instance->getSystemMemInfo($devId, $timegap);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling SystemsApi->getSystemMemInfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::SystemsApi;

my $api_instance = WWW::SwaggerClient::SystemsApi->new();
my $devId = 5d1e7b20-3c4a-1040-8001-001122334472; # String | Device ID
my $timegap = 3600; # Long | Time difference between data requests(Second(s))

eval { 
    my $result = $api_instance->getSystemMemInfo(devId => $devId, timegap => $timegap);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling SystemsApi->getSystemMemInfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.SystemsApi()
devId = 5d1e7b20-3c4a-1040-8001-001122334472 # String | Device ID
timegap = 3600 # Long | Time difference between data requests(Second(s)) (optional) (default to 3600)

try: 
    # Retrieve a specific System's memory information
    api_response = api_instance.get_system_mem_info(devId, timegap=timegap)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling SystemsApi->getSystemMemInfo: %s\n" % e)

Parameters

Path parameters
Name Description
devId*
String
Device ID
Required
Query parameters
Name Description
timegap
Long (int64)
Time difference between data requests(Second(s))

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


Tags

assignTagsInBulk

Assign tags

Assigns or clears tags for several objects in one request.<br/><br/>Each array element applies its <code>tagList</code> to every value in <code>values</code>. Add more elements to assign different tags to different objects. With <code>type</code> <code>ip</code>, IPs can be used directly without looking up Node IDs. Set <code>cmd</code> to <code>clear</code> to remove the tags.<br/><pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/tags/assignment?apiKey={Key}" -H "Content-Type: application/json" -d '[ {"type":"ip","values":["192.168.1.2","192.168.1.3"],"tagList":[{"name":"TAG_A"}]}, {"type":"node","values":["{Node ID}"],"tagList":[{"name":"TAG_B"}]} ]'</pre>The response returns HTTP 200 with per-value results in <code>success</code> and <code>fail</code>. Always check <code>fail</code>; for example, sensor and center nodes cannot have tags.<br/>Notes<br/>&bull; <code>ip</code> assigns the tag to every node that uses the IP.<br/>&bull; A tag name that does not exist is skipped without a <code>fail</code> entry.<br/>&bull; For a tag with a schedule, send <code>periodType</code> with <code>expireDate</code> or <code>expiryPeriod</code>. Otherwise the tag is assigned without an expiry.


/tags/assignment

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/tags/assignment"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        array[Tag for Bulk Operation] body = ; // array[Tag for Bulk Operation] | Tag Vo List
        try {
            Messages Value Object result = apiInstance.assignTagsInBulk(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#assignTagsInBulk");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        array[Tag for Bulk Operation] body = ; // array[Tag for Bulk Operation] | Tag Vo List
        try {
            Messages Value Object result = apiInstance.assignTagsInBulk(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#assignTagsInBulk");
            e.printStackTrace();
        }
    }
}
array[Tag for Bulk Operation] *body = ; // Tag Vo List

TagsApi *apiInstance = [[TagsApi alloc] init];

// Assign tags
[apiInstance assignTagsInBulkWith:body
              completionHandler: ^(Messages Value Object output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var body = ; // {array[Tag for Bulk Operation]} Tag Vo List


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.assignTagsInBulk(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class assignTagsInBulkExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var body = new array[Tag for Bulk Operation](); // array[Tag for Bulk Operation] | Tag Vo List

            try
            {
                // Assign tags
                Messages Value Object result = apiInstance.assignTagsInBulk(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TagsApi.assignTagsInBulk: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$body = ; // array[Tag for Bulk Operation] | Tag Vo List

try {
    $result = $api_instance->assignTagsInBulk($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TagsApi->assignTagsInBulk: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $body = [WWW::SwaggerClient::Object::array[Tag for Bulk Operation]->new()]; # array[Tag for Bulk Operation] | Tag Vo List

eval { 
    my $result = $api_instance->assignTagsInBulk(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TagsApi->assignTagsInBulk: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
body =  # array[Tag for Bulk Operation] | Tag Vo List

try: 
    # Assign tags
    api_response = api_instance.assign_tags_in_bulk(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagsApi->assignTagsInBulk: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


assignTagsToObject

Assign tags

Assigns tags to the one of the Object Types specified. Specify the tag by <code>name</code> or <code>id</code>.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/tags/ip/192.168.1.2?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"}]'</pre>Response<pre>{"success":[{"code":200,"message":"","parameter":"192.168.1.2","data":null}],"fail":[]}</pre>Returns HTTP 200 even when the tag is not assigned. Always check <code>fail</code>; for example, sensor and center nodes cannot have tags.


/tags/{type}/{value}

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/tags/{type}/{value}?comment="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        String type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
        String value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. String comment = reason; // String | Description (MAC Tag of IPAM) try { Messages Value Object result = apiInstance.assignTagsToObject(type, value, body, comment); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#assignTagsToObject"); e.printStackTrace(); } } }
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        String type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
        String value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. String comment = reason; // String | Description (MAC Tag of IPAM) try { Messages Value Object result = apiInstance.assignTagsToObject(type, value, body, comment); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#assignTagsToObject"); e.printStackTrace(); } } }
String *type = node; // Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
String *value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
array[TagVo] *body = ; // Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. String *comment = reason; // Description (MAC Tag of IPAM) (optional) TagsApi *apiInstance = [[TagsApi alloc] init]; // Assign tags [apiInstance assignTagsToObjectWith:type value:value body:body comment:comment completionHandler: ^(Messages Value Object output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var type = node; // {String} Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)

var value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)

var body = ; // {array[TagVo]} Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. var opts = { 'comment': reason // {String} Description (MAC Tag of IPAM) }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.assignTagsToObject(type, value, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class assignTagsToObjectExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var type = node;  // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
            var value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
            var body = new array[TagVo](); // array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. var comment = reason; // String | Description (MAC Tag of IPAM) (optional) try { // Assign tags Messages Value Object result = apiInstance.assignTagsToObject(type, value, body, comment); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling TagsApi.assignTagsToObject: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
$value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
$body = ; // array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. $comment = reason; // String | Description (MAC Tag of IPAM) try { $result = $api_instance->assignTagsToObject($type, $value, $body, $comment); print_r($result); } catch (Exception $e) { echo 'Exception when calling TagsApi->assignTagsToObject: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $type = node; # String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
my $value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. my $comment = reason; # String | Description (MAC Tag of IPAM) eval { my $result = $api_instance->assignTagsToObject(type => $type, value => $value, body => $body, comment => $comment); print Dumper($result); }; if ($@) { warn "Exception when calling TagsApi->assignTagsToObject: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
type = node # String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
body =  # array[TagVo] | Tag JSON Array (expireDate Format: yyyy-MM-dd HH:mm)
If periodType is date, expireDate must have a value.
If periodType is period, expiryPeriod must have a value. comment = reason # String | Description (MAC Tag of IPAM) (optional) try: # Assign tags api_response = api_instance.assign_tags_to_object(type, value, body, comment=comment) pprint(api_response) except ApiException as e: print("Exception when calling TagsApi->assignTagsToObject: %s\n" % e)

Parameters

Path parameters
Name Description
type*
String
Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
Required
value*
String
Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
Required
Body parameters
Name Description
body *
Query parameters
Name Description
comment
String
Description (MAC Tag of IPAM)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createTag

Add a new tag

Adds a new tag.<br/><br/>Note: The value for • NP_IDX (Tag ID) will be automatically assigned.<br/>• np_periodtype Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry)<br/>• np_period Lifetime (D: day(s), h: hour(s), m: minute(s)) for np_periodtype is 1<br/>&nbsp;&nbsp; E.g., 2D, 48h, 3600m<br/>• np_periodexpire Lifetime + Expiry (D: day(s),0 - 23: Expiry) for np_periodtype is 2<br/>&nbsp;&nbsp; E.g., 2D,22<br/>• np_adminroles An Admin Role can be assigned to grant administrative privilege for Tag settings.<br/>&nbsp;&nbsp; E.g., audit, operator <br/>• np_color Color, e.g., 186AA7 )<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/tags?apiKey={Key}" -H "Content-Type: application/json" -d '{"np_name":"TAG_A","np_desc":"KESTRA","np_periodtype":0,"np_color":"186AA7"}'</pre>Returns HTTP 200 with an empty body. Look up the new NP_IDX with GET /tags.


/tags

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        NodePropertyVo body = ; // NodePropertyVo | Tag JSON
        try {
            apiInstance.createTag(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#createTag");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        NodePropertyVo body = ; // NodePropertyVo | Tag JSON
        try {
            apiInstance.createTag(body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#createTag");
            e.printStackTrace();
        }
    }
}
NodePropertyVo *body = ; // Tag JSON

TagsApi *apiInstance = [[TagsApi alloc] init];

// Add a new tag
[apiInstance createTagWith:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var body = ; // {NodePropertyVo} Tag JSON


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.createTag(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createTagExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var body = new NodePropertyVo(); // NodePropertyVo | Tag JSON

            try
            {
                // Add a new tag
                apiInstance.createTag(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TagsApi.createTag: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$body = ; // NodePropertyVo | Tag JSON

try {
    $api_instance->createTag($body);
} catch (Exception $e) {
    echo 'Exception when calling TagsApi->createTag: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $body = WWW::SwaggerClient::Object::NodePropertyVo->new(); # NodePropertyVo | Tag JSON

eval { 
    $api_instance->createTag(body => $body);
};
if ($@) {
    warn "Exception when calling TagsApi->createTag: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
body =  # NodePropertyVo | Tag JSON

try: 
    # Add a new tag
    api_instance.create_tag(body)
except ApiException as e:
    print("Exception when calling TagsApi->createTag: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Tag created successfully

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteTags

Delete a specific tag

Deletes the tags specified. The body is an array of tag IDs (NP_IDX).<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/tags?apiKey={Key}" -H "Content-Type: application/json" -d '["6"]'</pre>Returns HTTP 200 with an empty body.


/tags

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        array[String] body = ; // array[String] | Tag List
Format [tagId,tagId] try { apiInstance.deleteTags(body); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#deleteTags"); e.printStackTrace(); } } }
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        array[String] body = ; // array[String] | Tag List
Format [tagId,tagId] try { apiInstance.deleteTags(body); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#deleteTags"); e.printStackTrace(); } } }
array[String] *body = ; // Tag List
Format [tagId,tagId] TagsApi *apiInstance = [[TagsApi alloc] init]; // Delete a specific tag [apiInstance deleteTagsWith:body completionHandler: ^(NSError* error) { if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var body = ; // {array[String]} Tag List
Format [tagId,tagId] var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully.'); } }; api.deleteTags(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteTagsExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var body = new array[String](); // array[String] | Tag List
Format [tagId,tagId] try { // Delete a specific tag apiInstance.deleteTags(body); } catch (Exception e) { Debug.Print("Exception when calling TagsApi.deleteTags: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$body = ; // array[String] | Tag List
Format [tagId,tagId] try { $api_instance->deleteTags($body); } catch (Exception $e) { echo 'Exception when calling TagsApi->deleteTags: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Tag List
Format [tagId,tagId] eval { $api_instance->deleteTags(body => $body); }; if ($@) { warn "Exception when calling TagsApi->deleteTags: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
body =  # array[String] | Tag List
Format [tagId,tagId] try: # Delete a specific tag api_instance.delete_tags(body) except ApiException as e: print("Exception when calling TagsApi->deleteTags: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


deleteTagsByType

Remove the tag(s)

Removes the tag(s) from the one of the Object Types specified.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/tags/ip/192.168.1.2?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"}]'</pre>Returns HTTP 200 with an empty body. Returns 500 when the tag cannot be removed, for example from a sensor node.


/tags/{type}/{value}

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/tags/{type}/{value}?comment="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        String type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
        String value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
        array[TagVo] body = ; // array[TagVo] | Tag JSON List
        String comment = reason; // String | Description (MAC Tag of IPAM)
        try {
            apiInstance.deleteTagsByType(type, value, body, comment);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#deleteTagsByType");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        String type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
        String value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
        array[TagVo] body = ; // array[TagVo] | Tag JSON List
        String comment = reason; // String | Description (MAC Tag of IPAM)
        try {
            apiInstance.deleteTagsByType(type, value, body, comment);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#deleteTagsByType");
            e.printStackTrace();
        }
    }
}
String *type = node; // Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
String *value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
array[TagVo] *body = ; // Tag JSON List
String *comment = reason; // Description (MAC Tag of IPAM) (optional)

TagsApi *apiInstance = [[TagsApi alloc] init];

// Remove the tag(s)
[apiInstance deleteTagsByTypeWith:type
    value:value
    body:body
    comment:comment
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var type = node; // {String} Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)

var value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // {String} Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)

var body = ; // {array[TagVo]} Tag JSON List

var opts = { 
  'comment': reason // {String} Description (MAC Tag of IPAM)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteTagsByType(type, value, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteTagsByTypeExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var type = node;  // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
            var value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4;  // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
            var body = new array[TagVo](); // array[TagVo] | Tag JSON List
            var comment = reason;  // String | Description (MAC Tag of IPAM) (optional) 

            try
            {
                // Remove the tag(s)
                apiInstance.deleteTagsByType(type, value, body, comment);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TagsApi.deleteTagsByType: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$type = node; // String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
$value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; // String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
$body = ; // array[TagVo] | Tag JSON List
$comment = reason; // String | Description (MAC Tag of IPAM)

try {
    $api_instance->deleteTagsByType($type, $value, $body, $comment);
} catch (Exception $e) {
    echo 'Exception when calling TagsApi->deleteTagsByType: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $type = node; # String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
my $value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4; # String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON List
my $comment = reason; # String | Description (MAC Tag of IPAM)

eval { 
    $api_instance->deleteTagsByType(type => $type, value => $value, body => $body, comment => $comment);
};
if ($@) {
    warn "Exception when calling TagsApi->deleteTagsByType: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
type = node # String | Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
value = 7a3c9e10-5b2d-1040-8007-001122334472-a1b2c3d4 # String | Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
body =  # array[TagVo] | Tag JSON List
comment = reason # String | Description (MAC Tag of IPAM) (optional)

try: 
    # Remove the tag(s)
    api_instance.delete_tags_by_type(type, value, body, comment=comment)
except ApiException as e:
    print("Exception when calling TagsApi->deleteTagsByType: %s\n" % e)

Parameters

Path parameters
Name Description
type*
String
Object Type (node: Node, mac: MAC, ip: Node's IP, user: User, device: Device, ap: WLAN)
Required
value*
String
Object ID (Node ID, MAC, Node's IP, USER_ID, Device ID, AP's MAC)
Required
Body parameters
Name Description
body *
Query parameters
Name Description
comment
String
Description (MAC Tag of IPAM)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getTag

Retrieve a specific tag's information

Retrieves the information of the tag specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/tags/{Tag ID}?apiKey={Key}"</pre>Response<pre>{"tag":{"np_idx":2,"np_name":"GUEST","np_desc":"Guest","np_periodtype":0,"np_color":"228b22"}}</pre>


/tags/{tagId}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/tags/{tagId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        Integer tagId = 1; // Integer | Tag ID (NP_IDX)
        try {
            TagDetailDoc result = apiInstance.getTag(tagId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#getTag");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        Integer tagId = 1; // Integer | Tag ID (NP_IDX)
        try {
            TagDetailDoc result = apiInstance.getTag(tagId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#getTag");
            e.printStackTrace();
        }
    }
}
Integer *tagId = 1; // Tag ID (NP_IDX)

TagsApi *apiInstance = [[TagsApi alloc] init];

// Retrieve a specific tag's information
[apiInstance getTagWith:tagId
              completionHandler: ^(TagDetailDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var tagId = 1; // {Integer} Tag ID (NP_IDX)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getTag(tagId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTagExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var tagId = 1;  // Integer | Tag ID (NP_IDX)

            try
            {
                // Retrieve a specific tag's information
                TagDetailDoc result = apiInstance.getTag(tagId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TagsApi.getTag: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$tagId = 1; // Integer | Tag ID (NP_IDX)

try {
    $result = $api_instance->getTag($tagId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling TagsApi->getTag: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $tagId = 1; # Integer | Tag ID (NP_IDX)

eval { 
    my $result = $api_instance->getTag(tagId => $tagId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling TagsApi->getTag: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
tagId = 1 # Integer | Tag ID (NP_IDX)

try: 
    # Retrieve a specific tag's information
    api_response = api_instance.get_tag(tagId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling TagsApi->getTag: %s\n" % e)

Parameters

Path parameters
Name Description
tagId*
Integer (int32)
Tag ID (NP_IDX)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


getTags

List tags

Retrieves a list of the tags.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/tags?apiKey={Key}"</pre>Response<pre>{"result":[{"NP_IDX":2,"NP_NAME":"GUEST","NP_DESC":"Guest","NP_PERIODTYPE":0,"NP_COLOR":"228b22"}],"total":5}</pre>Use <code>NP_NAME</code> as the tag name and <code>NP_IDX</code> as the tag ID in other APIs.


/tags

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/tags?page=&pageSize=&sort=&npName=&npDesc=&npPeriodType="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"NP_NAME","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} String npName = TAG_A; // String | Name String npDesc = Sample tag; // String | Description Integer npPeriodType = 0; // Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) try { TagListDoc result = apiInstance.getTags(page, pageSize, sort, npName, npDesc, npPeriodType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#getTags"); e.printStackTrace(); } } }
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String sort = {"field":"NP_NAME","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} String npName = TAG_A; // String | Name String npDesc = Sample tag; // String | Description Integer npPeriodType = 0; // Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) try { TagListDoc result = apiInstance.getTags(page, pageSize, sort, npName, npDesc, npPeriodType); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling TagsApi#getTags"); e.printStackTrace(); } } }
Integer *page = 1; // Results page to be retrieved (optional)
Integer *pageSize = 30; // Number of records per page (optional)
String *sort = {"field":"NP_NAME","dir":"desc"}; // Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} (optional) String *npName = TAG_A; // Name (optional) String *npDesc = Sample tag; // Description (optional) Integer *npPeriodType = 0; // Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) (optional) TagsApi *apiInstance = [[TagsApi alloc] init]; // List tags [apiInstance getTagsWith:page pageSize:pageSize sort:sort npName:npName npDesc:npDesc npPeriodType:npPeriodType completionHandler: ^(TagListDoc output, NSError* error) { if (output) { NSLog(@"%@", output); } if (error) { NSLog(@"Error: %@", error); } }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var opts = { 
  'page': 1, // {Integer} Results page to be retrieved
  'pageSize': 30, // {Integer} Number of records per page
  'sort': {"field":"NP_NAME","dir":"desc"}, // {String} Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} 'npName': TAG_A, // {String} Name 'npDesc': Sample tag, // {String} Description 'npPeriodType': 0 // {Integer} Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) }; var callback = function(error, data, response) { if (error) { console.error(error); } else { console.log('API called successfully. Returned data: ' + data); } }; api.getTags(opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getTagsExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var page = 1;  // Integer | Results page to be retrieved (optional) 
            var pageSize = 30;  // Integer | Number of records per page (optional) 
            var sort = {"field":"NP_NAME","dir":"desc"};  // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} (optional) var npName = TAG_A; // String | Name (optional) var npDesc = Sample tag; // String | Description (optional) var npPeriodType = 0; // Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) (optional) try { // List tags TagListDoc result = apiInstance.getTags(page, pageSize, sort, npName, npDesc, npPeriodType); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling TagsApi.getTags: " + e.Message ); } } } }
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$sort = {"field":"NP_NAME","dir":"desc"}; // String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} $npName = TAG_A; // String | Name $npDesc = Sample tag; // String | Description $npPeriodType = 0; // Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) try { $result = $api_instance->getTags($page, $pageSize, $sort, $npName, $npDesc, $npPeriodType); print_r($result); } catch (Exception $e) { echo 'Exception when calling TagsApi->getTags: ', $e->getMessage(), PHP_EOL; } ?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $sort = {"field":"NP_NAME","dir":"desc"}; # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} my $npName = TAG_A; # String | Name my $npDesc = Sample tag; # String | Description my $npPeriodType = 0; # Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) eval { my $result = $api_instance->getTags(page => $page, pageSize => $pageSize, sort => $sort, npName => $npName, npDesc => $npDesc, npPeriodType => $npPeriodType); print Dumper($result); }; if ($@) { warn "Exception when calling TagsApi->getTags: $@\n"; }
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
page = 1 # Integer | Results page to be retrieved (optional)
pageSize = 30 # Integer | Number of records per page (optional)
sort = {"field":"NP_NAME","dir":"desc"} # String | Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})
 E.g., {"field": "NP_NAME", "dir":"desc"} (optional) npName = TAG_A # String | Name (optional) npDesc = Sample tag # String | Description (optional) npPeriodType = 0 # Integer | Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry) (optional) try: # List tags api_response = api_instance.get_tags(page=page, pageSize=pageSize, sort=sort, npName=npName, npDesc=npDesc, npPeriodType=npPeriodType) pprint(api_response) except ApiException as e: print("Exception when calling TagsApi->getTags: %s\n" % e)

Parameters

Query parameters
Name Description
page
Integer (int32)
Results page to be retrieved
pageSize
Integer (int32)
Number of records per page
sort
String
Sorting criteria in the JSON ({"field": "ColumnName", "dir": "Direction"})<br/>&nbsp;E.g., {"field": "NP_NAME", "dir":"desc"}
npName
String
Name
npDesc
String
Description
npPeriodType
Integer (int32)
Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found


updateTag

Update an existing tag

Updates an existing tag.<br/><br/>The value entered as a parameter will be used for the value for • NP_IDX (Tag ID).<br/>• np_periodtype Schedule (0: No Expiry, 1: Lifetime, 2: Lifetime + Expiry)<br/>• np_period Lifetime (D: day(s), h: hour(s), m: minute(s)) for np_periodtype is 1<br/>&nbsp;&nbsp; E.g., 2D, 48h, 3600m<br/>• np_periodexpire Lifetime + Expiry (D: day(s),0 - 23: Expiry) for np_periodtype is 2<br/>&nbsp;&nbsp; E.g., 2D,22<br/>• np_adminroles An Admin Role can be assigned to grant administrative privilege for Tag settings.<br/>&nbsp;&nbsp; E.g., audit, operator <br/>• np_color Color, e.g., 186AA7 )<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/tags/{Tag ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"np_name":"TAG_A","np_desc":"updated","np_periodtype":0,"np_color":"ff0000"}'</pre>Returns HTTP 200 with an empty body.


/tags/{tagId}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/tags/{tagId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.TagsApi;

import java.io.File;
import java.util.*;

public class TagsApiExample {

    public static void main(String[] args) {
        
        TagsApi apiInstance = new TagsApi();
        Integer tagId = 1; // Integer | Tag ID (NP_IDX)
        NodePropertyVo body = ; // NodePropertyVo | Tag JSON Data
        try {
            apiInstance.updateTag(tagId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#updateTag");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.TagsApi;

public class TagsApiExample {

    public static void main(String[] args) {
        TagsApi apiInstance = new TagsApi();
        Integer tagId = 1; // Integer | Tag ID (NP_IDX)
        NodePropertyVo body = ; // NodePropertyVo | Tag JSON Data
        try {
            apiInstance.updateTag(tagId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling TagsApi#updateTag");
            e.printStackTrace();
        }
    }
}
Integer *tagId = 1; // Tag ID (NP_IDX)
NodePropertyVo *body = ; // Tag JSON Data

TagsApi *apiInstance = [[TagsApi alloc] init];

// Update an existing tag
[apiInstance updateTagWith:tagId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.TagsApi()

var tagId = 1; // {Integer} Tag ID (NP_IDX)

var body = ; // {NodePropertyVo} Tag JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateTag(tagId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateTagExample
    {
        public void main()
        {
            
            var apiInstance = new TagsApi();
            var tagId = 1;  // Integer | Tag ID (NP_IDX)
            var body = new NodePropertyVo(); // NodePropertyVo | Tag JSON Data

            try
            {
                // Update an existing tag
                apiInstance.updateTag(tagId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling TagsApi.updateTag: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\TagsApi();
$tagId = 1; // Integer | Tag ID (NP_IDX)
$body = ; // NodePropertyVo | Tag JSON Data

try {
    $api_instance->updateTag($tagId, $body);
} catch (Exception $e) {
    echo 'Exception when calling TagsApi->updateTag: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::TagsApi;

my $api_instance = WWW::SwaggerClient::TagsApi->new();
my $tagId = 1; # Integer | Tag ID (NP_IDX)
my $body = WWW::SwaggerClient::Object::NodePropertyVo->new(); # NodePropertyVo | Tag JSON Data

eval { 
    $api_instance->updateTag(tagId => $tagId, body => $body);
};
if ($@) {
    warn "Exception when calling TagsApi->updateTag: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.TagsApi()
tagId = 1 # Integer | Tag ID (NP_IDX)
body =  # NodePropertyVo | Tag JSON Data

try: 
    # Update an existing tag
    api_instance.update_tag(tagId, body)
except ApiException as e:
    print("Exception when calling TagsApi->updateTag: %s\n" % e)

Parameters

Path parameters
Name Description
tagId*
Integer (int32)
Tag ID (NP_IDX)
Required
Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


Users

changeMyPassword

Edit my password

Changes the password of the caller. Send <code>password</code> as a form field. The password policy applies.<br/>This API also completes the password reset flow: after <code>GET /users/{userId}/authcode</code> succeeds, the same session can set the new password.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/users/myinfo/password?apiKey={Key}" -d "password={New Password}"</pre>Response<pre>{"code":200,"message":null,"parameter":"{My ID}"}</pre>400: the password is empty, does not meet the policy, or the user is not found.


/users/myinfo/password

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/users/myinfo/password?locale="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String password = NewPassw0rd!; // String | New password
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.changeMyPassword(password, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeMyPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String password = NewPassw0rd!; // String | New password
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.changeMyPassword(password, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeMyPassword");
            e.printStackTrace();
        }
    }
}
String *password = NewPassw0rd!; // New password
String *locale = en; // Locale (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Edit my password
[apiInstance changeMyPasswordWith:password
    locale:locale
              completionHandler: ^(UserMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var password = NewPassw0rd!; // {String} New password

var opts = { 
  'locale': en // {String} Locale
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.changeMyPassword(password, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class changeMyPasswordExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var password = NewPassw0rd!;  // String | New password
            var locale = en;  // String | Locale (optional) 

            try
            {
                // Edit my password
                UserMessageDoc result = apiInstance.changeMyPassword(password, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.changeMyPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$password = NewPassw0rd!; // String | New password
$locale = en; // String | Locale

try {
    $result = $api_instance->changeMyPassword($password, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->changeMyPassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $password = NewPassw0rd!; # String | New password
my $locale = en; # String | Locale

eval { 
    my $result = $api_instance->changeMyPassword(password => $password, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->changeMyPassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
password = NewPassw0rd! # String | New password
locale = en # String | Locale (optional)

try: 
    # Edit my password
    api_response = api_instance.change_my_password(password, locale=locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->changeMyPassword: %s\n" % e)

Parameters

Form parameters
Name Description
password*
String
New password
Required
Query parameters
Name Description
locale
String
Locale

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


changeUserPassword

Reset a specific user's password

Resets the password of the user specified. Send <code>password</code> as a form field. The password policy applies.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/password?apiKey={Key}" -d "password={New Password}"</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 400: empty password, policy violation (<code>message</code> lists the rules), or the user does not exist.<br/>&bull; 403: the user is an administrator and the caller cannot edit administrators.


/users/{userId}/password

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/users/{userId}/password"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String password = NewPassw0rd!; // String | New password
        Boolean isEncrytion = true; // Boolean | Password encryption
        try {
            apiInstance.changeUserPassword(userId, password, isEncrytion);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeUserPassword");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String password = NewPassw0rd!; // String | New password
        Boolean isEncrytion = true; // Boolean | Password encryption
        try {
            apiInstance.changeUserPassword(userId, password, isEncrytion);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#changeUserPassword");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)
String *password = NewPassw0rd!; // New password
Boolean *isEncrytion = true; // Password encryption (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Reset a specific user's password
[apiInstance changeUserPasswordWith:userId
    password:password
    isEncrytion:isEncrytion
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)

var password = NewPassw0rd!; // {String} New password

var opts = { 
  'isEncrytion': true // {Boolean} Password encryption
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.changeUserPassword(userId, password, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class changeUserPasswordExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)
            var password = NewPassw0rd!;  // String | New password
            var isEncrytion = true;  // Boolean | Password encryption (optional) 

            try
            {
                // Reset a specific user's password
                apiInstance.changeUserPassword(userId, password, isEncrytion);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.changeUserPassword: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)
$password = NewPassw0rd!; // String | New password
$isEncrytion = true; // Boolean | Password encryption

try {
    $api_instance->changeUserPassword($userId, $password, $isEncrytion);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->changeUserPassword: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)
my $password = NewPassw0rd!; # String | New password
my $isEncrytion = true; # Boolean | Password encryption

eval { 
    $api_instance->changeUserPassword(userId => $userId, password => $password, isEncrytion => $isEncrytion);
};
if ($@) {
    warn "Exception when calling UsersApi->changeUserPassword: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)
password = NewPassw0rd! # String | New password
isEncrytion = true # Boolean | Password encryption (optional)

try: 
    # Reset a specific user's password
    api_instance.change_user_password(userId, password, isEncrytion=isEncrytion)
except ApiException as e:
    print("Exception when calling UsersApi->changeUserPassword: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required
Form parameters
Name Description
password*
String
New password
Required
isEncrytion
Boolean
Password encryption

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 500 - Internal Server Error


checkAuthCode

Retrieve a specific user's authentication code

Checks the password reset authentication code sent by <code>POST /users/{userId}/authcode</code>. On success, the session is allowed to set the new password with <code>PUT /users/myinfo/password</code>.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/authcode?apiKey={Key}&amp;purpose=password&amp;authcode={Code}&amp;idType=2"</pre>Response<pre>{"code":200,"message":null,"parameter":"{User ID}"}</pre>&bull; 400: the code is wrong or expired.<br/>&bull; 416: <code>purpose</code> is not <code>password</code>.<br/>&bull; 500: <code>purpose</code> is missing. <code>idType</code> is not used.


/users/{userId}/authcode

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/users/{userId}/authcode?purpose=&authcode=&idType=&locale="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String purpose = password; // String | Scope (password)
        String authcode = 123456; // String | Authentication Code
        String idType = 2; // String | Id Type (1:ADMIN, 2:User)
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.checkAuthCode(userId, purpose, authcode, idType, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#checkAuthCode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String purpose = password; // String | Scope (password)
        String authcode = 123456; // String | Authentication Code
        String idType = 2; // String | Id Type (1:ADMIN, 2:User)
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.checkAuthCode(userId, purpose, authcode, idType, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#checkAuthCode");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)
String *purpose = password; // Scope (password) (default to password)
String *authcode = 123456; // Authentication Code
String *idType = 2; // Id Type (1:ADMIN, 2:User) (default to 2)
String *locale = en; // Locale (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Retrieve a specific user's authentication code
[apiInstance checkAuthCodeWith:userId
    purpose:purpose
    authcode:authcode
    idType:idType
    locale:locale
              completionHandler: ^(UserMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)

var purpose = password; // {String} Scope (password)

var authcode = 123456; // {String} Authentication Code

var idType = 2; // {String} Id Type (1:ADMIN, 2:User)

var opts = { 
  'locale': en // {String} Locale
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.checkAuthCode(userId, purpose, authcode, idType, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class checkAuthCodeExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)
            var purpose = password;  // String | Scope (password) (default to password)
            var authcode = 123456;  // String | Authentication Code
            var idType = 2;  // String | Id Type (1:ADMIN, 2:User) (default to 2)
            var locale = en;  // String | Locale (optional) 

            try
            {
                // Retrieve a specific user's authentication code
                UserMessageDoc result = apiInstance.checkAuthCode(userId, purpose, authcode, idType, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.checkAuthCode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)
$purpose = password; // String | Scope (password)
$authcode = 123456; // String | Authentication Code
$idType = 2; // String | Id Type (1:ADMIN, 2:User)
$locale = en; // String | Locale

try {
    $result = $api_instance->checkAuthCode($userId, $purpose, $authcode, $idType, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->checkAuthCode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)
my $purpose = password; # String | Scope (password)
my $authcode = 123456; # String | Authentication Code
my $idType = 2; # String | Id Type (1:ADMIN, 2:User)
my $locale = en; # String | Locale

eval { 
    my $result = $api_instance->checkAuthCode(userId => $userId, purpose => $purpose, authcode => $authcode, idType => $idType, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->checkAuthCode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)
purpose = password # String | Scope (password) (default to password)
authcode = 123456 # String | Authentication Code
idType = 2 # String | Id Type (1:ADMIN, 2:User) (default to 2)
locale = en # String | Locale (optional)

try: 
    # Retrieve a specific user's authentication code
    api_response = api_instance.check_auth_code(userId, purpose, authcode, idType, locale=locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->checkAuthCode: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required
Query parameters
Name Description
purpose*
String
Scope (password)
Required
authcode*
String
Authentication Code
Required
idType*
String
Id Type (1:ADMIN, 2:User)
Required
locale
String
Locale

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 416 - Range Not Satisfiable

Status: 500 - Internal Server Error


createAuthCode

Generate an authentication code

Sends a password reset authentication code to the user by SMS or email. Send form fields <code>purpose=password</code>, <code>method</code> (<code>sms</code> or <code>email</code>) and <code>value</code> (the user's mobile number or email). Password reset must be enabled in the settings with the method allowed.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/authcode?apiKey={Key}&amp;idType=2" -d "purpose=password&amp;method=email&amp;value=user01@example.com"</pre>Response<pre>{"code":200,"message":null,"parameter":"{User ID}"}</pre>&bull; 416: password reset is off, the method is not allowed, or <code>purpose</code> is not <code>password</code>.<br/>&bull; 400: <code>value</code> is not a valid email, or sending fails (see <code>message</code>).<br/>&bull; 500: <code>purpose</code> is missing. <code>idType</code> is not used.


/users/{userId}/authcode

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/users/{userId}/authcode?idType=&locale="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String purpose = password; // String | Scope (password)
        String method = email; // String | Verification Methods
        String value = user01@example.com; // String | Mobile phone / Email
        String idType = 2; // String | Id Type (1:ADMIN, 2:User)
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.createAuthCode(userId, purpose, method, value, idType, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createAuthCode");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        String purpose = password; // String | Scope (password)
        String method = email; // String | Verification Methods
        String value = user01@example.com; // String | Mobile phone / Email
        String idType = 2; // String | Id Type (1:ADMIN, 2:User)
        String locale = en; // String | Locale
        try {
            UserMessageDoc result = apiInstance.createAuthCode(userId, purpose, method, value, idType, locale);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createAuthCode");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)
String *purpose = password; // Scope (password)
String *method = email; // Verification Methods
String *value = user01@example.com; // Mobile phone / Email
String *idType = 2; // Id Type (1:ADMIN, 2:User) (default to 2)
String *locale = en; // Locale (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Generate an authentication code
[apiInstance createAuthCodeWith:userId
    purpose:purpose
    method:method
    value:value
    idType:idType
    locale:locale
              completionHandler: ^(UserMessageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)

var purpose = password; // {String} Scope (password)

var method = email; // {String} Verification Methods

var value = user01@example.com; // {String} Mobile phone / Email

var idType = 2; // {String} Id Type (1:ADMIN, 2:User)

var opts = { 
  'locale': en // {String} Locale
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createAuthCode(userId, purpose, method, value, idType, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createAuthCodeExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)
            var purpose = password;  // String | Scope (password)
            var method = email;  // String | Verification Methods
            var value = user01@example.com;  // String | Mobile phone / Email
            var idType = 2;  // String | Id Type (1:ADMIN, 2:User) (default to 2)
            var locale = en;  // String | Locale (optional) 

            try
            {
                // Generate an authentication code
                UserMessageDoc result = apiInstance.createAuthCode(userId, purpose, method, value, idType, locale);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createAuthCode: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)
$purpose = password; // String | Scope (password)
$method = email; // String | Verification Methods
$value = user01@example.com; // String | Mobile phone / Email
$idType = 2; // String | Id Type (1:ADMIN, 2:User)
$locale = en; // String | Locale

try {
    $result = $api_instance->createAuthCode($userId, $purpose, $method, $value, $idType, $locale);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createAuthCode: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)
my $purpose = password; # String | Scope (password)
my $method = email; # String | Verification Methods
my $value = user01@example.com; # String | Mobile phone / Email
my $idType = 2; # String | Id Type (1:ADMIN, 2:User)
my $locale = en; # String | Locale

eval { 
    my $result = $api_instance->createAuthCode(userId => $userId, purpose => $purpose, method => $method, value => $value, idType => $idType, locale => $locale);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createAuthCode: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)
purpose = password # String | Scope (password)
method = email # String | Verification Methods
value = user01@example.com # String | Mobile phone / Email
idType = 2 # String | Id Type (1:ADMIN, 2:User) (default to 2)
locale = en # String | Locale (optional)

try: 
    # Generate an authentication code
    api_response = api_instance.create_auth_code(userId, purpose, method, value, idType, locale=locale)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createAuthCode: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required
Form parameters
Name Description
purpose*
String
Scope (password)
Enum: password
Required
method*
String
Verification Methods
Enum: password sms, email
Required
value*
String
Mobile phone / Email
Required
Query parameters
Name Description
idType*
String
Id Type (1:ADMIN, 2:User)
Required
locale
String
Locale

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 416 - Range Not Satisfiable

Status: 500 - Internal Server Error


createOTPTokens

Generate an OTP

Generates a one-time token for the user specified. The token is kept in the server memory only.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/otptokens?apiKey={Key}"</pre>Response<pre>{"token":"{64 alphanumeric characters}"}</pre>&bull; 404: the user does not exist.<br/>&bull; 403: the user is an administrator and the caller cannot edit administrators.


/users/{userId}/otptokens

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/users/{userId}/otptokens"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            UserOtpTokenDoc result = apiInstance.createOTPTokens(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createOTPTokens");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            UserOtpTokenDoc result = apiInstance.createOTPTokens(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createOTPTokens");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Generate an OTP 
[apiInstance createOTPTokensWith:userId
              completionHandler: ^(UserOtpTokenDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createOTPTokens(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createOTPTokensExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)

            try
            {
                // Generate an OTP 
                UserOtpTokenDoc result = apiInstance.createOTPTokens(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createOTPTokens: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)

try {
    $result = $api_instance->createOTPTokens($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createOTPTokens: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)

eval { 
    my $result = $api_instance->createOTPTokens(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createOTPTokens: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)

try: 
    # Generate an OTP 
    api_response = api_instance.create_otp_tokens(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createOTPTokens: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 404 - User not found

Status: 500 - Internal Server Error


createUserTags

Assign a tag

Assigns tags to the user specified. Specify each tag by <code>name</code> or <code>id</code>. <code>applyAgent=1</code> also applies the policy to the user's Agents.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '[{"name":"TAG_A"}]'</pre>Response<pre>[{"type":"user","id":"2","name":"TAG_A","description":"","targetId":"{User ID}","startDate":null,"expireDate":null}]</pre>The response has all tags of the user after the change. When any tag in the body does not exist, nothing is assigned and the API returns 500.


/users/{userId}/tags

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/users/{userId}/tags?applyAgent="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        Integer applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[UserTagDoc] result = apiInstance.createUserTags(userId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUserTags");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username
        array[TagVo] body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
        Integer applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[UserTagDoc] result = apiInstance.createUserTags(userId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUserTags");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username
array[TagVo] *body = ; // Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
Integer *applyAgent = 1; // Apply the policy to the agent.(0: false, 1: true) (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Assign a tag
[apiInstance createUserTagsWith:userId
    body:body
    applyAgent:applyAgent
              completionHandler: ^(array[UserTagDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username

var body = ; // {array[TagVo]} Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)

var opts = { 
  'applyAgent': 1 // {Integer} Apply the policy to the agent.(0: false, 1: true)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUserTags(userId, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUserTagsExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username
            var body = new array[TagVo](); // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
            var applyAgent = 1;  // Integer | Apply the policy to the agent.(0: false, 1: true) (optional) 

            try
            {
                // Assign a tag
                array[UserTagDoc] result = apiInstance.createUserTags(userId, body, applyAgent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createUserTags: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username
$body = ; // array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
$applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)

try {
    $result = $api_instance->createUserTags($userId, $body, $applyAgent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createUserTags: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username
my $body = [WWW::SwaggerClient::Object::array[TagVo]->new()]; # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
my $applyAgent = 1; # Integer | Apply the policy to the agent.(0: false, 1: true)

eval { 
    my $result = $api_instance->createUserTags(userId => $userId, body => $body, applyAgent => $applyAgent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createUserTags: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username
body =  # array[TagVo] | Tag JSON Array (Expiry Format: yyyy-MM-dd HH:mm)
applyAgent = 1 # Integer | Apply the policy to the agent.(0: false, 1: true) (optional)

try: 
    # Assign a tag
    api_response = api_instance.create_user_tags(userId, body, applyAgent=applyAgent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createUserTags: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username
Required
Body parameters
Name Description
body *
Query parameters
Name Description
applyAgent
Integer (int32)
Apply the policy to the agent.(0: false, 1: true)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


createUsers

Add a new user

Adds new users. The body is a list. <code>user_id</code> and <code>user_name</code> are required. Fields are the same as in <code>GET /users/{userId}</code>; <code>user_password</code> is the plain text password.<br/>Example<pre>curl -k -X POST "https://{Policy Server Management IP}/mc2/rest/users?apiKey={Key}" -H "Content-Type: application/json" -d '[{"user_id":"user01","user_name":"User 01","user_password":"{Password}","user_dept":"{Dept Code}"}]'</pre>Response<pre>{"success":[{"code":200,"message":"","parameter":{"user_id":"user01",...}}],"fail":[]}</pre>Returns HTTP 200 even when a user is not created. Always check <code>fail</code>: code 400 for an invalid or duplicate ID or a missing name, 403 when <code>adminVo</code> is set and the caller cannot create administrators.<br/> The body must be a JSON array; an object returns 400.


/users

Usage and SDK Samples

curl -X POST "https://localhost/mc2/rest/users"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        array[UserWithAdminVo] body = ; // array[UserWithAdminVo] | JSON Data
        try {
            UserCreateResultDoc result = apiInstance.createUsers(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        array[UserWithAdminVo] body = ; // array[UserWithAdminVo] | JSON Data
        try {
            UserCreateResultDoc result = apiInstance.createUsers(body);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#createUsers");
            e.printStackTrace();
        }
    }
}
array[UserWithAdminVo] *body = ; // JSON Data

UsersApi *apiInstance = [[UsersApi alloc] init];

// Add a new user
[apiInstance createUsersWith:body
              completionHandler: ^(UserCreateResultDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var body = ; // {array[UserWithAdminVo]} JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.createUsers(body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class createUsersExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var body = new array[UserWithAdminVo](); // array[UserWithAdminVo] | JSON Data

            try
            {
                // Add a new user
                UserCreateResultDoc result = apiInstance.createUsers(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.createUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$body = ; // array[UserWithAdminVo] | JSON Data

try {
    $result = $api_instance->createUsers($body);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->createUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = [WWW::SwaggerClient::Object::array[UserWithAdminVo]->new()]; # array[UserWithAdminVo] | JSON Data

eval { 
    my $result = $api_instance->createUsers(body => $body);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->createUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # array[UserWithAdminVo] | JSON Data

try: 
    # Add a new user
    api_response = api_instance.create_users(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->createUsers: %s\n" % e)

Parameters

Body parameters
Name Description
body *

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 500 - Internal Server Error


deleteUser

Delete a specific user

Deletes the user specified. The user's tags are removed too.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/users/{User ID}?apiKey={Key}"</pre>Returns HTTP 200 with an empty body. It also returns 200 when the user does not exist, so check with <code>GET /users/{userId}</code> (404 after deletion).<br/>&bull; 403: the user is an administrator and the caller cannot delete administrators, or the caller deletes itself.<br/>&bull; 400: the deletion would remove all active super administrators.


/users/{userId}

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            apiInstance.deleteUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            apiInstance.deleteUser(userId);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUser");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Delete a specific user
[apiInstance deleteUserWith:userId
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.deleteUser(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteUserExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)

            try
            {
                // Delete a specific user
                apiInstance.deleteUser(userId);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.deleteUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)

try {
    $api_instance->deleteUser($userId);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->deleteUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)

eval { 
    $api_instance->deleteUser(userId => $userId);
};
if ($@) {
    warn "Exception when calling UsersApi->deleteUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)

try: 
    # Delete a specific user
    api_instance.delete_user(userId)
except ApiException as e:
    print("Exception when calling UsersApi->deleteUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required

Responses

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 500 - Internal Server Error


deleteUserTags

Remove the tag(s)

Removes tags from the user specified. The body is a list of tag IDs, not tag names. <code>applyAgent=1</code> also applies the policy to the user's Agents.<br/>Example<pre>curl -k -X DELETE "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/tags?apiKey={Key}" -H "Content-Type: application/json" -d '["2"]'</pre>Response<pre>[{"type":"user","id":"3","name":"TAG_B","targetId":"{User ID}",...}]</pre>The response has the remaining tags; an empty list means no tag is left. A tag name or an ID that is not assigned is ignored and still returns 200.


/users/{userId}/tags

Usage and SDK Samples

curl -X DELETE "https://localhost/mc2/rest/users/{userId}/tags?applyAgent="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        array[String] body = ; // array[String] | Tag List
        Integer applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[UserTagDoc] result = apiInstance.deleteUserTags(userId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUserTags");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        array[String] body = ; // array[String] | Tag List
        Integer applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)
        try {
            array[UserTagDoc] result = apiInstance.deleteUserTags(userId, body, applyAgent);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#deleteUserTags");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)
array[String] *body = ; // Tag List
Integer *applyAgent = 1; // Apply the policy to the agent.(0: false, 1: true) (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Remove the tag(s)
[apiInstance deleteUserTagsWith:userId
    body:body
    applyAgent:applyAgent
              completionHandler: ^(array[UserTagDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)

var body = ; // {array[String]} Tag List

var opts = { 
  'applyAgent': 1 // {Integer} Apply the policy to the agent.(0: false, 1: true)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.deleteUserTags(userId, body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class deleteUserTagsExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)
            var body = new array[String](); // array[String] | Tag List
            var applyAgent = 1;  // Integer | Apply the policy to the agent.(0: false, 1: true) (optional) 

            try
            {
                // Remove the tag(s)
                array[UserTagDoc] result = apiInstance.deleteUserTags(userId, body, applyAgent);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.deleteUserTags: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)
$body = ; // array[String] | Tag List
$applyAgent = 1; // Integer | Apply the policy to the agent.(0: false, 1: true)

try {
    $result = $api_instance->deleteUserTags($userId, $body, $applyAgent);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->deleteUserTags: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)
my $body = [WWW::SwaggerClient::Object::array[String]->new()]; # array[String] | Tag List
my $applyAgent = 1; # Integer | Apply the policy to the agent.(0: false, 1: true)

eval { 
    my $result = $api_instance->deleteUserTags(userId => $userId, body => $body, applyAgent => $applyAgent);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->deleteUserTags: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)
body =  # array[String] | Tag List
applyAgent = 1 # Integer | Apply the policy to the agent.(0: false, 1: true) (optional)

try: 
    # Remove the tag(s)
    api_response = api_instance.delete_user_tags(userId, body, applyAgent=applyAgent)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->deleteUserTags: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required
Body parameters
Name Description
body *
Query parameters
Name Description
applyAgent
Integer (int32)
Apply the policy to the agent.(0: false, 1: true)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


getUser

Retrieve a specific user's information

Retrieves the information of the user specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/users/{User ID}?apiKey={Key}"</pre>Field names are in lower case, such as <code>user_id</code>, <code>user_name</code> and <code>user_status</code>.


/users/{userId}

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            UserDoc result = apiInstance.getUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            UserDoc result = apiInstance.getUser(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUser");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Retrieve a specific user's information
[apiInstance getUserWith:userId
              completionHandler: ^(UserDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUser(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)

            try
            {
                // Retrieve a specific user's information
                UserDoc result = apiInstance.getUser(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)

try {
    $result = $api_instance->getUser($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)

eval { 
    my $result = $api_instance->getUser(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)

try: 
    # Retrieve a specific user's information
    api_response = api_instance.get_user(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Not Found


getUserTags

Retrieve a specific user's tag(s)

Retrieves the tag(s) assigned to the user specified.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/users/{User ID}/tags?apiKey={Key}"</pre>Returns 404 when no tag is assigned to the user.


/users/{userId}/tags

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/users/{userId}/tags"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            array[UserTagDoc] result = apiInstance.getUserTags(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserTags");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | Username (USER_ID)
        try {
            array[UserTagDoc] result = apiInstance.getUserTags(userId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUserTags");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // Username (USER_ID)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Retrieve a specific user's tag(s)
[apiInstance getUserTagsWith:userId
              completionHandler: ^(array[UserTagDoc] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} Username (USER_ID)


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUserTags(userId, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUserTagsExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | Username (USER_ID)

            try
            {
                // Retrieve a specific user's tag(s)
                array[UserTagDoc] result = apiInstance.getUserTags(userId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUserTags: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | Username (USER_ID)

try {
    $result = $api_instance->getUserTags($userId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUserTags: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | Username (USER_ID)

eval { 
    my $result = $api_instance->getUserTags(userId => $userId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUserTags: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | Username (USER_ID)

try: 
    # Retrieve a specific user's tag(s)
    api_response = api_instance.get_user_tags(userId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUserTags: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
Username (USER_ID)
Required

Responses

Status: 200 - Success

Status: 401 - Unauthorized

Status: 404 - Username Not Found


getUsers

List users

Retrieves a list of the users. <code>view</code> is required (<code>user</code> or <code>admin</code>). Without it, the API returns 400.<br/>Example<pre>curl -k "https://{Policy Server Management IP}/mc2/rest/users?apiKey={Key}&amp;view=user&amp;page=1&amp;pageSize=30"</pre>The response is <code>{"result":[...],"total":N,"page":1,"pageSize":30}</code>. Each row has <code>USER_ID</code>, <code>USER_NAME</code>, <code>USER_DEPT</code>, <code>USER_EMAIL</code> and <code>USER_STATUS</code>.


/users

Usage and SDK Samples

curl -X GET "https://localhost/mc2/rest/users?page=&pageSize=&view=&qsearch2=&type=&searchFlag=&id=&name=&dept=&position=&cdept=&deptpath=&cposition=&status=&right=&authstatus=&newadd=&noAuthDays=&authsynctype=&roleId=&property=&purpose=&userGrp=&quickSearch=&customKey=&customField=&customFieldVal=&customParam="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String view = user; // String | View (user: users, admin: administrators)
        String qsearch2 = user01; // String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
        String type = 1; // String | User type (1: password authentication, 2: registration authentication). Default 1
        String searchFlag = 1; // String | Search flag. Use 1 (default); other values return no rows
        String id = user01; // String | User ID (partial match)
        String name = User 01; // String | User name (partial match)
        String dept = D001; // String | Department code (exact match)
        String position = Staff; // String | Position (partial match)
        String cdept = D001; // String | Department code (exact match). With deptpath, includes the sub-departments
        String deptpath = D000/D001; // String | Department path used with cdept to include the sub-departments
        String cposition = Staff; // String | Position (exact match)
        String status = 1; // String | Account status (USER_STATUS). 99 or omitted: all
        String right = 1; // String | Not used
        String authstatus = 1; // String | Not used
        String newadd = 2026-11-10; // String | Creation date (yyyy-MM-dd)
        String noAuthDays = 30; // String | Users not authenticated for this number of days or more
        String authsynctype = LOCAL; // String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
        String roleId = superAdmin; // String | Administrator role ID (ALL: all)
        String property = TAG_A; // String | Tag name
        String purpose = notset; // String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
        String userGrp = 1; // String | User group ID (ALL: all)
        String quickSearch = user01; // String | Not used for filtering. Use qsearch2
        String customKey = dept; // String | Custom data key to join (dept)
        String customField = USER_CUSTOM01; // String | User column name to filter with customFieldVal (letters, numbers and _ only)
        String customFieldVal = VALUE_A; // String | Value of the customField column (exact match)
        String customParam = authlast;gt;2026-11-10 10:00:00; // String | customParam (e.g., authlast;gt;2020-01-03 23:59:59)
        try {
            UserPageDoc result = apiInstance.getUsers(page, pageSize, view, qsearch2, type, searchFlag, id, name, dept, position, cdept, deptpath, cposition, status, right, authstatus, newadd, noAuthDays, authsynctype, roleId, property, purpose, userGrp, quickSearch, customKey, customField, customFieldVal, customParam);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUsers");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        Integer page = 1; // Integer | Results page to be retrieved
        Integer pageSize = 30; // Integer | Number of records per page
        String view = user; // String | View (user: users, admin: administrators)
        String qsearch2 = user01; // String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
        String type = 1; // String | User type (1: password authentication, 2: registration authentication). Default 1
        String searchFlag = 1; // String | Search flag. Use 1 (default); other values return no rows
        String id = user01; // String | User ID (partial match)
        String name = User 01; // String | User name (partial match)
        String dept = D001; // String | Department code (exact match)
        String position = Staff; // String | Position (partial match)
        String cdept = D001; // String | Department code (exact match). With deptpath, includes the sub-departments
        String deptpath = D000/D001; // String | Department path used with cdept to include the sub-departments
        String cposition = Staff; // String | Position (exact match)
        String status = 1; // String | Account status (USER_STATUS). 99 or omitted: all
        String right = 1; // String | Not used
        String authstatus = 1; // String | Not used
        String newadd = 2026-11-10; // String | Creation date (yyyy-MM-dd)
        String noAuthDays = 30; // String | Users not authenticated for this number of days or more
        String authsynctype = LOCAL; // String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
        String roleId = superAdmin; // String | Administrator role ID (ALL: all)
        String property = TAG_A; // String | Tag name
        String purpose = notset; // String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
        String userGrp = 1; // String | User group ID (ALL: all)
        String quickSearch = user01; // String | Not used for filtering. Use qsearch2
        String customKey = dept; // String | Custom data key to join (dept)
        String customField = USER_CUSTOM01; // String | User column name to filter with customFieldVal (letters, numbers and _ only)
        String customFieldVal = VALUE_A; // String | Value of the customField column (exact match)
        String customParam = authlast;gt;2026-11-10 10:00:00; // String | customParam (e.g., authlast;gt;2020-01-03 23:59:59)
        try {
            UserPageDoc result = apiInstance.getUsers(page, pageSize, view, qsearch2, type, searchFlag, id, name, dept, position, cdept, deptpath, cposition, status, right, authstatus, newadd, noAuthDays, authsynctype, roleId, property, purpose, userGrp, quickSearch, customKey, customField, customFieldVal, customParam);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#getUsers");
            e.printStackTrace();
        }
    }
}
Integer *page = 1; // Results page to be retrieved (default to 1)
Integer *pageSize = 30; // Number of records per page (default to 30)
String *view = user; // View (user: users, admin: administrators) (default to user)
String *qsearch2 = user01; // Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields (optional)
String *type = 1; // User type (1: password authentication, 2: registration authentication). Default 1 (optional)
String *searchFlag = 1; // Search flag. Use 1 (default); other values return no rows (optional)
String *id = user01; // User ID (partial match) (optional)
String *name = User 01; // User name (partial match) (optional)
String *dept = D001; // Department code (exact match) (optional)
String *position = Staff; // Position (partial match) (optional)
String *cdept = D001; // Department code (exact match). With deptpath, includes the sub-departments (optional)
String *deptpath = D000/D001; // Department path used with cdept to include the sub-departments (optional)
String *cposition = Staff; // Position (exact match) (optional)
String *status = 1; // Account status (USER_STATUS). 99 or omitted: all (optional)
String *right = 1; // Not used (optional)
String *authstatus = 1; // Not used (optional)
String *newadd = 2026-11-10; // Creation date (yyyy-MM-dd) (optional)
String *noAuthDays = 30; // Users not authenticated for this number of days or more (optional)
String *authsynctype = LOCAL; // Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all) (optional)
String *roleId = superAdmin; // Administrator role ID (ALL: all) (optional)
String *property = TAG_A; // Tag name (optional)
String *purpose = notset; // Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all (optional)
String *userGrp = 1; // User group ID (ALL: all) (optional)
String *quickSearch = user01; // Not used for filtering. Use qsearch2 (optional)
String *customKey = dept; // Custom data key to join (dept) (optional)
String *customField = USER_CUSTOM01; // User column name to filter with customFieldVal (letters, numbers and _ only) (optional)
String *customFieldVal = VALUE_A; // Value of the customField column (exact match) (optional)
String *customParam = authlast;gt;2026-11-10 10:00:00; // customParam (e.g., authlast;gt;2020-01-03 23:59:59) (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// List users
[apiInstance getUsersWith:page
    pageSize:pageSize
    view:view
    qsearch2:qsearch2
    type:type
    searchFlag:searchFlag
    id:id
    name:name
    dept:dept
    position:position
    cdept:cdept
    deptpath:deptpath
    cposition:cposition
    status:status
    right:right
    authstatus:authstatus
    newadd:newadd
    noAuthDays:noAuthDays
    authsynctype:authsynctype
    roleId:roleId
    property:property
    purpose:purpose
    userGrp:userGrp
    quickSearch:quickSearch
    customKey:customKey
    customField:customField
    customFieldVal:customFieldVal
    customParam:customParam
              completionHandler: ^(UserPageDoc output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var page = 1; // {Integer} Results page to be retrieved

var pageSize = 30; // {Integer} Number of records per page

var view = user; // {String} View (user: users, admin: administrators)

var opts = { 
  'qsearch2': user01, // {String} Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
  'type': 1, // {String} User type (1: password authentication, 2: registration authentication). Default 1
  'searchFlag': 1, // {String} Search flag. Use 1 (default); other values return no rows
  'id': user01, // {String} User ID (partial match)
  'name': User 01, // {String} User name (partial match)
  'dept': D001, // {String} Department code (exact match)
  'position': Staff, // {String} Position (partial match)
  'cdept': D001, // {String} Department code (exact match). With deptpath, includes the sub-departments
  'deptpath': D000/D001, // {String} Department path used with cdept to include the sub-departments
  'cposition': Staff, // {String} Position (exact match)
  'status': 1, // {String} Account status (USER_STATUS). 99 or omitted: all
  'right': 1, // {String} Not used
  'authstatus': 1, // {String} Not used
  'newadd': 2026-11-10, // {String} Creation date (yyyy-MM-dd)
  'noAuthDays': 30, // {String} Users not authenticated for this number of days or more
  'authsynctype': LOCAL, // {String} Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
  'roleId': superAdmin, // {String} Administrator role ID (ALL: all)
  'property': TAG_A, // {String} Tag name
  'purpose': notset, // {String} Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
  'userGrp': 1, // {String} User group ID (ALL: all)
  'quickSearch': user01, // {String} Not used for filtering. Use qsearch2
  'customKey': dept, // {String} Custom data key to join (dept)
  'customField': USER_CUSTOM01, // {String} User column name to filter with customFieldVal (letters, numbers and _ only)
  'customFieldVal': VALUE_A, // {String} Value of the customField column (exact match)
  'customParam': authlast;gt;2026-11-10 10:00:00 // {String} customParam (e.g., authlast;gt;2020-01-03 23:59:59)
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.getUsers(page, pageSize, view, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class getUsersExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var page = 1;  // Integer | Results page to be retrieved (default to 1)
            var pageSize = 30;  // Integer | Number of records per page (default to 30)
            var view = user;  // String | View (user: users, admin: administrators) (default to user)
            var qsearch2 = user01;  // String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields (optional) 
            var type = 1;  // String | User type (1: password authentication, 2: registration authentication). Default 1 (optional) 
            var searchFlag = 1;  // String | Search flag. Use 1 (default); other values return no rows (optional) 
            var id = user01;  // String | User ID (partial match) (optional) 
            var name = User 01;  // String | User name (partial match) (optional) 
            var dept = D001;  // String | Department code (exact match) (optional) 
            var position = Staff;  // String | Position (partial match) (optional) 
            var cdept = D001;  // String | Department code (exact match). With deptpath, includes the sub-departments (optional) 
            var deptpath = D000/D001;  // String | Department path used with cdept to include the sub-departments (optional) 
            var cposition = Staff;  // String | Position (exact match) (optional) 
            var status = 1;  // String | Account status (USER_STATUS). 99 or omitted: all (optional) 
            var right = 1;  // String | Not used (optional) 
            var authstatus = 1;  // String | Not used (optional) 
            var newadd = 2026-11-10;  // String | Creation date (yyyy-MM-dd) (optional) 
            var noAuthDays = 30;  // String | Users not authenticated for this number of days or more (optional) 
            var authsynctype = LOCAL;  // String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all) (optional) 
            var roleId = superAdmin;  // String | Administrator role ID (ALL: all) (optional) 
            var property = TAG_A;  // String | Tag name (optional) 
            var purpose = notset;  // String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all (optional) 
            var userGrp = 1;  // String | User group ID (ALL: all) (optional) 
            var quickSearch = user01;  // String | Not used for filtering. Use qsearch2 (optional) 
            var customKey = dept;  // String | Custom data key to join (dept) (optional) 
            var customField = USER_CUSTOM01;  // String | User column name to filter with customFieldVal (letters, numbers and _ only) (optional) 
            var customFieldVal = VALUE_A;  // String | Value of the customField column (exact match) (optional) 
            var customParam = authlast;gt;2026-11-10 10:00:00;  // String | customParam (e.g., authlast;gt;2020-01-03 23:59:59) (optional) 

            try
            {
                // List users
                UserPageDoc result = apiInstance.getUsers(page, pageSize, view, qsearch2, type, searchFlag, id, name, dept, position, cdept, deptpath, cposition, status, right, authstatus, newadd, noAuthDays, authsynctype, roleId, property, purpose, userGrp, quickSearch, customKey, customField, customFieldVal, customParam);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.getUsers: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$page = 1; // Integer | Results page to be retrieved
$pageSize = 30; // Integer | Number of records per page
$view = user; // String | View (user: users, admin: administrators)
$qsearch2 = user01; // String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
$type = 1; // String | User type (1: password authentication, 2: registration authentication). Default 1
$searchFlag = 1; // String | Search flag. Use 1 (default); other values return no rows
$id = user01; // String | User ID (partial match)
$name = User 01; // String | User name (partial match)
$dept = D001; // String | Department code (exact match)
$position = Staff; // String | Position (partial match)
$cdept = D001; // String | Department code (exact match). With deptpath, includes the sub-departments
$deptpath = D000/D001; // String | Department path used with cdept to include the sub-departments
$cposition = Staff; // String | Position (exact match)
$status = 1; // String | Account status (USER_STATUS). 99 or omitted: all
$right = 1; // String | Not used
$authstatus = 1; // String | Not used
$newadd = 2026-11-10; // String | Creation date (yyyy-MM-dd)
$noAuthDays = 30; // String | Users not authenticated for this number of days or more
$authsynctype = LOCAL; // String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
$roleId = superAdmin; // String | Administrator role ID (ALL: all)
$property = TAG_A; // String | Tag name
$purpose = notset; // String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
$userGrp = 1; // String | User group ID (ALL: all)
$quickSearch = user01; // String | Not used for filtering. Use qsearch2
$customKey = dept; // String | Custom data key to join (dept)
$customField = USER_CUSTOM01; // String | User column name to filter with customFieldVal (letters, numbers and _ only)
$customFieldVal = VALUE_A; // String | Value of the customField column (exact match)
$customParam = authlast;gt;2026-11-10 10:00:00; // String | customParam (e.g., authlast;gt;2020-01-03 23:59:59)

try {
    $result = $api_instance->getUsers($page, $pageSize, $view, $qsearch2, $type, $searchFlag, $id, $name, $dept, $position, $cdept, $deptpath, $cposition, $status, $right, $authstatus, $newadd, $noAuthDays, $authsynctype, $roleId, $property, $purpose, $userGrp, $quickSearch, $customKey, $customField, $customFieldVal, $customParam);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->getUsers: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $page = 1; # Integer | Results page to be retrieved
my $pageSize = 30; # Integer | Number of records per page
my $view = user; # String | View (user: users, admin: administrators)
my $qsearch2 = user01; # String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
my $type = 1; # String | User type (1: password authentication, 2: registration authentication). Default 1
my $searchFlag = 1; # String | Search flag. Use 1 (default); other values return no rows
my $id = user01; # String | User ID (partial match)
my $name = User 01; # String | User name (partial match)
my $dept = D001; # String | Department code (exact match)
my $position = Staff; # String | Position (partial match)
my $cdept = D001; # String | Department code (exact match). With deptpath, includes the sub-departments
my $deptpath = D000/D001; # String | Department path used with cdept to include the sub-departments
my $cposition = Staff; # String | Position (exact match)
my $status = 1; # String | Account status (USER_STATUS). 99 or omitted: all
my $right = 1; # String | Not used
my $authstatus = 1; # String | Not used
my $newadd = 2026-11-10; # String | Creation date (yyyy-MM-dd)
my $noAuthDays = 30; # String | Users not authenticated for this number of days or more
my $authsynctype = LOCAL; # String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
my $roleId = superAdmin; # String | Administrator role ID (ALL: all)
my $property = TAG_A; # String | Tag name
my $purpose = notset; # String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
my $userGrp = 1; # String | User group ID (ALL: all)
my $quickSearch = user01; # String | Not used for filtering. Use qsearch2
my $customKey = dept; # String | Custom data key to join (dept)
my $customField = USER_CUSTOM01; # String | User column name to filter with customFieldVal (letters, numbers and _ only)
my $customFieldVal = VALUE_A; # String | Value of the customField column (exact match)
my $customParam = authlast;gt;2026-11-10 10:00:00; # String | customParam (e.g., authlast;gt;2020-01-03 23:59:59)

eval { 
    my $result = $api_instance->getUsers(page => $page, pageSize => $pageSize, view => $view, qsearch2 => $qsearch2, type => $type, searchFlag => $searchFlag, id => $id, name => $name, dept => $dept, position => $position, cdept => $cdept, deptpath => $deptpath, cposition => $cposition, status => $status, right => $right, authstatus => $authstatus, newadd => $newadd, noAuthDays => $noAuthDays, authsynctype => $authsynctype, roleId => $roleId, property => $property, purpose => $purpose, userGrp => $userGrp, quickSearch => $quickSearch, customKey => $customKey, customField => $customField, customFieldVal => $customFieldVal, customParam => $customParam);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling UsersApi->getUsers: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
page = 1 # Integer | Results page to be retrieved (default to 1)
pageSize = 30 # Integer | Number of records per page (default to 30)
view = user # String | View (user: users, admin: administrators) (default to user)
qsearch2 = user01 # String | Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields (optional)
type = 1 # String | User type (1: password authentication, 2: registration authentication). Default 1 (optional)
searchFlag = 1 # String | Search flag. Use 1 (default); other values return no rows (optional)
id = user01 # String | User ID (partial match) (optional)
name = User 01 # String | User name (partial match) (optional)
dept = D001 # String | Department code (exact match) (optional)
position = Staff # String | Position (partial match) (optional)
cdept = D001 # String | Department code (exact match). With deptpath, includes the sub-departments (optional)
deptpath = D000/D001 # String | Department path used with cdept to include the sub-departments (optional)
cposition = Staff # String | Position (exact match) (optional)
status = 1 # String | Account status (USER_STATUS). 99 or omitted: all (optional)
right = 1 # String | Not used (optional)
authstatus = 1 # String | Not used (optional)
newadd = 2026-11-10 # String | Creation date (yyyy-MM-dd) (optional)
noAuthDays = 30 # String | Users not authenticated for this number of days or more (optional)
authsynctype = LOCAL # String | Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all) (optional)
roleId = superAdmin # String | Administrator role ID (ALL: all) (optional)
property = TAG_A # String | Tag name (optional)
purpose = notset # String | Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all (optional)
userGrp = 1 # String | User group ID (ALL: all) (optional)
quickSearch = user01 # String | Not used for filtering. Use qsearch2 (optional)
customKey = dept # String | Custom data key to join (dept) (optional)
customField = USER_CUSTOM01 # String | User column name to filter with customFieldVal (letters, numbers and _ only) (optional)
customFieldVal = VALUE_A # String | Value of the customField column (exact match) (optional)
customParam = authlast;gt;2026-11-10 10:00:00 # String | customParam (e.g., authlast;gt;2020-01-03 23:59:59) (optional)

try: 
    # List users
    api_response = api_instance.get_users(page, pageSize, view, qsearch2=qsearch2, type=type, searchFlag=searchFlag, id=id, name=name, dept=dept, position=position, cdept=cdept, deptpath=deptpath, cposition=cposition, status=status, right=right, authstatus=authstatus, newadd=newadd, noAuthDays=noAuthDays, authsynctype=authsynctype, roleId=roleId, property=property, purpose=purpose, userGrp=userGrp, quickSearch=quickSearch, customKey=customKey, customField=customField, customFieldVal=customFieldVal, customParam=customParam)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling UsersApi->getUsers: %s\n" % e)

Parameters

Query parameters
Name Description
page*
Integer (int32)
Results page to be retrieved
Required
pageSize*
Integer (int32)
Number of records per page
Required
view*
String
View (user: users, admin: administrators)
Required
qsearch2
String
Search string. Matches the ID, name, description, role, company, department, position, phone, email, address, allowed IP/MAC and custom fields
type
String
User type (1: password authentication, 2: registration authentication). Default 1
searchFlag
String
Search flag. Use 1 (default); other values return no rows
id
String
User ID (partial match)
name
String
User name (partial match)
dept
String
Department code (exact match)
position
String
Position (partial match)
cdept
String
Department code (exact match). With deptpath, includes the sub-departments
deptpath
String
Department path used with cdept to include the sub-departments
cposition
String
Position (exact match)
status
String
Account status (USER_STATUS). 99 or omitted: all
right
String
Not used
authstatus
String
Not used
newadd
String
Creation date (yyyy-MM-dd)
noAuthDays
String
Users not authenticated for this number of days or more
authsynctype
String
Account source (LOCAL: local accounts, SYNC: synchronized accounts, ALL: all)
roleId
String
Administrator role ID (ALL: all)
property
String
Tag name
purpose
String
Account purpose (USER_APPPURPOSE). notset: accounts without a purpose, ALL: all
userGrp
String
User group ID (ALL: all)
quickSearch
String
Not used for filtering. Use qsearch2
customKey
String
Custom data key to join (dept)
customField
String
User column name to filter with customFieldVal (letters, numbers and _ only)
customFieldVal
String
Value of the customField column (exact match)
customParam
String
customParam (e.g., authlast;gt;2020-01-03 23:59:59)

Responses

Status: 200 - Success

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 404 - Not Found

Status: 500 - Internal Server Error


updateMyinfo

Edit my information

Updates the information of the caller (the API key owner or the signed-in administrator). <code>user_id</code> in the body must be the caller's ID. Like <code>PUT /users/{userId}</code>, fields not in the body are cleared.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/users/myinfo?apiKey={Key}" -H "Content-Type: application/json" -d '{"user_id":"{My ID}","user_name":"Admin","user_email":"admin@example.com"}'</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 400: <code>user_id</code> is not the caller, or the body is missing.<br/>&bull; 500: the user is not saved, for example when a synchronized account changes a field it cannot change.<br/>&bull; 401: no signed-in session. <code>locale</code> sets the language of error messages.


/users/myinfo

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/users/myinfo?locale="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        UserVo body = ; // UserVo | UserVo JSON Data
        String locale = en; // String | Locale
        try {
            apiInstance.updateMyinfo(body, locale);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateMyinfo");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        UserVo body = ; // UserVo | UserVo JSON Data
        String locale = en; // String | Locale
        try {
            apiInstance.updateMyinfo(body, locale);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateMyinfo");
            e.printStackTrace();
        }
    }
}
UserVo *body = ; // UserVo JSON Data
String *locale = en; // Locale (optional)

UsersApi *apiInstance = [[UsersApi alloc] init];

// Edit my information
[apiInstance updateMyinfoWith:body
    locale:locale
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var body = ; // {UserVo} UserVo JSON Data

var opts = { 
  'locale': en // {String} Locale
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateMyinfo(body, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateMyinfoExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var body = new UserVo(); // UserVo | UserVo JSON Data
            var locale = en;  // String | Locale (optional) 

            try
            {
                // Edit my information
                apiInstance.updateMyinfo(body, locale);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.updateMyinfo: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$body = ; // UserVo | UserVo JSON Data
$locale = en; // String | Locale

try {
    $api_instance->updateMyinfo($body, $locale);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateMyinfo: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $body = WWW::SwaggerClient::Object::UserVo->new(); # UserVo | UserVo JSON Data
my $locale = en; # String | Locale

eval { 
    $api_instance->updateMyinfo(body => $body, locale => $locale);
};
if ($@) {
    warn "Exception when calling UsersApi->updateMyinfo: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
body =  # UserVo | UserVo JSON Data
locale = en # String | Locale (optional)

try: 
    # Edit my information
    api_instance.update_myinfo(body, locale=locale)
except ApiException as e:
    print("Exception when calling UsersApi->updateMyinfo: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
locale
String
Locale

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 500 - Internal Server Error


updateUser

Update an existing user

Updates the user specified. This is a full update: fields that are not in the body are cleared or reset to defaults. Get the user with <code>GET /users/{userId}</code>, change the fields, and send the whole object. The path ID is used, and <code>user_id</code> in the body is ignored.<br/>Example<pre>curl -k -X PUT "https://{Policy Server Management IP}/mc2/rest/users/{User ID}?apiKey={Key}" -H "Content-Type: application/json" -d '{"user_name":"User 01","user_dept":"{Dept Code}","user_status":1,"user_desc":"..."}'</pre>Returns HTTP 200 with an empty body on success.<br/>&bull; 400: the body is missing.<br/>&bull; 403: the user is an administrator and the caller cannot edit administrators.<br/>&bull; 500: the user does not exist, a synchronized account changes a field it cannot change, or saving fails. Values such as auth limits are not range-checked.


/users/{userId}

Usage and SDK Samples

curl -X PUT "https://localhost/mc2/rest/users/{userId}"
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.UsersApi;

import java.io.File;
import java.util.*;

public class UsersApiExample {

    public static void main(String[] args) {
        
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | User ID
        UserVo body = ; // UserVo | UserVo JSON Data
        try {
            apiInstance.updateUser(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.UsersApi;

public class UsersApiExample {

    public static void main(String[] args) {
        UsersApi apiInstance = new UsersApi();
        String userId = user01; // String | User ID
        UserVo body = ; // UserVo | UserVo JSON Data
        try {
            apiInstance.updateUser(userId, body);
        } catch (ApiException e) {
            System.err.println("Exception when calling UsersApi#updateUser");
            e.printStackTrace();
        }
    }
}
String *userId = user01; // User ID
UserVo *body = ; // UserVo JSON Data

UsersApi *apiInstance = [[UsersApi alloc] init];

// Update an existing user
[apiInstance updateUserWith:userId
    body:body
              completionHandler: ^(NSError* error) {
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var GenianNacRestApi = require('genian_nac_rest_api');

var api = new GenianNacRestApi.UsersApi()

var userId = user01; // {String} User ID

var body = ; // {UserVo} UserVo JSON Data


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
api.updateUser(userId, body, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class updateUserExample
    {
        public void main()
        {
            
            var apiInstance = new UsersApi();
            var userId = user01;  // String | User ID
            var body = new UserVo(); // UserVo | UserVo JSON Data

            try
            {
                // Update an existing user
                apiInstance.updateUser(userId, body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling UsersApi.updateUser: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\Api\UsersApi();
$userId = user01; // String | User ID
$body = ; // UserVo | UserVo JSON Data

try {
    $api_instance->updateUser($userId, $body);
} catch (Exception $e) {
    echo 'Exception when calling UsersApi->updateUser: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::UsersApi;

my $api_instance = WWW::SwaggerClient::UsersApi->new();
my $userId = user01; # String | User ID
my $body = WWW::SwaggerClient::Object::UserVo->new(); # UserVo | UserVo JSON Data

eval { 
    $api_instance->updateUser(userId => $userId, body => $body);
};
if ($@) {
    warn "Exception when calling UsersApi->updateUser: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.UsersApi()
userId = user01 # String | User ID
body =  # UserVo | UserVo JSON Data

try: 
    # Update an existing user
    api_instance.update_user(userId, body)
except ApiException as e:
    print("Exception when calling UsersApi->updateUser: %s\n" % e)

Parameters

Path parameters
Name Description
userId*
String
User ID
Required
Body parameters
Name Description
body *

Responses

Status: 400 - Bad Request

Status: 401 - Unauthorized

Status: 403 - Forbidden

Status: 500 - Internal Server Error