Administrator Roles

List Administrator Roles

get/roles

Lists all administrator roles.

Related SDK Methods:
Java

AdministratorRolesApi.listAdministratorRoles([param1, param2, ...])

Python

AdministratorRolesApi.list_administrator_roles([param1, param2, ...])

JavaScript

AdministratorRolesApi.listAdministratorRoles([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to view administrator roles.

Request samples
import com.trendmicro.deepsecurity.ApiClient;
import com.trendmicro.deepsecurity.Configuration;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.ApiException;
import com.trendmicro.deepsecurity.api.AdministratorRolesApi;
import com.trendmicro.deepsecurity.model.AdministratorRoles;


public class ListAdministratorRolesExample {
	
	public static void main(String[] args) {
		// Setup
		ApiClient defaultClient = Configuration.getDefaultApiClient();
		defaultClient.setBasePath("YOUR HOST");

		// Authentication
		ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key");
		Legacy API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key");
		Trend Micro Cloud One API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		
		// Initialization
		// Set Any Required Values
		AdministratorRolesApi instance = new AdministratorRolesApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			AdministratorRoles result = instance.listAdministratorRoles(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling AdministratorRolesApi.listAdministratorRoles");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "roles": [
    ]
}

Create an Administrator Role

post/roles

Create a new administrator role.

Related SDK Methods:
Java

AdministratorRolesApi.createAdministratorRole([param1, param2, ...])

Python

AdministratorRolesApi.create_administrator_role([param1, param2, ...])

JavaScript

AdministratorRolesApi.createAdministratorRole([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The settings of the new administrator role.

allComputers
boolean

Controls whether or not the role is allowed to access all computers. Searchable as Boolean.

allowUserInterface
boolean

Controls whether or not the role is allowed to use the user interface. Searchable as Boolean.

allowWebService
boolean

Controls whether or not the role is allowed to use the web service API. Searchable as Boolean.

allPolicies
boolean

Controls whether or not the role is allowed to access all policies. Searchable as Boolean.

canOnlyManipulateUsersWithEqualOrLesserRights
boolean

Controls whether or not the role can only manipulate users with equal or lesser rights. Searchable as Boolean.

object (commonObjectScopes)

Administrator common object scope details.

computerGroupIDs
Array of integers <int32>

List of computer group IDs that the role can access. A group ID of '0' allows access to computers not in a computer group. Note that groups must be identified individually and that access to sub-groups is not automatically granted. Ignored if 'allComputers' is true.

computerIDs
Array of integers <int32>

List of computer IDs that the role can access. Ignored if 'allComputers' is true.

description
string

Description of the administrator role. Searchable as String.

name
string

Name of the administrator role. Searchable as String.

policyIDs
Array of integers <int32>

List of policy IDs that the role can access. Ignored if 'allPolicies' is true.

object (rights)

Administrator rights details.

Responses
200

successful operation

403

Not authorized to create administrator roles.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "canOnlyManipulateUsersWithEqualOrLesserRights": true,
  • "allComputers": true,
  • "allPolicies": true,
  • "commonObjectScopes": {
    },
  • "allowUserInterface": true,
  • "allowWebService": true,
  • "rights": {
    },
  • "computerIDs": [
    ],
  • "computerGroupIDs": [
    ],
  • "policyIDs": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "urn": "string",
  • "immutable": true,
  • "canOnlyManipulateUsersWithEqualOrLesserRights": true,
  • "allComputers": true,
  • "allPolicies": true,
  • "commonObjectScopes": {
    },
  • "allowUserInterface": true,
  • "allowWebService": true,
  • "rights": {
    },
  • "computerIDs": [
    ],
  • "computerGroupIDs": [
    ],
  • "policyIDs": [
    ],
  • "ID": 0
}

Search Administrator Roles

post/roles/search

Search for administrator roles using optional filters.

Related SDK Methods:
Java

AdministratorRolesApi.searchAdministratorRoles([param1, param2, ...])

Python

AdministratorRolesApi.search_administrator_roles([param1, param2, ...])

JavaScript

AdministratorRolesApi.searchAdministratorRoles([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

A collection of options used to filter the search results.

maxItems
integer <int32>

Limits the number of objects returned. Default 5000.

Array of objects (searchCriteria)

Array of search critiera used to filter objects. Searching with multiple criteria returns results that satisfy all of the criteria. Searching with no criteria returns all objects.

sortByObjectID
boolean

If true, forces the response objects to be sorted by ID, overriding the default sort order. Default "false".

Responses
200

successful operation

403

Not authorized to view administrator roles.

Request samples
application/json
{
  • "maxItems": 0,
  • "searchCriteria": [
    ],
  • "sortByObjectID": true
}
Response samples
application/json
{
  • "roles": [
    ]
}

Describe an Administrator Role

get/roles/{roleID}

Describe an administrator role by ID.

Related SDK Methods:
Java

AdministratorRolesApi.describeAdministratorRole([param1, param2, ...])

Python

AdministratorRolesApi.describe_administrator_role([param1, param2, ...])

JavaScript

AdministratorRolesApi.describeAdministratorRole([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
roleID
required
integer <int32> \d+

The ID number of the administrator role to describe.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

successful operation

403

Not authorized to view administrator roles.

404

The administrator role does not exist.

Request samples
import com.trendmicro.deepsecurity.ApiClient;
import com.trendmicro.deepsecurity.Configuration;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.ApiException;
import com.trendmicro.deepsecurity.api.AdministratorRolesApi;
import com.trendmicro.deepsecurity.model.Role;


public class DescribeAdministratorRoleExample {
	
	public static void main(String[] args) {
		// Setup
		ApiClient defaultClient = Configuration.getDefaultApiClient();
		defaultClient.setBasePath("YOUR HOST");

		// Authentication
		ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key");
		Legacy API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key");
		Trend Micro Cloud One API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		
		// Initialization
		// Set Any Required Values
		AdministratorRolesApi instance = new AdministratorRolesApi();
		Integer roleID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Role result = instance.describeAdministratorRole(roleID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling AdministratorRolesApi.describeAdministratorRole");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "urn": "string",
  • "immutable": true,
  • "canOnlyManipulateUsersWithEqualOrLesserRights": true,
  • "allComputers": true,
  • "allPolicies": true,
  • "commonObjectScopes": {
    },
  • "allowUserInterface": true,
  • "allowWebService": true,
  • "rights": {
    },
  • "computerIDs": [
    ],
  • "computerGroupIDs": [
    ],
  • "policyIDs": [
    ],
  • "ID": 0
}

Modify an Administrator Role

post/roles/{roleID}

Modify an administrator role by ID. Any properties that have no value are not modified.

Related SDK Methods:
Java

AdministratorRolesApi.modifyAdministratorRole([param1, param2, ...])

Python

AdministratorRolesApi.modify_administrator_role([param1, param2, ...])

JavaScript

AdministratorRolesApi.modifyAdministratorRole([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
roleID
required
integer <int32> \d+

The ID number of the administrator role to modify.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Request Body schema: application/json

The settings of the administrator role to modify.

allComputers
boolean

Controls whether or not the role is allowed to access all computers. Searchable as Boolean.

allowUserInterface
boolean

Controls whether or not the role is allowed to use the user interface. Searchable as Boolean.

allowWebService
boolean

Controls whether or not the role is allowed to use the web service API. Searchable as Boolean.

allPolicies
boolean

Controls whether or not the role is allowed to access all policies. Searchable as Boolean.

canOnlyManipulateUsersWithEqualOrLesserRights
boolean

Controls whether or not the role can only manipulate users with equal or lesser rights. Searchable as Boolean.

object (commonObjectScopes)

Administrator common object scope details.

computerGroupIDs
Array of integers <int32>

List of computer group IDs that the role can access. A group ID of '0' allows access to computers not in a computer group. Note that groups must be identified individually and that access to sub-groups is not automatically granted. Ignored if 'allComputers' is true.

computerIDs
Array of integers <int32>

List of computer IDs that the role can access. Ignored if 'allComputers' is true.

description
string

Description of the administrator role. Searchable as String.

name
string

Name of the administrator role. Searchable as String.

policyIDs
Array of integers <int32>

List of policy IDs that the role can access. Ignored if 'allPolicies' is true.

object (rights)

Administrator rights details.

Responses
200

successful operation

403

Not authorized to modify administrator roles or the requested modification is not permitted.

404

The administrator role does not exist.

Request samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "canOnlyManipulateUsersWithEqualOrLesserRights": true,
  • "allComputers": true,
  • "allPolicies": true,
  • "commonObjectScopes": {
    },
  • "allowUserInterface": true,
  • "allowWebService": true,
  • "rights": {
    },
  • "computerIDs": [
    ],
  • "computerGroupIDs": [
    ],
  • "policyIDs": [
    ]
}
Response samples
application/json
{
  • "name": "string",
  • "description": "string",
  • "urn": "string",
  • "immutable": true,
  • "canOnlyManipulateUsersWithEqualOrLesserRights": true,
  • "allComputers": true,
  • "allPolicies": true,
  • "commonObjectScopes": {
    },
  • "allowUserInterface": true,
  • "allowWebService": true,
  • "rights": {
    },
  • "computerIDs": [
    ],
  • "computerGroupIDs": [
    ],
  • "policyIDs": [
    ],
  • "ID": 0
}

Delete an Administrator Role

delete/roles/{roleID}

Delete an administrator role by ID.

Related SDK Methods:
Java

AdministratorRolesApi.deleteAdministratorRole([param1, param2, ...])

Python

AdministratorRolesApi.delete_administrator_role([param1, param2, ...])

JavaScript

AdministratorRolesApi.deleteAdministratorRole([param1, param2, ...])

SecurityTrend_Micro_Cloud_One_API_Key or Legacy_API_Key
Request
path Parameters
roleID
required
integer <int32> \d+

The ID number of the administrator role to delete.

Example: 1
header Parameters
api-version
required
string

The version of the api being called.

Example: YOUR VERSION
Responses
200

Request is successful.

403

Not authorized to delete administrator roles.

Request samples
import com.trendmicro.deepsecurity.ApiClient;
import com.trendmicro.deepsecurity.Configuration;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.ApiException;
import com.trendmicro.deepsecurity.api.AdministratorRolesApi;


public class DeleteAdministratorRoleExample {
	
	public static void main(String[] args) {
		// Setup
		ApiClient defaultClient = Configuration.getDefaultApiClient();
		defaultClient.setBasePath("YOUR HOST");

		// Authentication
		ApiKeyAuth Legacy API Key = (ApiKeyAuth) defaultClient.getAuthentication("Legacy API Key");
		Legacy API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		ApiKeyAuth Trend Micro Cloud One API Key = (ApiKeyAuth) defaultClient.getAuthentication("Trend Micro Cloud One API Key");
		Trend Micro Cloud One API Key.setApiKey("YOUR API KEY");
		try {
			defaultClient.trustAllCertificates(false);
		} catch (Exception e) {
			System.err.println("An exception occurred when calling ApiClient.trustAllCertificates");
			e.printStackTrace();
		}
		
		// Initialization
		// Set Any Required Values
		AdministratorRolesApi instance = new AdministratorRolesApi();
		Integer roleID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			instance.deleteAdministratorRole(roleID, apiVersion);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling AdministratorRolesApi.deleteAdministratorRole");
			e.printStackTrace();
		}
	}
}