Tenants

List Tenants

get/tenants

Lists all tenants.

Related SDK Methods:
Java

TenantsApi.listTenants([param1, param2, ...])

Python

TenantsApi.list_tenants([param1, param2, ...])

JavaScript

TenantsApi.listTenants([param1, param2, ...])

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 tenants.

Request samples
import com.trendmicro.deepsecurity.ApiClient;
import com.trendmicro.deepsecurity.Configuration;
import com.trendmicro.deepsecurity.auth.ApiKeyAuth;
import com.trendmicro.deepsecurity.ApiException;
import com.trendmicro.deepsecurity.api.TenantsApi;
import com.trendmicro.deepsecurity.model.Tenants;


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

		// Authentication
		ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication");
		DefaultAuthentication.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
		TenantsApi instance = new TenantsApi();
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Tenants result = instance.listTenants(apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling TenantsApi.listTenants");
			e.printStackTrace();
		}
	}
}

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

Create a Tenant

post/tenants

Create a new tenant.

Related SDK Methods:
Java

TenantsApi.createTenant([param1, param2, ...])

Python

TenantsApi.create_tenant([param1, param2, ...])

JavaScript

TenantsApi.createTenant([param1, param2, ...])

Request
query Parameters
asynchronous
boolean
Default: false

Indicates whether it's an asynchronous call. Default value is false.

bypassTenantCache
boolean
Default: false

Indicates whether to bypass the tenant cache or not. Default value is false.

confirmationRequired
boolean
Default: true

Indicates whether a confirmation email is required or not. Default value is true.

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 tenant.

activationCodes
Array of strings

List of comma-delimited activation codes for the protection modules.

object (administrator)

Administrator details. An Administrator object represents a Deep Security user.

databaseServerID
integer <int64>

ID of the tenant database server. Searchable as Numeric.

demoMode
boolean

Populates the Deep Security Manager database with simulated computers, events, alerts and other data. Useful for testing environments. Set to true to enable. Searchable as Boolean.

description
string

Description of the tenant. Searchable as String.

guid
string
hideUnlicensedModules
boolean

Controls whether unlicensed protection modules appear in the Deep Security Manager for tenants. Set to true to hide all unlicensed protection modules. Searchable as Boolean.

lastSigninTime
integer <int64>

Timestamp indicates the last time any tenant user signed in, in milliseconds since epoch. Searchable as Date.

locale
string

Locale of the tenant. Determines the language of the Deep Security Manager user interface.

Enum: "en-US" "ja-JP"
modulesVisible
Array of strings

Protection modules shown within the Deep Security Manager. All modules are visible by default.

Items Enum: "all" "anti-malware" "web-reputation" "firewall" "intrusion-prevention" "integrity-monitoring" "log-inspection" "application-control" "SAP"
name
string

Display name of the tenant. Searchable as String.

tenantState
string

State of the tenant. Searchable as Choice.

Enum: "undefined" "created" "active" "suspended" "pending-deletion" "db-upgrade-failure" "confirmation-required" "cache-requires-initialization" "cache-initializing" "cache-ready-for-use" "cache-activating"
timeZone
string

Time zone ID of the tenant (for example: "America/New_York"). Searchable as String.

Responses
200

successful operation

403

Not authorized to create tenants.

Request samples
application/json
{
  • "databaseServerID": 0,
  • "name": "string",
  • "description": "string",
  • "timeZone": "string",
  • "locale": "en-US",
  • "demoMode": true,
  • "modulesVisible": [
    ],
  • "hideUnlicensedModules": true,
  • "lastSigninTime": 0,
  • "tenantState": "undefined",
  • "activationCodes": [
    ],
  • "administrator": {
    },
  • "guid": "string"
}
Response samples
application/json
{
  • "databaseServerID": 0,
  • "name": "string",
  • "description": "string",
  • "agentInitiatedActivationPassword": "string",
  • "timeZone": "string",
  • "locale": "en-US",
  • "demoMode": true,
  • "modulesVisible": [
    ],
  • "hideUnlicensedModules": true,
  • "lastSigninTime": 0,
  • "tenantState": "undefined",
  • "activationCodes": [
    ],
  • "administrator": {
    },
  • "primaryContacts": [
    ],
  • "guid": "string",
  • "ID": 0
}

Search Tenants

post/tenants/search

Search for tenants using optional filters.

Related SDK Methods:
Java

TenantsApi.searchTenants([param1, param2, ...])

Python

TenantsApi.search_tenants([param1, param2, ...])

JavaScript

TenantsApi.searchTenants([param1, param2, ...])

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 tenants.

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

Describe a Tenant

get/tenants/{tenantID}

Describe a tenant by ID.

Related SDK Methods:
Java

TenantsApi.describeTenant([param1, param2, ...])

Python

TenantsApi.describe_tenant([param1, param2, ...])

JavaScript

TenantsApi.describeTenant([param1, param2, ...])

Request
path Parameters
tenantID
required
integer <int32> \d+

The ID number of the tenant 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 tenants.

404

The tenant 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.ApiException;
import com.trendmicro.deepsecurity.api.TenantsApi;
import com.trendmicro.deepsecurity.model.Tenant;


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

		// Authentication
		ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication");
		DefaultAuthentication.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
		TenantsApi instance = new TenantsApi();
		Integer tenantID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			Tenant result = instance.describeTenant(tenantID, apiVersion);
			System.out.println(result);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling TenantsApi.describeTenant");
			e.printStackTrace();
		}
	}
}

Response samples
application/json
{
  • "databaseServerID": 0,
  • "name": "string",
  • "description": "string",
  • "agentInitiatedActivationPassword": "string",
  • "timeZone": "string",
  • "locale": "en-US",
  • "demoMode": true,
  • "modulesVisible": [
    ],
  • "hideUnlicensedModules": true,
  • "lastSigninTime": 0,
  • "tenantState": "undefined",
  • "activationCodes": [
    ],
  • "administrator": {
    },
  • "primaryContacts": [
    ],
  • "guid": "string",
  • "ID": 0
}

Modify a Tenant

post/tenants/{tenantID}

Modify a tenant by ID.

Related SDK Methods:
Java

TenantsApi.modifyTenant([param1, param2, ...])

Python

TenantsApi.modify_tenant([param1, param2, ...])

JavaScript

TenantsApi.modifyTenant([param1, param2, ...])

Request
path Parameters
tenantID
required
integer <int32> \d+

The ID number of the tenant 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 tenant to modify.

activationCodes
Array of strings

List of comma-delimited activation codes for the protection modules.

object (administrator)

Administrator details. An Administrator object represents a Deep Security user.

databaseServerID
integer <int64>

ID of the tenant database server. Searchable as Numeric.

demoMode
boolean

Populates the Deep Security Manager database with simulated computers, events, alerts and other data. Useful for testing environments. Set to true to enable. Searchable as Boolean.

description
string

Description of the tenant. Searchable as String.

guid
string
hideUnlicensedModules
boolean

Controls whether unlicensed protection modules appear in the Deep Security Manager for tenants. Set to true to hide all unlicensed protection modules. Searchable as Boolean.

lastSigninTime
integer <int64>

Timestamp indicates the last time any tenant user signed in, in milliseconds since epoch. Searchable as Date.

locale
string

Locale of the tenant. Determines the language of the Deep Security Manager user interface.

Enum: "en-US" "ja-JP"
modulesVisible
Array of strings

Protection modules shown within the Deep Security Manager. All modules are visible by default.

Items Enum: "all" "anti-malware" "web-reputation" "firewall" "intrusion-prevention" "integrity-monitoring" "log-inspection" "application-control" "SAP"
name
string

Display name of the tenant. Searchable as String.

tenantState
string

State of the tenant. Searchable as Choice.

Enum: "undefined" "created" "active" "suspended" "pending-deletion" "db-upgrade-failure" "confirmation-required" "cache-requires-initialization" "cache-initializing" "cache-ready-for-use" "cache-activating"
timeZone
string

Time zone ID of the tenant (for example: "America/New_York"). Searchable as String.

Responses
200

successful operation

403

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

404

The tenant does not exist or is not visible.

Request samples
application/json
{
  • "databaseServerID": 0,
  • "name": "string",
  • "description": "string",
  • "timeZone": "string",
  • "locale": "en-US",
  • "demoMode": true,
  • "modulesVisible": [
    ],
  • "hideUnlicensedModules": true,
  • "lastSigninTime": 0,
  • "tenantState": "undefined",
  • "activationCodes": [
    ],
  • "administrator": {
    },
  • "guid": "string"
}
Response samples
application/json
{
  • "databaseServerID": 0,
  • "name": "string",
  • "description": "string",
  • "agentInitiatedActivationPassword": "string",
  • "timeZone": "string",
  • "locale": "en-US",
  • "demoMode": true,
  • "modulesVisible": [
    ],
  • "hideUnlicensedModules": true,
  • "lastSigninTime": 0,
  • "tenantState": "undefined",
  • "activationCodes": [
    ],
  • "administrator": {
    },
  • "primaryContacts": [
    ],
  • "guid": "string",
  • "ID": 0
}

Delete a Tenant

delete/tenants/{tenantID}

Delete a tenant by ID.

Related SDK Methods:
Java

TenantsApi.deleteTenant([param1, param2, ...])

Python

TenantsApi.delete_tenant([param1, param2, ...])

JavaScript

TenantsApi.deleteTenant([param1, param2, ...])

Request
path Parameters
tenantID
required
integer <int32> \d+

The ID number of the tenant 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 tenants.

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


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

		// Authentication
		ApiKeyAuth DefaultAuthentication = (ApiKeyAuth) defaultClient.getAuthentication("DefaultAuthentication");
		DefaultAuthentication.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
		TenantsApi instance = new TenantsApi();
		Integer tenantID = 1;
		String apiVersion = "YOUR VERSION";
		try {
			// Please replace the parameter values with yours
			instance.deleteTenant(tenantID, apiVersion);
		} catch (ApiException e) {
			System.err.println("An exception occurred when calling TenantsApi.deleteTenant");
			e.printStackTrace();
		}
	}
}

Generate an API Key for the Tenant

post/tenants/{tenantID}/apikeys

Generate a new API key for a tenant from the primary account.

Related SDK Methods:
Java

TenantsApi.generateTenantApiSecretKey([param1, param2, ...])

Python

TenantsApi.generate_tenant_api_secret_key([param1, param2, ...])

JavaScript

TenantsApi.generateTenantApiSecretKey([param1, param2, ...])

Request
path Parameters
tenantID
required
integer <int32> \d+

The ID number of the tenant the key is being generated for.

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 new API key.

active
boolean

If true, the APIKey can be used to authenticate. If false, the APIKey is locked out. Searchable as Boolean.

created
integer <int64>

Timestamp of the APIKey's creation, in milliseconds since epoch. Searchable as Date.

description
string

Description of the APIKey. Searchable as String.

expiryDate
integer <int64>

Timestamp of the APIKey's expiry date, in milliseconds since epoch. Searchable as Date.

keyName
string

Display name of the APIKey. Searchable as String.

lastSignIn
integer <int64>

Timestamp of the APIKey's last successful authentication, in milliseconds since epoch. Searchable as Date.

locale
string

Country and language for the APIKey.

Enum: "en-US" "ja-JP"
roleID
integer <int32>

ID of the role assigned to the APIKey. Searchable as Numeric.

timeZone
string

Display name of the APIKey's time zone, e.g. America/New_York. Searchable as String.

unlockTime
integer <int64>

Timestamp of when a locked out APIKey will be unlocked, in milliseconds since epoch. Searchable as Date.

unsuccessfulSignInAttempts
integer <int32>

Number of unsuccessful authentication attempts made since the last successful authentication. Searchable as Numeric.

Responses
200

successful operation

403

Not authorized to generate API secret keys.

404

The API key does not exist.

Request samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0
}
Response samples
application/json
{
  • "keyName": "string",
  • "description": "string",
  • "locale": "en-US",
  • "roleID": 0,
  • "timeZone": "string",
  • "active": true,
  • "created": 0,
  • "lastSignIn": 0,
  • "unlockTime": 0,
  • "unsuccessfulSignInAttempts": 0,
  • "expiryDate": 0,
  • "secretKey": "string",
  • "serviceAccount": true,
  • "ID": 0
}