data engineering apis

Using HttpClient in Java to Invoke Interzoid APIs

by Interzoid Team


Posted on August 31st, 2021


Using HttpClient in Java

In Java 11, a standardized HTTPClient was introduced enabling the sending of requests into the Cloud and the retrieval of responses.

Here is a quick basic example of usage (putting the API license key in the header):

                
      // create the request with the API end point and parameters
      HttpRequest request = HttpRequest.newBuilder()
           .uri(URI.create("https://api.interzoid.com/getcompanymatchadvanced?company=
                    IBM&algorithm=wide"))
           .header("content-type", "application/json")
           .header("x-api-key", "YOURAPIKEY")
           .method("GET", HttpRequest.BodyPublishers.noBody())
           .build();

      // make the request and receive the response
      response = HttpClient.newHttpClient().send(request,
                    HttpResponse.BodyHandlers.ofString());

      // print the response to the console
      System.out.println(response.body());
                

In this particular example, we are generating a similarity key for an organization name. This enables us to locate (through sorting, for example) other organization names that are similar, such as this:

Table of inconsistent company names and similarity key generation for data matching and standardization API

Identifying redundant organization names can be crucial in customer, vendor, or prospect databases. Additionally, this same technique can help us match company records across different data sources.

For the full working source code, visit here on Github.

For more information about the Company Name Matching API, visit here.

Getting Started with Interzoid
Three ways to achieve better, more usable, and higher value data with Interzoid
More...
Connect Directly to Cloud SQL Databases and Perform Data Quality Analysis
Achieve better, more consistent, more usable data
More...
Free Trial Credits
Register for an Interzoid API account and receive free trial credits. See how your strategic data assets can be improved.
Automate API Integration into Cloud Databases
Run live data quality exception and enhancement reports on major Cloud Data Platforms direct from your browser.
More...
Step-by-Step Tutorial for Data Matching
See quickly one example of how inconsistent data can be identified within databases and datasets with ease.
More...
Example API Usage Code on Github
Sample Code for invoking APIs on Interzoid in multiple programming languages
Business Case: Cloud APIs and Cloud Databases
See the business case for API-driven data enhancement - directly within your important datasets
More...
Documentation and Overview
See our documentation site.
More...
Product Newsletter
Receive Interzoid product and technology updates.
More...

All content (c) 2018-2023 Interzoid Incorporated. Questions? Contact support@interzoid.com

201 Spear Street, Suite 1100, San Francisco, CA 94105-6164

Interested in Data Cleansing Services?
Let us put our Machine Learning-based processes and data tools to work for you.

Start Here
Terms of Service
Privacy Policy

Use the Interzoid Cloud Connect Data Platform and Start to Supercharge your Cloud Data now.
Connect to your data and start running data analysis reports in minutes: connect.interzoid.com
API Integration Examples and SDKs: github.com/interzoid
Documentation and Overview: Docs site
Interzoid Product and Technology Newsletter: Subscribe