Search Results

Importing API Specifications

You can import the specification of a REST API to API Modeler to explore, update, and test the REST API. Ensure that the REST API specification conforms to Swagger specification version 2.0 and the file format is JSON or YAML.

To import REST API specifications, complete these steps:

  1. Log on to the TIBCO Cloud Integration website.
  2. Click the API specs tab. You can click the API specification to edit the API.

  3. Use one of the following ways to import your REST API specifications:
    • Click > Import from filesystem to import REST API specifications from your computer. In the displayed Open dialog, select the REST API specifications to import.
    • Click > Import from URL to import REST API specifications from a URL pointing to a Swagger JSON or YAML file. In the displayed Import from URL dialog, enter a URL and click Import. The URL must begin with http:// or https://.
    • Click > Import from Github to import REST API specifications from a Github repository. See Importing from Github below for more information.
    • Drag one or more REST API specifications from your computer to the All API specs page directly.

    The imported API specs will be put in the current group, or will be in the default group if you are currently in the All API specs page.

  4. Click the View details link in the displayed status banner or notification message to check the importing details:
    • If the API specification is successfully imported:
      • Click Rename to change the API name and version.
      • Click View to view the imported REST API.

    • If an API specification is duplicated with an existing one, that is, both their names and versions are the same:
      • Click Rename to change the API name or version accordingly, and then click Save to import the API specification again.
      • Click Overwrite to replace the existing one.
      • Click Cancel to undo the importing.

    • If the API specification is a badly-formatted or invalid JSON file:
      • Click Details to view details of the error in a pop-up window.
      • Click Retry to try the import again.

Importing from Github

To import an API specification from Github:

  1. Click > Import from Github

  2. If this is the first time you imported from GitHub, the GitHub login box is shown. TIBCO® Cloud Integration uses the OAuth protocol for integration with GitHub, so you will input your user credentials to directly log in to GitHub, rather than providing user credentials to TIBCO Cloud Integration.

  3. Click Login to GitHub. The GitHub login box is shown:

  4. Enter your GitHub username and password and click Sign in. If you do not have a GitHub account, click Create an account. If you have forgotten your GitHub password, click Forgot password?.

  5. The first time you sign in to GitHub, you will be asked to authorize TIBCO Cloud Integration to access your account, including your GitHub account user data, as well as accessing to the private and public repositories of this account. The account user data is used for integrating with GitHub. Click Authorize application.

    Note: It’s also possible that you will be asked to authorize TIBCO Cloud Integration to access organization’s data in repositories, if you are a member of any organization on GitHub, and TIBCO Cloud Integration has never been authorized for accessing this organization. Click the Request Access button next to an organization to send the request to the owner of this organization. You should send this request before clicking the Authorize application button.

  6. All the GitHub repositories that you can access will be displayed in the Import from GitHub window.

    The left side panel of the window is the list of all the repositories in which you have read permissions, which includes organization repositories. For example, the CatChasing repository of the PetChasers organization is displayed there, which only happens when the access request you sent earlier has been approved by the owner of the PetChasers organization.

    TIBCO Cloud Integration only supports import from the master branch of the repositories on GitHub.

  7. Select a GitHub repository, and select a File Name.

    You can choose the repository from the left panel, navigate to the target folder and import the API specifications from this folder.

  8. Click Import.

Globalization Support

REST specification JSON files containing non-ASCII characters can also be imported when the files are encoded in UTF-8 encoding. However for some of the UTF-8 encoded files with BOM bytes added at the beginning, you must remove these BOM bytes using third-party tools before they can be imported into API Modeler.

What to Do Next

After importing the API specification, you can do the following operations:

  • Move the mouse pointer over the API specification, and then click to preview the API.
  • Move the mouse pointer over the API specification, and then click > Create Mock app to test the API. For more details, see Creating a Mock App.
  • Move the mouse pointer over the API specification, and then click > Edit to edit the API. For more details, see Modeling an API.
  • Move the mouse pointer over the API specification, and then click > Remove to remove the API specification to trash. For more details, see Removing REST API Specifications.