Importing an API Model into your Workspace

The APIs that are discovered from local and remote servers are displayed in the API Explorer tab of the TIBCO ActiveMatrix BusinessWorks™. You can use these APIs in your project by importing them into the Service Descriptors folder of the project. The .json file for the API gets copied into the application module.

To import the APIs from the API Explorer into your project follow these steps.

Procedure

  1. Right-click on one or more API names in the API Explorer and select Import.
    The Import API dialog opens.

    Every API you selected in the API Explorer is listed in this dialog. If an API has multiple versions, all versions are listed. By default, all APIs listed here are selected. You can deselect APIs that you do not want to import by clearing its check box.

  2. Select the appropriate action and click Next.
    Option Description
    Import to project Select the radio button to import the API into an existing project and browse to the project using the Browse button.
    Create a new project and import API to the new project To create a new project and import the API into that project select the radio button.
    API list to import Select the API or the appropriate version of the API when there are multiple versions of the API available.
    The Change Swagger name dialog box opens.

    Change the swagger file name if required. Click Next.

    The New BusinessWorks Application Module dialog box opens.

  3. Create a new application module with appropriate details and click Finish..
    You should see the API(s) under the Service Descriptors folder of the project. You can create sub-folders under the Service Descriptors folder and drag-and-drop APIs into them if you prefer to organize the APIs into a meaningful folder structure.

    As an alternative to the above procedure, you can also drag and drop the API from the API Explorer into the project's Service Descriptors folder.

    Note: APIs that were created using a Swagger file must be implemented exactly as defined by the Swagger file. TIBCO Business Studio for BusinessWorks allows you to only view the parameters and operations that are defined in the Swagger file. You cannot create any new parameters or operations for such applications.