Search

Using API’s to access exposed Endpoints

Overview

After developing a great machine learning model, tuning its parameters, and testing its performance, you want to be able to access it with a custom application that you are building. This tutorial will guide you to exposing and using an endpoint.


Components

Requirements

  • Access to an Infor CloudSuite
  • Infor AI Security Roles:
    • COLEMANAI-User
    • COLEMANAI-Administrator
  • User privileges to ION workflow
  • OAUTH2 security protocols
  • An Infor AI quest with deployed endpoint
  • Optional InforU courses:
    • Infor OS: Foundation for Multi-Tenant – Part 1
    • Infor OS: Foundation for Multi-Tenant – Part 2
    • Infor OS: Configuring ION Connect

Tutorial

1. Test your endpoint

Verify that your model is active and working as expected by testing a sample call to the endpoint. Navigate to the endpoints section of Infor AI and click on your deployed endpoint. A green status message reading active is your first sign that things are ready, and feeding it a JSON message or a file can confirm its behaviors.

2. Navigate to API Gateway

Enter the API gateway section of Infor OS, and in the list of available API’s, find Infor AI platform. This is an Infor Provisioned API endpoint and will not require you to add or configure an API in the gateway. Enter the Infor AI API tile.

3. Base URL

Understating the base URL is important to making the API calls and can be found in two different ways. The base url can be copied from the Infor AI Platform screen once you first enter the Infor AI API tile. It can be copied directly from this screen at the end of the endpoint. It should reflect the name of your tenant.

The documentation of the endpoint will contain the base URL, as well as the HTTP verbs and path for each resource. When building the request url, be sure to replace {endpoint} with the name of the saved endpoint in step 1.

4. Try it out

Open the request verb that you’d like to try and select the try it out button. Enter the name of the endpoint, and the data for the query. Here you can see the same endpoint query as the test in step 1 being executed in the API gateway, and the API call response below it along with the request URL.

Also detailed in this section is the possible response codes and what they mean. For example, if you passed an endpoint data in a format it wasn’t expecting, you would get a 400 error response.

The combination of the request URL and the request verbs are all that is needed to make the appropriate call from a third-party piece of software.