Salesforce

Java API client for AI Processing

« Go Back
Information
Java API client for AI Processing
000004299
Public
Product Selection
aiWare - aiWare
Article Details

AI Processing API

  • API version: 3.44.2.5540

This is the API client for the AI Processing API.

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.veritone.aiware.edge</groupId>
  <artifactId>aiware-client-java</artifactId>
  <version>3.44.2.5540</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "com.veritone.aiware.edge:aiware-client-java:3.44.2.5540"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/aiware-client-java-3.44.2.5540.jar
  • target/lib/*.jar

Getting started

Follow the installation instruction and execute the following Java code:

// Import classes:
import com.veritone.aiware.ApiClient;
import com.veritone.aiware.ApiException;
import com.veritone.aiware.Configuration;
import com.veritone.aiware.auth.*;
import com.veritone.aiware.models.*;
import com.veritone.aiware.edge.AdminApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.aiware.com/edge/v1");
    
    // 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(defaultClient);
    UUID resourceID = new UUID(); // UUID | ID of Resource
    String xCorrelationId = "xCorrelationId_example"; // String | Correlation Id that can be passed, traced in the server and will be returned in the response if present in the request
    AddEngineForResourceRequest addEngineForResourceRequest = new AddEngineForResourceRequest(); // AddEngineForResourceRequest | Add Engine Mapping for Resource
    try {
      AddEngineForResourceResponse result = apiInstance.addEngineToResource(resourceID, xCorrelationId, addEngineForResourceRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AdminApi#addEngineToResource");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API endpoints

Documentation for models

Documentation for authorization

Authentication schemes defined for the API:

api_key

  • Type: API key
  • API key parameter name: api_key
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Additional Technical Documentation Information
Properties
4/24/2025 5:56 PM
4/24/2025 5:57 PM
4/24/2025 5:57 PM
Documentation
Documentation
000004299
Translation Information
English

Powered by