Describe a context by ID.
ContextsApi.describeContext([param1, param2, ...])
ContextsApi.describe_context([param1, param2, ...])
ContextsApi.describeContext([param1, param2, ...])
successful operation
Not authorized to view contexts.
The context does not exist.
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.ContextsApi; import com.trendmicro.deepsecurity.model.Context; public class DescribeContextExample { 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 ContextsApi instance = new ContextsApi(); Integer contextID = 1; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours Context result = instance.describeContext(contextID, apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ContextsApi.describeContext"); e.printStackTrace(); } } }
{- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true,
- "ID": 0
}
Modify a context by ID.
ContextsApi.modifyContext([param1, param2, ...])
ContextsApi.modify_context([param1, param2, ...])
ContextsApi.modifyContext([param1, param2, ...])
The settings of the context to modify.
successful operation
Not authorized to modify contexts or the requested modification is not permitted.
The context does not exist.
{- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true
}
{- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true,
- "ID": 0
}
Delete a context by ID.
ContextsApi.deleteContext([param1, param2, ...])
ContextsApi.delete_context([param1, param2, ...])
ContextsApi.deleteContext([param1, param2, ...])
Request is successful.
Not authorized to delete contexts.
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.ContextsApi; public class DeleteContextExample { 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 ContextsApi instance = new ContextsApi(); Integer contextID = 1; String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours instance.deleteContext(contextID, apiVersion); } catch (ApiException e) { System.err.println("An exception occurred when calling ContextsApi.deleteContext"); e.printStackTrace(); } } }
Lists all contexts.
ContextsApi.listContexts([param1, param2, ...])
ContextsApi.list_contexts([param1, param2, ...])
ContextsApi.listContexts([param1, param2, ...])
successful operation
Not authorized to view contexts.
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.ContextsApi; import com.trendmicro.deepsecurity.model.Contexts; public class ListContextsExample { 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 ContextsApi instance = new ContextsApi(); String apiVersion = "YOUR VERSION"; try { // Please replace the parameter values with yours Contexts result = instance.listContexts(apiVersion); System.out.println(result); } catch (ApiException e) { System.err.println("An exception occurred when calling ContextsApi.listContexts"); e.printStackTrace(); } } }
{- "contexts": [
- {
- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true,
- "ID": 0
}
]
}
Create a new context.
ContextsApi.createContext([param1, param2, ...])
ContextsApi.create_context([param1, param2, ...])
ContextsApi.createContext([param1, param2, ...])
The settings of the new context.
successful operation
Not authorized to create contexts.
{- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true
}
{- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true,
- "ID": 0
}
Search for contexts using optional filters.
ContextsApi.searchContexts([param1, param2, ...])
ContextsApi.search_contexts([param1, param2, ...])
ContextsApi.searchContexts([param1, param2, ...])
A collection of options used to filter the search results.
successful operation
Not authorized to view contexts.
{- "maxItems": 0,
- "searchCriteria": [
- {
- "fieldName": "string",
- "booleanTest": true,
- "numericTest": "less-than",
- "numericValue": 0,
- "stringTest": "equal",
- "stringValue": "string",
- "stringWildcards": true,
- "choiceTest": "equal",
- "choiceValue": "string",
- "firstDateValue": 0,
- "firstDateInclusive": true,
- "lastDateValue": 0,
- "lastDateInclusive": true,
- "nullTest": true,
- "idValue": 0,
- "idTest": "less-than"
}
], - "sortByObjectID": true
}
{- "contexts": [
- {
- "name": "string",
- "description": "string",
- "minimumAgentVersion": "string",
- "localConnectionsEnabled": true,
- "remoteConnectionsEnabled": true,
- "noConnectionEnabled": true,
- "noInternetEnabled": true,
- "restrictedInterfacesEnabled": true,
- "ID": 0
}
]
}