Skip to content

Latest commit

 

History

History
2133 lines (1583 loc) · 60 KB

AdminApi.md

File metadata and controls

2133 lines (1583 loc) · 60 KB

AdminApi

All URIs are relative to https://v2.namsor.com/NamSorAPIv2

Method HTTP request Description
addCredits GET /api2/json/addCredits/{apiKey}/{usageCredits}/{userMessage} Add usage credits to an API Key.
anonymize GET /api2/json/anonymize/{source}/{anonymized} Activate/deactivate anonymization for a source.
apiStatus GET /api2/json/apiStatus Prints the current status of the classifiers.
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).
availablePlans GET /api2/json/availablePlans List all available plans in the default currency (usd).
availablePlans1 GET /api2/json/availablePlans/{token} List all available plans in the user's preferred currency.
availableServices GET /api2/json/apiServices List of API services and usage cost in Units (default is 1=ONE Unit).
billingCurrencies GET /api2/json/billingCurrencies List possible currency options for billing (USD, EUR, GBP, ...)
billingHistory GET /api2/json/billingHistory/{token} Read the history billing information (invoices paid via Stripe or manually).
billingInfo GET /api2/json/billingInfo/{token} Read the billing information (company name, address, phone, vat ID)
charge POST /api2/json/charge Create a Stripe Customer, based on a payment card token (from secure StripeJS) and email.
corporateKey GET /api2/json/corporateKey/{apiKey}/{corporate} Setting an API Key to a corporate status.
debugLevel GET /api2/json/debugLevel/{logger}/{level} Update debug level for a classifier
flush GET /api2/json/flush Flush counters.
invalidateCache GET /api2/json/invalidateCache Invalidate system caches.
learnable GET /api2/json/learnable/{source}/{learnable} Activate/deactivate learning from a source.
namsorCounter GET /api2/json/namsorCounter Get the overall API counter
paymentInfo GET /api2/json/paymentInfo/{token} Get the Stripe payment information associated with the current google auth session token.
procureKey GET /api2/json/procureKey/{token} Procure an API Key (sent via Email), based on an auth token. Keep your API Key secret.
redeployUI GET /api2/json/redeployUI Redeploy UI from current dev branch.
redeployUI1 GET /api2/json/redeployUI/{live} Redeploy UI from current dev branch.
removeUserAccount GET /api2/json/removeUserAccount/{token} Remove the user account.
removeUserAccountOnBehalf GET /api2/json/removeUserAccountOnBehalf/{apiKey} Remove (on behalf) a user account.
shutdown GET /api2/json/shutdown Stop learning and shutdown system.
softwareVersion GET /api2/json/softwareVersion Get the current software version
sourceStats GET /api2/json/sourceStats/{source} Print basic source statistics.
stats GET /api2/json/stats Print basic system statistics.
stripeConnect GET /api2/json/stripeConnect Connects a Stripe Account.
subscribePlan GET /api2/json/subscribePlan/{planName}/{token} Subscribe to a give API plan, using the user's preferred or default currency.
subscribePlanOnBehalf GET /api2/json/subscribePlanOnBehalf/{planName}/{apiKey} Subscribe to a give API plan, using the user's preferred or default currency (admin only).
taxonomyClasses GET /api2/json/taxonomyClasses/{classifierName} Print the taxonomy classes valid for the given classifier.
updateBillingInfo POST /api2/json/updateBillingInfo/{token} Sets or update the billing information (company name, address, phone, vat ID)
updateLimit GET /api2/json/updateLimit/{usageLimit}/{hardOrSoft}/{token} Modifies the hard/soft limit on the API plan's overages (default is 0$ soft limit).
updatePaymentDefault GET /api2/json/updatePaymentDefault/{defautSourceId}/{token} Update the default Stripe card associated with the current google auth session token.
userInfo GET /api2/json/userInfo/{token} Get the user profile associated with the current google auth session token.
verifyEmail GET /api2/json/verifyEmail/{emailToken} Verifies an email, based on token sent to that email
verifyRemoveEmail GET /api2/json/verifyRemoveEmail/{emailToken} Verifies an email, based on token sent to that email
vet GET /api2/json/vetting/{source}/{vetted} Vetting of a source.

addCredits

SystemMetricsOut addCredits(apiKey, usageCredits, userMessage)

Add usage credits to an API Key.

Example

// 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 apiKey = "apiKey_example"; // String | 
Long usageCredits = 56L; // Long | 
String userMessage = "userMessage_example"; // String | 
try {
    SystemMetricsOut result = apiInstance.addCredits(apiKey, usageCredits, userMessage);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#addCredits");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiKey String
usageCredits Long
userMessage String

Return type

SystemMetricsOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

anonymize

anonymize(source, anonymized)

Activate/deactivate anonymization for a source.

Example

// 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();
}

Parameters

Name Type Description Notes
source String
anonymized Boolean

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

apiStatus

APIPlansOut apiStatus()

Prints the current status of the classifiers.

Example

// 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 {
    APIPlansOut result = apiInstance.apiStatus();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#apiStatus");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPlansOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

apiUsage

APIPeriodUsageOut apiUsage()

Print current API usage.

Example

// 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();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPeriodUsageOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

apiUsageHistory

APIPeriodUsageOut apiUsageHistory()

Print historical API usage.

Example

// 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.apiUsageHistory();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#apiUsageHistory");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPeriodUsageOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

apiUsageHistoryAggregate

APIPeriodUsageOut apiUsageHistoryAggregate()

Print historical API usage (in an aggregated view, by service, by day/hour/min).

Example

// 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.apiUsageHistoryAggregate();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#apiUsageHistoryAggregate");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPeriodUsageOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

availablePlans

APIPlansOut availablePlans()

List all available plans in the default currency (usd).

Example

// 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 {
    APIPlansOut result = apiInstance.availablePlans();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#availablePlans");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPlansOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

availablePlans1

APIPlansOut availablePlans1(token)

List all available plans in the user's preferred currency.

Example

// 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 token = "token_example"; // String | 
try {
    APIPlansOut result = apiInstance.availablePlans1(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#availablePlans1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

APIPlansOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

availableServices

APIPlansOut availableServices()

List of API services and usage cost in Units (default is 1=ONE Unit).

Example

// 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 {
    APIPlansOut result = apiInstance.availableServices();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#availableServices");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

APIPlansOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

billingCurrencies

CurrenciesOut billingCurrencies()

List possible currency options for billing (USD, EUR, GBP, ...)

Example

// 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 {
    CurrenciesOut result = apiInstance.billingCurrencies();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#billingCurrencies");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

CurrenciesOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

billingHistory

BillingHistoryOut billingHistory(token)

Read the history billing information (invoices paid via Stripe or manually).

Example

// 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 token = "token_example"; // String | 
try {
    BillingHistoryOut result = apiInstance.billingHistory(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#billingHistory");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

BillingHistoryOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

billingInfo

BillingInfoInOut billingInfo(token)

Read the billing information (company name, address, phone, vat ID)

Example

// 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 token = "token_example"; // String | 
try {
    BillingInfoInOut result = apiInstance.billingInfo(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#billingInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

BillingInfoInOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

charge

APIKeyOut charge(inlineObject)

Create a Stripe Customer, based on a payment card token (from secure StripeJS) and email.

Example

// 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();
InlineObject inlineObject = new InlineObject(); // InlineObject | 
try {
    APIKeyOut result = apiInstance.charge(inlineObject);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#charge");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
inlineObject InlineObject [optional]

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

corporateKey

corporateKey(apiKey, corporate)

Setting an API Key to a corporate status.

Example

// 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 apiKey = "apiKey_example"; // String | 
Boolean corporate = true; // Boolean | 
try {
    apiInstance.corporateKey(apiKey, corporate);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#corporateKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiKey String
corporate Boolean

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

debugLevel

debugLevel(logger, level)

Update debug level for a classifier

Example

// 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 logger = "logger_example"; // String | 
String level = "level_example"; // String | 
try {
    apiInstance.debugLevel(logger, level);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#debugLevel");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
logger String
level String

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

flush

flush()

Flush counters.

Example

// 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 {
    apiInstance.flush();
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#flush");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

invalidateCache

invalidateCache()

Invalidate system caches.

Example

// 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 {
    apiInstance.invalidateCache();
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#invalidateCache");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

learnable

learnable(source, learnable)

Activate/deactivate learning from a source.

Example

// 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 learnable = true; // Boolean | 
try {
    apiInstance.learnable(source, learnable);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#learnable");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
source String
learnable Boolean

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

namsorCounter

SoftwareVersionOut namsorCounter()

Get the overall API counter

Example

// 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.namsorCounter();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#namsorCounter");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

SoftwareVersionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

paymentInfo

APIKeyOut paymentInfo(token)

Get the Stripe payment information associated with the current google auth session token.

Example

// 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 token = "token_example"; // String | 
try {
    APIKeyOut result = apiInstance.paymentInfo(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#paymentInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

procureKey

APIKeyOut procureKey(token)

Procure an API Key (sent via Email), based on an auth token. Keep your API Key secret.

Example

// 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 token = "token_example"; // String | 
try {
    APIKeyOut result = apiInstance.procureKey(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#procureKey");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

redeployUI

redeployUI()

Redeploy UI from current dev branch.

Example

// 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 {
    apiInstance.redeployUI();
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#redeployUI");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

redeployUI1

redeployUI1(live)

Redeploy UI from current dev branch.

Example

// 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();
Boolean live = true; // Boolean | 
try {
    apiInstance.redeployUI1(live);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#redeployUI1");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
live Boolean

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

removeUserAccount

APIPlanSubscriptionOut removeUserAccount(token)

Remove the user account.

Example

// 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 token = "token_example"; // String | 
try {
    APIPlanSubscriptionOut result = apiInstance.removeUserAccount(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#removeUserAccount");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

APIPlanSubscriptionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

removeUserAccountOnBehalf

APIPlanSubscriptionOut removeUserAccountOnBehalf(apiKey)

Remove (on behalf) a user account.

Example

// 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 apiKey = "apiKey_example"; // String | 
try {
    APIPlanSubscriptionOut result = apiInstance.removeUserAccountOnBehalf(apiKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#removeUserAccountOnBehalf");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
apiKey String

Return type

APIPlanSubscriptionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

shutdown

shutdown()

Stop learning and shutdown system.

Example

// 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 {
    apiInstance.shutdown();
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#shutdown");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

softwareVersion

SoftwareVersionOut softwareVersion()

Get the current software version

Example

// 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();
}

Parameters

This endpoint does not need any parameter.

Return type

SoftwareVersionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

sourceStats

SystemMetricsOut sourceStats(source)

Print basic source statistics.

Example

// 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 | 
try {
    SystemMetricsOut result = apiInstance.sourceStats(source);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#sourceStats");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
source String

Return type

SystemMetricsOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

stats

SystemMetricsOut stats()

Print basic system statistics.

Example

// 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 {
    SystemMetricsOut result = apiInstance.stats();
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#stats");
    e.printStackTrace();
}

Parameters

This endpoint does not need any parameter.

Return type

SystemMetricsOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

stripeConnect

stripeConnect(scope, code, error, errorDescription)

Connects a Stripe Account.

Example

// 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 scope = "scope_example"; // String | 
String code = "code_example"; // String | 
String error = "error_example"; // String | 
String errorDescription = "errorDescription_example"; // String | 
try {
    apiInstance.stripeConnect(scope, code, error, errorDescription);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#stripeConnect");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
scope String [optional]
code String [optional]
error String [optional]
errorDescription String [optional]

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

subscribePlan

APIPlanSubscriptionOut subscribePlan(planName, token)

Subscribe to a give API plan, using the user's preferred or default currency.

Example

// 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 planName = "planName_example"; // String | 
String token = "token_example"; // String | 
try {
    APIPlanSubscriptionOut result = apiInstance.subscribePlan(planName, token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#subscribePlan");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
planName String
token String

Return type

APIPlanSubscriptionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

subscribePlanOnBehalf

APIPlanSubscriptionOut subscribePlanOnBehalf(planName, apiKey)

Subscribe to a give API plan, using the user's preferred or default currency (admin only).

Example

// 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 planName = "planName_example"; // String | 
String apiKey = "apiKey_example"; // String | 
try {
    APIPlanSubscriptionOut result = apiInstance.subscribePlanOnBehalf(planName, apiKey);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#subscribePlanOnBehalf");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
planName String
apiKey String

Return type

APIPlanSubscriptionOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

taxonomyClasses

APIPlansOut taxonomyClasses(classifierName)

Print the taxonomy classes valid for the given classifier.

Example

// 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 {
    APIPlansOut result = apiInstance.taxonomyClasses(classifierName);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#taxonomyClasses");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
classifierName String

Return type

APIPlansOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateBillingInfo

BillingInfoInOut updateBillingInfo(token, billingInfoInOut)

Sets or update the billing information (company name, address, phone, vat ID)

Example

// 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 token = "token_example"; // String | 
BillingInfoInOut billingInfoInOut = new BillingInfoInOut(); // BillingInfoInOut | 
try {
    BillingInfoInOut result = apiInstance.updateBillingInfo(token, billingInfoInOut);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#updateBillingInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String
billingInfoInOut BillingInfoInOut [optional]

Return type

BillingInfoInOut

Authorization

api_key

HTTP request headers

  • Content-Type: application/json;charset=UTF-8
  • Accept: application/json

updateLimit

APIPeriodUsageOut updateLimit(usageLimit, hardOrSoft, token)

Modifies the hard/soft limit on the API plan's overages (default is 0$ soft limit).

Example

// 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();
Integer usageLimit = 56; // Integer | 
Boolean hardOrSoft = true; // Boolean | 
String token = "token_example"; // String | 
try {
    APIPeriodUsageOut result = apiInstance.updateLimit(usageLimit, hardOrSoft, token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#updateLimit");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
usageLimit Integer
hardOrSoft Boolean
token String

Return type

APIPeriodUsageOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updatePaymentDefault

APIKeyOut updatePaymentDefault(defautSourceId, token)

Update the default Stripe card associated with the current google auth session token.

Example

// 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 defautSourceId = "defautSourceId_example"; // String | 
String token = "token_example"; // String | 
try {
    APIKeyOut result = apiInstance.updatePaymentDefault(defautSourceId, token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#updatePaymentDefault");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
defautSourceId String
token String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

userInfo

APIKeyOut userInfo(token)

Get the user profile associated with the current google auth session token.

Example

// 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 token = "token_example"; // String | 
try {
    APIKeyOut result = apiInstance.userInfo(token);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#userInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
token String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

verifyEmail

APIKeyOut verifyEmail(emailToken)

Verifies an email, based on token sent to that email

Example

// 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 emailToken = "emailToken_example"; // String | 
try {
    APIKeyOut result = apiInstance.verifyEmail(emailToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#verifyEmail");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailToken String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

verifyRemoveEmail

APIKeyOut verifyRemoveEmail(emailToken)

Verifies an email, based on token sent to that email

Example

// 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 emailToken = "emailToken_example"; // String | 
try {
    APIKeyOut result = apiInstance.verifyRemoveEmail(emailToken);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#verifyRemoveEmail");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
emailToken String

Return type

APIKeyOut

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

vet

vet(source, vetted)

Vetting of a source.

Example

// 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 vetted = true; // Boolean | 
try {
    apiInstance.vet(source, vetted);
} catch (ApiException e) {
    System.err.println("Exception when calling AdminApi#vet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
source String
vetted Boolean

Return type

null (empty response body)

Authorization

api_key

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined