GeneXus SDK for SAP Leonardo: Importing a ML service

Official Content

To import a SAP Leonardo Machine Learning Foundation service(API), you have to go to the SAP API Business Hub

 

SAPAPIBusinessHubLeonardo_png

 

There select the API you want to incorporate to your Knowledge Base. In this example, the Inference Service for Language Detection will be used.

Once Selected go to the Details Tab and select Download Specification.

DetailsDownloadSpecification_png

 

When selected Download Specification two file options will be displayed JSON or YAML, both options are valid, in this example, YAML file will be used.

image_20181227152530_1_png

After the file finished downloading go to the Knowledge Base you want to integrate the API.

On GeneXus go to Tools->Application Integration-> OpenAPI Import.

ToolsAppIntOpenAPIImp_png

This will open the following window where you need to input the File path of the YAML downloaded. You can use the three dots button (…) to open the windows explorer and allow you to search for the file.

Also, you can select where to import it by changing the Module/Folder option.

image_20181226113838_1_png

Press OK.

GeneXus after reading the file will automatically generate all the necessary objects to allow you to work with the API.

These objects will be created inside three folders:

  • Api: containing procedures that are the methods exposed by the API.
  • Models: contains structured data types used by the procedures.
  • Client: contains a procedure that returns the URL of the service.

For more information see OpenAPI import tool.

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.