All URIs are relative to https://v2.namsor.com/NamSorAPIv2
Method | HTTP request | Description |
---|---|---|
anonymize | GET /api2/json/anonymize/{source}/{anonymized}/{token} | Activate/deactivate anonymization for a source. |
api_key_info | GET /api2/json/apiKeyInfo | Read API Key info. |
api_status | GET /api2/json/apiStatus | Prints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices. |
api_usage | GET /api2/json/apiUsage | Print current API usage. |
api_usage_history | GET /api2/json/apiUsageHistory | Print historical API usage. |
api_usage_history_aggregate | GET /api2/json/apiUsageHistoryAggregate | Print historical API usage (in an aggregated view, by service, by day/hour/min). |
available_services | 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. |
learnable | GET /api2/json/learnable/{source}/{learnable}/{token} | Activate/deactivate learning from a source. |
regions | GET /api2/json/regions | Print basic source statistics. |
software_version | GET /api2/json/softwareVersion | Get the current software version |
taxonomy_classes | GET /api2/json/taxonomyClasses/{classifierName} | Print the taxonomy classes valid for the given classifier. |
APIKeyOut anonymize(source, anonymized, token)
Activate/deactivate anonymization for a source.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
source = 'source_example' # str |
anonymized = True # bool |
token = 'token_example' # str |
try:
# Activate/deactivate anonymization for a source.
api_response = api_instance.anonymize(source, anonymized, token)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->anonymize: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
source | str | ||
anonymized | bool | ||
token | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIKeyOut api_key_info()
Read API Key info.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Read API Key info.
api_response = api_instance.api_key_info()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->api_key_info: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIClassifiersStatusOut api_status()
Prints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Prints the current status of the classifiers. A classifier name in apiStatus corresponds to a service name in apiServices.
api_response = api_instance.api_status()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->api_status: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIPeriodUsageOut api_usage()
Print current API usage.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Print current API usage.
api_response = api_instance.api_usage()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->api_usage: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIUsageHistoryOut api_usage_history()
Print historical API usage.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Print historical API usage.
api_response = api_instance.api_usage_history()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->api_usage_history: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIUsageAggregatedOut api_usage_history_aggregate()
Print historical API usage (in an aggregated view, by service, by day/hour/min).
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Print historical API usage (in an aggregated view, by service, by day/hour/min).
api_response = api_instance.api_usage_history_aggregate()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->api_usage_history_aggregate: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIServicesOut available_services()
List of classification services and usage cost in Units per classification (default is 1=ONE Unit). Some API endpoints (ex. Corridor) combine multiple classifiers.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# List of classification services and usage cost in Units per classification (default is 1=ONE Unit). Some API endpoints (ex. Corridor) combine multiple classifiers.
api_response = api_instance.available_services()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->available_services: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIKeyOut learnable(source, learnable, token)
Activate/deactivate learning from a source.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
source = 'source_example' # str | The API Key to set as learnable/non learnable.
learnable = True # bool |
token = 'token_example' # str |
try:
# Activate/deactivate learning from a source.
api_response = api_instance.learnable(source, learnable, token)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->learnable: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
source | str | The API Key to set as learnable/non learnable. | |
learnable | bool | ||
token | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RegionOut regions()
Print basic source statistics.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Print basic source statistics.
api_response = api_instance.regions()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->regions: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SoftwareVersionOut software_version()
Get the current software version
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
try:
# Get the current software version
api_response = api_instance.software_version()
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->software_version: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIClassifierTaxonomyOut taxonomy_classes(classifier_name)
Print the taxonomy classes valid for the given classifier.
- Api Key Authentication (api_key):
from __future__ import print_function
import time
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Configure API key authorization: api_key
configuration = openapi_client.Configuration()
configuration.api_key['X-API-KEY'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-API-KEY'] = 'Bearer'
# create an instance of the API class
api_instance = openapi_client.AdminApi(openapi_client.ApiClient(configuration))
classifier_name = 'classifier_name_example' # str |
try:
# Print the taxonomy classes valid for the given classifier.
api_response = api_instance.taxonomy_classes(classifier_name)
pprint(api_response)
except ApiException as e:
print("Exception when calling AdminApi->taxonomy_classes: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
classifier_name | str |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]