All URIs are relative to https://v2.namsor.com/NamSorAPIv2
Method | HTTP request | Description |
---|---|---|
anonymize | GET /api2/json/anonymize/{source}/{anonymized} | Activate/deactivate anonymization for a source. |
anonymize1 | GET /api2/json/anonymize/{source}/{anonymized}/{token} | Activate/deactivate anonymization for a source. |
apiKeyInfo | GET /api2/json/apiKeyInfo | Read API Key info. |
apiStatus | GET /api2/json/apiStatus | Prints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices. |
apiUsage | GET /api2/json/apiUsage | Print current API usage. |
apiUsageHistory | GET /api2/json/apiUsageHistory | Print historical API usage. |
apiUsageHistoryAggregate | GET /api2/json/apiUsageHistoryAggregate | Print historical API usage (in an aggregated view, by service, by day/hour/min). |
availableServices | GET /api2/json/apiServices | List of classification services and usage cost in Units per classification (default is 1=ONE Unit). Some API endpoints (ex. Corridor) combine multiple classifiers. |
disable | GET /api2/json/disable/{source}/{disabled} | Activate/deactivate an API Key. |
learnable | GET /api2/json/learnable/{source}/{learnable}/{token} | Activate/deactivate learning from a source. |
learnable1 | GET /api2/json/learnable/{source}/{learnable} | Activate/deactivate learning from a source. |
regions | GET /api2/json/regions | Print basic source statistics. |
softwareVersion | GET /api2/json/softwareVersion | Get the current software version |
taxonomyClasses | GET /api2/json/taxonomyClasses/{classifierName} | Print the taxonomy classes valid for the given classifier. |
anonymize(source, anonymized)
Activate/deactivate anonymization for a source.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String source = "source_example"; // String |
Boolean anonymized = true; // Boolean |
try {
apiInstance.anonymize(source, anonymized);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#anonymize");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
source | String | ||
anonymized | Boolean |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
APIKeyOut anonymize1(source, anonymized, token)
Activate/deactivate anonymization for a source.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String source = "source_example"; // String |
Boolean anonymized = true; // Boolean |
String token = "token_example"; // String |
try {
APIKeyOut result = apiInstance.anonymize1(source, anonymized, token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#anonymize1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
source | String | ||
anonymized | Boolean | ||
token | String |
- Content-Type: Not defined
- Accept: application/json
APIKeyOut apiKeyInfo()
Read API Key info.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIKeyOut result = apiInstance.apiKeyInfo();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#apiKeyInfo");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIClassifiersStatusOut apiStatus()
Prints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIClassifiersStatusOut result = apiInstance.apiStatus();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#apiStatus");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIPeriodUsageOut apiUsage()
Print current API usage.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIPeriodUsageOut result = apiInstance.apiUsage();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#apiUsage");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIUsageHistoryOut apiUsageHistory()
Print historical API usage.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIUsageHistoryOut result = apiInstance.apiUsageHistory();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#apiUsageHistory");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIUsageAggregatedOut apiUsageHistoryAggregate()
Print historical API usage (in an aggregated view, by service, by day/hour/min).
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIUsageAggregatedOut result = apiInstance.apiUsageHistoryAggregate();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#apiUsageHistoryAggregate");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIServicesOut availableServices()
List of classification services and usage cost in Units per classification (default is 1=ONE Unit). Some API endpoints (ex. Corridor) combine multiple classifiers.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
APIServicesOut result = apiInstance.availableServices();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#availableServices");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
disable(source, disabled)
Activate/deactivate an API Key.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String source = "source_example"; // String | The API Key to set as enabled/disabled.
Boolean disabled = true; // Boolean |
try {
apiInstance.disable(source, disabled);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#disable");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
source | String | The API Key to set as enabled/disabled. | |
disabled | Boolean |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
APIKeyOut learnable(source, learnable, token)
Activate/deactivate learning from a source.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String source = "source_example"; // String | The API Key to set as learnable/non learnable.
Boolean learnable = true; // Boolean |
String token = "token_example"; // String |
try {
APIKeyOut result = apiInstance.learnable(source, learnable, token);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#learnable");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
source | String | The API Key to set as learnable/non learnable. | |
learnable | Boolean | ||
token | String |
- Content-Type: Not defined
- Accept: application/json
learnable1(source, learnable)
Activate/deactivate learning from a source.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String source = "source_example"; // String | The API Key to set as learnable/non learnable.
Boolean learnable = true; // Boolean |
try {
apiInstance.learnable1(source, learnable);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#learnable1");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
source | String | The API Key to set as learnable/non learnable. | |
learnable | Boolean |
null (empty response body)
- Content-Type: Not defined
- Accept: Not defined
RegionOut regions()
Print basic source statistics.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
RegionOut result = apiInstance.regions();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#regions");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
SoftwareVersionOut softwareVersion()
Get the current software version
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
try {
SoftwareVersionOut result = apiInstance.softwareVersion();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#softwareVersion");
e.printStackTrace();
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
APIClassifierTaxonomyOut taxonomyClasses(classifierName)
Print the taxonomy classes valid for the given classifier.
// Import classes:
//import com.namsor.sdk2.invoke.ApiClient;
//import com.namsor.sdk2.invoke.ApiException;
//import com.namsor.sdk2.invoke.Configuration;
//import com.namsor.sdk2.invoke.auth.*;
//import com.namsor.sdk2.api.AdminApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure API key authorization: api_key
ApiKeyAuth api_key = (ApiKeyAuth) defaultClient.getAuthentication("api_key");
api_key.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//api_key.setApiKeyPrefix("Token");
AdminApi apiInstance = new AdminApi();
String classifierName = "classifierName_example"; // String |
try {
APIClassifierTaxonomyOut result = apiInstance.taxonomyClasses(classifierName);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AdminApi#taxonomyClasses");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
classifierName | String |
- Content-Type: Not defined
- Accept: application/json