Creating a Service By Importing an OpenAPI Document

Add a new REST API web service and operations to a KnowledgeKube repository by importing an OpenAPI document. This is sometimes referred to as a Swagger document.

In order to use this feature, you will need to obtain an OpenAPI document from the service provider. For more information on this type of specification, refer to the official OpenAPI website.

Implementation:

  1. Click to access the Service Workbench tab.
  2. Select the provider to which you want to add the service.
  3. Open the Service Options menu and select Create From Open API Import. This opens the Import From Open API dialog where you can select the file to use.
  4. You can either upload a file by clicking Browse and selecting the file you want to import, or select Import From a URL and enter the address in the provided text field.
  5. Click Import. This uploads the file and opens the Import Wizard, which shows all parameters and operations contained in the file.
  6. Click Next. This opens the Create Service dialog where you can configure the service.
  7. Use the Service Name to change the service's name if required.
  8. Enter a Service Reference. The Service Reference is used when calling the service using a function.
  9. Provide a Service Description that explains the purpose of the service for the benefit of yourself and other back office users.
  10. Enter the service's website address in the Service Web Page URL field.
  11. (Optional) Click the Test URL button to open the website in your default browser to ensure it is correct.
  12. In the Category tab, choose which category to assign the new service. You can either choose an existing category from the Pick a Category From the List Below drop-down menu, or you can select Create and Use a New Category and enter name you want to give the new category in the provided text field.
  13. Switch to the Service Parameters tab. This will be pre-populated with the parameters imported from the uploaded file.
  14. Add or edit Parameters as required by the service. The parameters determines what the service does and how its functionality is executed, so these will differ depending on the API service you are using.
  15. Click Next. This opens an interface where you can configure the Operations included in the uploaded document.

This interface will be labelled Import Wizard when you access it through the import process, while it will be called Manage Operations at all other times. However, despite the difference in name, the actual interface is the same.

  1. Click Finish to save your new service and operations.